Timeline



Jun 9, 2019:

11:25 PM Changeset in webkit [246254] by bshafiei@apple.com
  • 2 edits in branches/safari-608.1.27-branch/Source/WebKit

Cherry-pick r246248. rdar://problem/51538088

[iOS] ResourceLoadStatistics state is not properly relayed to the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=198692
<rdar://problem/51538088>

Reviewed by Maciej Stachowiak.

  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::setResourceLoadStatisticsEnabled): Message the NetworkProcess on state change.

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

11:25 PM Changeset in webkit [246253] by bshafiei@apple.com
  • 3 edits in branches/safari-608.1.27-branch/Source/WebKit

Cherry-pick r246239. rdar://problem/51462498

Drag starting state can get stuck even though the drag has ended
https://bugs.webkit.org/show_bug.cgi?id=198696
<rdar://problem/51556045>

Reviewed by Wenson Hsieh.

In iOS 13, we're seeing cases of the DragSession not
correctly ending, and thus leaving m_isStartingDrag in
an incorrect state. Temporarily force this to be reset
in ::dragEnded while investigating

  • UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging while here. (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]): (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::dragEnded):

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

11:25 PM Changeset in webkit [246252] by bshafiei@apple.com
  • 17 edits
    6 copies in branches/safari-608.1.27-branch/Source/WebKit

Cherry-pick r246224. rdar://problem/51462498

Introduce new SPI for context menus on iOS
https://bugs.webkit.org/show_bug.cgi?id=198590

Reviewed by Tim Horton.

Also introduce WKContextMenuElementInfo which is API.
This is part of <rdar://problem/51003503>

  • Shared/API/APIObject.h:
  • Shared/API/Cocoa/WebKit.h:
  • Shared/Cocoa/APIObject.mm: (API::Object::newObject):
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContextMenuElementInfo.cpp: Added. (API::ContextMenuElementInfo::ContextMenuElementInfo):
  • UIProcess/API/APIContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added. (-[WKContextMenuElementInfo linkURL]): (-[WKContextMenuElementInfo _apiObject]): (-[WKContextMenuElementInfo _activatedElementInfo]):
  • UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
  • UIProcess/API/Cocoa/WKPreviewElementInfo.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm: (-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]): (-[_WKActivatedElementInfo isAnimatedImage]):
  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm: (-[WKActionSheetAssistant defaultActionsForLinkSheet:]): (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:

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

11:25 PM Changeset in webkit [246251] by bshafiei@apple.com
  • 7 edits
    2 adds in branches/safari-608.1.27-branch

Cherry-pick r246213. rdar://problem/50114230

Restrict fast clicks everywhere to desktop content mode
https://bugs.webkit.org/show_bug.cgi?id=198610
<rdar://problem/50114230>

Reviewed by Dean Jackson.

Source/WebKit:

We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.

This patch had been reverted once because it yielded some regressions in existing tests, notably under
fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
rathern than the recognition of two single taps.

  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::allowsFastClicksEverywhere const):
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]): (_didStartProvisionalLoadForMainFrame):
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

LayoutTests:

Add a new test that enables fast clicks but also sets a mobile content mode.

We also mark fast/visual-viewport/ios/min-scale-greater-than-one.html as non-flaky
since the flakiness was due to the fast clicks everywhere behavior being enabled on iPhone.

Finally, we can now remove the hack where ui.tap() in the Pointer Events utility returned
a promise with a one-second delay since the issue of double-taps being recognized instead of
two consecutive single taps across two tests has been resolved.

  • fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
  • fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • pointerevents/utils.js:

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

11:25 PM Changeset in webkit [246250] by bshafiei@apple.com
  • 40 edits
    1 move
    1 add
    1 delete in branches/safari-608.1.27-branch

Cherry-pick r246118. rdar://problem/50114230

Upstream content mode support into open source from WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=198484
<rdar://problem/51355671>

Reviewed by Andy Estes.

Source/WebCore:

  • Modules/modern-media-controls/media/media-controller.js: (MediaController.prototype.get layoutTraits):

Adjust modern media controls code to use iOS-style controls on PLATFORM(IOS_FAMILY), instead of depending on the
navigator's platform name or the presence of touch events.

  • page/Quirks.cpp: (WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost): (WebCore::shouldEmulateUndoRedoInHiddenEditableAreasForHost):
  • page/SettingsBase.h:
  • rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::mediaControlsScript):

Source/WebCore/PAL:

Add some new constants to MobileGestaltSPI.h.

  • pal/spi/ios/MobileGestaltSPI.h:

Source/WebKit:

Move code for handling WKContentMode into open source. No change in behavior, for internal builds.

  • Shared/API/Cocoa/WebKit.apinotes:
  • Shared/WebContentMode.h: Renamed from Source/WebKit/Shared/WebCompatibilityMode.h.
  • Shared/WebPreferences.yaml:
  • UIProcess/API/APINavigation.h: (API::Navigation::setEffectiveContentMode): (API::Navigation::effectiveContentMode const): (API::Navigation::setEffectiveCompatibilityMode): Deleted. (API::Navigation::effectiveCompatibilityMode const): Deleted.
  • UIProcess/API/APINavigationClient.h: (API::NavigationClient::shouldBypassContentModeSafeguards const): (API::NavigationClient::shouldBypassCompatibilityModeSafeguards const): Deleted.
  • UIProcess/API/APIWebsitePolicies.cpp: (API::WebsitePolicies::copy const):
  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKNavigation.h:
  • UIProcess/API/Cocoa/WKNavigation.mm: (-[WKNavigation effectiveContentMode]):
  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm: (WebKit::contentMode): (WebKit::webContentMode): (-[WKWebpagePreferences _allowSiteSpecificQuirksToOverrideCompatibilityMode]): (-[WKWebpagePreferences _setAllowSiteSpecificQuirksToOverrideCompatibilityMode:]): (-[WKWebpagePreferences setPreferredContentMode:]): (-[WKWebpagePreferences preferredContentMode]):
  • UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::shouldBypassContentModeSafeguards const): (WebKit::NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards const): Deleted.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies): (WebKit::WebPageProxy::effectiveCompatibilityModeAfterAdjustingPolicies): Deleted.
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::desktopClassBrowsingSupported): (WebKit::webViewSizeIsNarrow): (WebKit::desktopClassBrowsingRecommendedForRequest): (WebKit::desktopClassBrowsingRecommended): (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Change the "useModernCompatibilityMode" layout test option to instead be "contentMode", with values of either
"mobile" or "desktop".

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/ios/PreferredCompatibilityMode.mm: Removed.
  • TestWebKitAPI/ios/PreferredContentMode.mm: Added. (-[ContentModeNavigationDelegate setDecidePolicyForNavigationActionWithPreferences:]): (-[ContentModeNavigationDelegate decidePolicyForNavigationActionWithPreferences]): (-[ContentModeNavigationDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]): (+[WKWebpagePreferences preferencesWithContentMode:]): (-[WKWebView navigatorUserAgent]): (-[WKWebView navigatorPlatform]): (-[WKWebView loadTestPageNamed:withPolicyDecisionHandler:]): (-[WKWebView loadHTMLString:withPolicyDecisionHandler:]): (-[WKWebView loadTestPageNamed:andExpectEffectiveContentMode:withPolicyDecisionHandler:]): (-[NSString shouldContainStrings:]): (IPhoneUserInterfaceSwizzler::IPhoneUserInterfaceSwizzler): (IPhoneUserInterfaceSwizzler::phoneUserInterfaceIdiom): (TestWebKitAPI::setUpWebViewForPreferredContentModeTestingWithoutNavigationDelegate): (TestWebKitAPI::setUpWebViewForPreferredContentModeTesting): (TestWebKitAPI::makeContentModeDecisionHandler): (TestWebKitAPI::TEST):
  • WebKitTestRunner/TestController.cpp: (WTR::updateTestOptionsFromTestHeader):
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestOptions.h: (WTR::TestOptions::hasSameInitializationOptions const):
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): (WTR::TestController::configureContentMode): (WTR::TestController::enableModernCompatibilityMode): Deleted.

LayoutTests:

Explicitly opt a few tests into desktop or mobile content mode.

  • fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html:
  • fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html:
  • fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html:
  • media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html:
  • platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html:
  • platform/ipad/fast/viewport/empty-meta.html:
  • platform/ipad/fast/viewport/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport.html:
  • platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html:

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

7:22 PM Changeset in webkit [246249] by Fujii Hironori
  • 2 edits in trunk/Tools

[WinCairo][MiniBrowser] Disable MediaCapabilities until it's ready
https://bugs.webkit.org/show_bug.cgi?id=198655

Reviewed by Ross Kirsling.

MediaCapabilities is enabled by default for WK2, but WinCairo
doesn't implemented yet. Disable it in MiniBrowser.

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::create):

5:25 PM Changeset in webkit [246248] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] ResourceLoadStatistics state is not properly relayed to the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=198692
<rdar://problem/51538088>

Reviewed by Maciej Stachowiak.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setResourceLoadStatisticsEnabled): Message the NetworkProcess
on state change.

2:47 PM Changeset in webkit [246247] by bshafiei@apple.com
  • 3 edits in tags/Safari-608.1.28.1/Source/WebCore

Cherry-pick r246216. rdar://problem/51345064

Fix non-iOS build after r246205
https://bugs.webkit.org/show_bug.cgi?id=198657

Reviewed by Brent Fulgham.
<rdar://problem/51345064>

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

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

2:16 PM Changeset in webkit [246246] by bshafiei@apple.com
  • 8 edits in tags/Safari-608.1.28.1/Source/WebCore

Cherry-pick r246207. rdar://problem/51185518

Images are not resizing correctly when dragged to a message in 1/3 view
https://bugs.webkit.org/show_bug.cgi?id=198623
<rdar://problem/51185518>

Reviewed by Wenson Hsieh.

Mail's max-width: 100%; default style is in conflict with the preferred presentation size. This patch preserves the existing behaviour for Mail by
not setting the height (and rely on the width + aspect ratio).

  • editing/WebContentReader.h:
  • editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragmentForImageAttachment): (WebCore::WebContentReader::readImage): (WebCore::attachmentForFilePath): (WebCore::attachmentForData): (WebCore::WebContentReader::readFilePath): (WebCore::WebContentReader::readDataBuffer):
  • editing/gtk/EditorGtk.cpp: (WebCore::createFragmentFromPasteboardData):
  • editing/markup.cpp: (WebCore::createFragmentForImageAndURL):
  • editing/markup.h:
  • platform/Pasteboard.h: (WebCore::PasteboardWebContentReader::readFilePath): (WebCore::PasteboardWebContentReader::readImage): (WebCore::PasteboardWebContentReader::readDataBuffer):
  • platform/PasteboardItemInfo.h: (WebCore::PasteboardItemInfo::encode const): (WebCore::PasteboardItemInfo::decode):
  • platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::readPasteboardWebContentDataForType): (WebCore::Pasteboard::read): (WebCore::Pasteboard::readRespectingUTIFidelities):
  • platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::informationForItemAtIndex):

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

2:15 PM Changeset in webkit [246245] by bshafiei@apple.com
  • 3 edits in tags/Safari-608.1.28.1/Source/WebCore

Cherry-pick r246205. rdar://problem/51345064

Limit simulated mouse events on Google Maps to entering Street View
https://bugs.webkit.org/show_bug.cgi?id=198657
<rdar://problem/51345064>

Reviewed by Brent Fulgham.

  • page/Quirks.cpp: (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const): (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
  • page/Quirks.h:

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

2:15 PM Changeset in webkit [246244] by bshafiei@apple.com
  • 2 edits in tags/Safari-608.1.28.1/Source/WebCore

Cherry-pick r246099. rdar://problem/48006291

iPadOS: Google calendars new event picker moves and flickers in landscape with software keyboard
https://bugs.webkit.org/show_bug.cgi?id=198556

Reviewed by Wenson Hsieh.

Fix the issuse that it's really hard to create a new event using Google calendar on iPadOS with
a software keyboard enabled because tapping on date brings up software keyboard and erratically
shifts up/down the new event dialog/pane.

Add a site specific quirk to pretend these input elements have inputmode=none for now.

No new tests since this is a site specific quirk.

  • page/Quirks.cpp: (WebCore::Quirks::needsInputModeNoneImplicitly const):

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

2:15 PM Changeset in webkit [246243] by bshafiei@apple.com
  • 4 edits
    2 adds in tags/Safari-608.1.28.1

Cherry-pick r246096. rdar://problem/51375055

[ContentChangeObserver] Gmail text editing controls require two taps
https://bugs.webkit.org/show_bug.cgi?id=198541
<rdar://problem/51375055>

Reviewed by Simon Fraser.

Source/WebCore:

When the animation completes we should also check if the newly visible content is also clickable and report it accordingly.
When the animated content is not clickable, we need to proceed with click instead of stopping at hover.

Test: fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html

  • page/ios/ContentChangeObserver.cpp: (WebCore::isConsideredClickable): (WebCore::ContentChangeObserver::didFinishTransition): (WebCore::ContentChangeObserver::adjustObservedState): (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope): (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const): Deleted. -> Turn it into a static function so that didFinishTransition could call it as well.
  • page/ios/ContentChangeObserver.h:

LayoutTests:

  • fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html: Added.

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

2:06 PM Changeset in webkit [246242] by bshafiei@apple.com
  • 7 edits in tags/Safari-608.1.28.1/Source

Versioning.

1:56 PM Changeset in webkit [246241] by bshafiei@apple.com
  • 1 copy in tags/Safari-608.1.28.1

New tag.

1:28 PM Changeset in webkit [246240] by commit-queue@webkit.org
  • 20 edits in trunk/Source

Unreviewed, rolling out r246150, r246160, and r246166.
https://bugs.webkit.org/show_bug.cgi?id=198698

Regresses page loading time on iOS 13 (Requested by keith_m
on #webkit).

Reverted changesets:

"Reenable Gigacage on ARM64."
https://bugs.webkit.org/show_bug.cgi?id=198453
https://trac.webkit.org/changeset/246150

"Unrevied build fix for FTL without Gigacage."
https://trac.webkit.org/changeset/246160

"Fix typo in cageWithoutUntagging"
https://bugs.webkit.org/show_bug.cgi?id=198617
https://trac.webkit.org/changeset/246166

1:03 PM Changeset in webkit [246239] by dino@apple.com
  • 3 edits in trunk/Source/WebKit

Drag starting state can get stuck even though the drag has ended
https://bugs.webkit.org/show_bug.cgi?id=198696
<rdar://problem/51556045>

Reviewed by Wenson Hsieh.

In iOS 13, we're seeing cases of the DragSession not
correctly ending, and thus leaving m_isStartingDrag in
an incorrect state. Temporarily force this to be reset
in ::dragEnded while investigating

  • UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging

while here.
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::dragEnded):

4:55 AM Changeset in webkit [246238] by commit-queue@webkit.org
  • 7 edits in trunk

Add wildcard to Access-Control-Allow-Methods and Access-Control-Allow-Headers
https://bugs.webkit.org/show_bug.cgi?id=165508

Patch by Rob Buis <rbuis@igalia.com> on 2019-06-09
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:

Source/WebCore:

According to the spec [1] step 6.5, a wildcard for method
and request's credentials mode should be taken into account, so
add this to the check. Same for Access-Control-Allow-Headers (step 6.7).

[1] https://fetch.spec.whatwg.org/#cors-preflight-fetch

Tests: web-platform-tests/fetch/api/cors/cors-preflight-star.any.html

web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker.html

  • loader/CrossOriginAccessControl.cpp:

(WebCore::validatePreflightResponse):

  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):

  • loader/CrossOriginPreflightResultCache.h:
12:09 AM Changeset in webkit [246237] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] Use mergePrediction in ValuePow prediction propagation
https://bugs.webkit.org/show_bug.cgi?id=198648

Reviewed by Saam Barati.

JSTests:

  • stress/prediction-propagation-should-use-merge-prediction-for-value-pow.js: Added.

Source/JavaScriptCore:

We are accidentally using setPrediction. This is wrong since prediction propagation (not processInvariant)
must extend the speculation types to ensure we eventually reach to the fixed point. setPrediction can discard
previously configured predictions, can lead to oscillation potentially. Use mergePrediction instead.

  • dfg/DFGPredictionPropagationPhase.cpp:

Jun 8, 2019:

8:55 PM Changeset in webkit [246236] by wenson_hsieh@apple.com
  • 12 edits in trunk

[iOS] The default application name for user agent when requesting desktop content is still "Mobile/15E148"
https://bugs.webkit.org/show_bug.cgi?id=198693
<rdar://problem/51555371>

Reviewed by Tim Horton.

Source/WebKit:

Fixes the bug by introducing an applicationNameForDesktopUserAgent member to WebPageProxy. This
applicationNameForDesktopUserAgent is set alongside the regular applicationNameForUserAgent; however, in the
case where it is being set via WKWebViewConfiguration, use WKWebViewConfiguration's
_applicationNameForDesktopUserAgent instead. See below for more details.

Tested by adding to the existing API test PreferredContentMode.ApplicationNameForDesktopUserAgent.

  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):

  • UIProcess/API/APIWebsitePolicies.h:

Drive-by fix: rename applicationNameForUserAgentWithModernCompatibility to applicationNameForDesktopUserAgent in
a few places.

  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:

(-[WKBrowsingContextController setApplicationNameForUserAgent:]):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setApplicationNameForUserAgent:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

Change _applicationNameForUserAgent into an Optional<RetainPtr<NSString>>. A value of WTF::nullopt allows us to
know that the default application name should be used (which is different when requesting desktop content).

(-[WKWebViewConfiguration encodeWithCoder:]):
(-[WKWebViewConfiguration initWithCoder:]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _applicationNameForDesktopUserAgent]):

Add _applicationNameForDesktopUserAgent to the web view configuration. This behaves like
applicationNameForUserAgent, with one exception: in the case where the default applicationNameForUserAgent is
used (i.e. the client has not specified any application name), default to nil as the application name for user
agent, rather than "Mobile/15E148".

(-[WKWebViewConfiguration applicationNameForUserAgent]):
(-[WKWebViewConfiguration setApplicationNameForUserAgent:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(-[WKWebpagePreferences _applicationNameForUserAgentWithModernCompatibility]):
(-[WKWebpagePreferences _setApplicationNameForUserAgentWithModernCompatibility:]):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::setApplicationNameForDesktopUserAgent):
(WebKit::WebPageProxy::applicationNameForDesktopUserAgent const):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

Tools:

Augment an existing API test to exercise three additional scenarios:

  • The web view configuration's application name is never set; the default should not include

"Mobile/15E148" in desktop mode.

  • The application name is explicitly set to nil; the default application name should still not include

"Mobile/15E148".

  • The application name is explicitly set to the default value, "Mobile/15E148". WKWebView should honor

this when generating the user agent, even in desktop mode.

  • TestWebKitAPI/ios/PreferredContentMode.mm:

(TestWebKitAPI::setUpWebViewForPreferredContentModeTestingWithoutNavigationDelegate):
(TestWebKitAPI::setUpWebViewForPreferredContentModeTesting):
(TestWebKitAPI::TEST):

4:45 PM Changeset in webkit [246235] by aestes@apple.com
  • 13 edits in trunk/Source

[Apple Pay] If we have a bound interface identifier, set it on new PKPaymentRequests
https://bugs.webkit.org/show_bug.cgi?id=198690
<rdar://problem/48041803>

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cocoa/PassKitSPI.h: Included PKPaymentRequest_WebKit.h to declare some

WebKit-specific PKPaymentRequest SPIs for internal SDKs, and re-declared these SPIs - now
including the boundInterfaceIdentifier property - for public SDKs.

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::boundInterfaceIdentifier const): Implemented a public getter
for m_boundInterfaceIdentifier.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:

(WebKit::NetworkConnectionToWebProcess::paymentCoordinatorBoundInterfaceIdentifier):
Implemented an override for paymentCoordinatorBoundInterfaceIdentifier.

  • Shared/ApplePay/WebPaymentCoordinatorProxy.h: Declared

paymentCoordinatorBoundInterfaceIdentifier for clients to override.

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): If the client has a non-empty
bound interface identifier, set it on the new PKPaymentRequest.

  • UIProcess/WebPageProxy.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::paymentCoordinatorBoundInterfaceIdentifier): Implemented an override
for paymentCoordinatorBoundInterfaceIdentifier.

Source/WTF:

  • wtf/FeatureDefines.h: Defined HAVE_PASSKIT_BOUND_INTERFACE_IDENTIFIER, and cleaned up some

other PassKit HAVEs.

11:48 AM Changeset in webkit [246234] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Introduce Baseline to LineBox
https://bugs.webkit.org/show_bug.cgi?id=198686
<rdar://problem/51545175>

Reviewed by Antti Koivisto.

Make baselines alignment explicit in Line.
This is in preparation for adding non-baseline vertical alignment support.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Line):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):
(WebCore::Layout::Line::halfLeadingMetrics):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Content::baseline const):
(WebCore::Layout::Line::Content::setBaseline):
(WebCore::Layout::Line::logicalHeight const):
(WebCore::Layout::Line::baselineAlignedContentHeight const):
(WebCore::Layout::Line::baselineOffset const):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::baseline const):
(WebCore::Layout::LineBox::LineBox):

11:31 AM Changeset in webkit [246233] by Alan Bujtas
  • 2 edits in trunk/Tools

[LFC] Unreviewed test gardening.

Remove rtl tests. They were mistakenly marked as pass.

  • LayoutReloaded/misc/LFC-passing-tests.txt:
3:32 AM Changeset in webkit [246232] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

resize-observer/element-leak.html fails on Windows platform
https://bugs.webkit.org/show_bug.cgi?id=197908

Patch by Cathie Chen <cathiechen> on 2019-06-08
Reviewed by Ryosuke Niwa.

We have conservative GC, the removed objects might keep alive for a while. Change the test case
to 20 iframes. This would make the result more accurate.

  • platform/win/TestExpectations:
  • resize-observer/element-leak-expected.txt:
  • resize-observer/element-leak.html:

Jun 7, 2019:

10:19 PM Changeset in webkit [246231] by commit-queue@webkit.org
  • 16 edits in trunk

REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately
https://bugs.webkit.org/show_bug.cgi?id=198664

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-06-07
Reviewed by Simon Fraser.

Source/WebCore:

Because WK1 is a single process, scheduleCompositingLayerFlush() has to
be called immediately when layers' update is needed. Otherwise no content
will be drawn for the current frame. Doing this will get smooth scrolling
back to WK1.

RenderingUpdateScheduler now has three different scheduling methods:

  1. scheduleTimedRenderingUpdate(): This is a two-steps scheduling method. DisplayRefreshMonitor has to fire before scheduleCompositingLayerFlush() is called. This is used by rAF, WebAnimations and intersection and resize observers.
  1. scheduleImmediateRenderingUpdate(): This is a one-step scheduling method. layerTreeAsText() calls this method because it has to process the rendering update within the current frame.
  1. scheduleRenderingUpdate(): RenderLayerCompositor::scheduleLayerFlush() calls this function to decide either immediately flush layers or wait for the next timed frame. scheduleImmediateRenderingUpdate() will be called for WK1. scheduleTimedRenderingUpdate() will be called for WK2.
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::scheduleAnimationResolution):

  • dom/Document.cpp:

(WebCore::Document::scheduleTimedRenderingUpdate):
(WebCore::Document::scheduleInitialIntersectionObservationUpdate):
(WebCore::Document::updateResizeObservations):
(WebCore::Document::scheduleRenderingUpdate): Deleted.

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

(WebCore::ScriptedAnimationController::scheduleAnimation):

  • page/ChromeClient.h:
  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::didChangeViewExposedRect):
(WebCore::PageOverlayController::notifyFlushRequired):

  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
(WebCore::RenderingUpdateScheduler::displayRefreshFired):
(WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate):
(WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
(WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush): Deleted.

  • page/RenderingUpdateScheduler.h:
  • page/ResizeObserver.cpp:

(WebCore::ResizeObserver::observe):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerTreeAsText):

Source/WebKitLegacy/mac:

WK1 has to skip using DisplayRefreshMonitor when layers need to be updated.

  • WebCoreSupport/WebChromeClient.h:

(WebChromeClient::needsImmediateScheduleCompositingLayerFlush):

Tools:

Delete repeated entries which were submitted by mistake.

  • Tracing/SystemTracePoints.plist:
10:05 PM Changeset in webkit [246230] by Antti Koivisto
  • 4 edits in trunk/Source/WebKit

REGRESSION (r245006): Setting scrollview.scrollEnabled clobbers any scrollEnabled set by a client
https://bugs.webkit.org/show_bug.cgi?id=198656
<rdar://problem/51494585>

Reviewed by Tim Horton.

Allow client to disable scrolling and zooming.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):

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

(-[WKScrollView initWithFrame:]):
(-[WKScrollView setScrollEnabled:]):
(-[WKScrollView _setScrollEnabledInternal:]):
(-[WKScrollView _updateScrollability]):
(-[WKScrollView setZoomEnabled:]):
(-[WKScrollView _setZoomEnabledInternal:]):
(-[WKScrollView _updateZoomability]):

6:37 PM Changeset in webkit [246229] by wenson_hsieh@apple.com
  • 6 edits in trunk

Allow clients to vend custom -inputView and -inputAccessoryView by overriding WKWebView methods
https://bugs.webkit.org/show_bug.cgi?id=198631
<rdar://problem/51505431>

Reviewed by Tim Horton.

Source/WebKit:

Allow WKWebView API clients to override WKContentView's default input view and/or input accessory view by
subclassing WKWebView and implementing -inputView or -inputAccessoryView.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView inputAccessoryView]):
(-[WKWebView inputView]):

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

(-[WKContentView inputView]):
(-[WKContentView inputViewForWebView]):
(-[WKContentView inputAccessoryView]):
(-[WKContentView inputAccessoryViewForWebView]):

Tools:

Add an API test that overrides -[WKWebView inputView] and -[WKWebView inputAccessoryView].

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

(-[CustomInputWebView initWithFrame:configuration:inputView:inputAccessoryView:]):
(-[CustomInputWebView inputView]):
(-[CustomInputWebView inputAccessoryView]):
(TestWebKitAPI::TEST):

6:33 PM Changeset in webkit [246228] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Disable focus rings on WKContentView for PLATFORM(IOSMAC)
https://bugs.webkit.org/show_bug.cgi?id=198685

Reviewed by Simon Fraser.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):

6:30 PM Changeset in webkit [246227] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

[ Mac Debug ] REGRESSION (r242975) Layout Test storage/indexeddb/modern/deletedatabase-2-private.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196445
<rdar://problem/49483061>

Reviewed by Brady Eidson.

Unflake the test by making sure to wait for the onerror event before continuing the test.

  • platform/mac-wk2/TestExpectations:
  • storage/indexeddb/modern/resources/deletedatabase-2.js:

(prepareDatabase.event.target.onerror):
(continueTest1.request.onsuccess): Deleted.

5:48 PM Changeset in webkit [246226] by Megan Gardner
  • 10 edits in trunk/Source

Extend quirks to emulate bold/italic/underline in hidden editable areas
https://bugs.webkit.org/show_bug.cgi?id=198681

Reviewed by Wenson Hsieh.

Source/WebCore:

Rename only.

Rename quirks to be more accurate for new extended use.

  • page/Quirks.cpp:

(WebCore::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreasForHost):
(WebCore::Quirks::shouldEmulateEditingButtonsAndGesturesInHiddenEditableAreas const):
(WebCore::shouldEmulateUndoRedoInHiddenEditableAreasForHost): Deleted.
(WebCore::Quirks::shouldEmulateUndoRedoInHiddenEditableAreas const): Deleted.

  • page/Quirks.h:

Source/WebKit:

  • Shared/FocusedElementInformation.cpp:

(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):

  • Shared/FocusedElementInformation.h:
  • Shared/SyntheticEditingCommandType.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView undoManager]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(shouldSynthezieKeyEvents):
(-[WKContentView toggleBoldfaceForWebView:]):
(-[WKContentView toggleItalicsForWebView:]):
(-[WKContentView toggleUnderlineForWebView:]):
(-[WKContentView _elementDidBlur]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::generateSyntheticEditingCommand):
(WebKit::WebPage::getFocusedElementInformation):

5:03 PM Changeset in webkit [246225] by Truitt Savell
  • 12 edits
    1 delete in trunk

Unreviewed, rolling out r246138.

Broke internal builds

Reverted changeset:

"[WHLSL] Educate the property resolver about IndexExpressions"
https://bugs.webkit.org/show_bug.cgi?id=198399
https://trac.webkit.org/changeset/246138

4:59 PM Changeset in webkit [246224] by dino@apple.com
  • 17 edits
    6 copies in trunk/Source/WebKit

Introduce new SPI for context menus on iOS
https://bugs.webkit.org/show_bug.cgi?id=198590

Reviewed by Tim Horton.

Also introduce WKContextMenuElementInfo which is API.
This is part of <rdar://problem/51003503>

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

(API::Object::newObject):

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContextMenuElementInfo.cpp: Added.

(API::ContextMenuElementInfo::ContextMenuElementInfo):

  • UIProcess/API/APIContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.

(-[WKContextMenuElementInfo linkURL]):
(-[WKContextMenuElementInfo _apiObject]):
(-[WKContextMenuElementInfo _activatedElementInfo]):

  • UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
  • UIProcess/API/Cocoa/WKPreviewElementInfo.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
(-[_WKActivatedElementInfo isAnimatedImage]):

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

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:
4:18 PM Changeset in webkit [246223] by Nikita Vasilyev
  • 6 edits in trunk

Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough
https://bugs.webkit.org/show_bug.cgi?id=198629
<rdar://problem/51504160>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Longhand CSS properties (e.g. "font-size") overriden by shorthands (e.g. "font") now have strikethroughs.

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.set overridingProperty):
(WI.CSSProperty):

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles.prototype._updateStyleCascade):
Call _associateRelatedProperties before _markOverriddenProperties because
_associateRelatedProperties sets relatedShorthandProperty property, which
is now used by _markOverriddenProperties.

(WI.DOMNodeStyles.prototype._markOverriddenProperties.isOverriddenBy):
(WI.DOMNodeStyles.prototype._markOverriddenProperties):

LayoutTests:

  • inspector/css/overridden-property-expected.txt:
  • inspector/css/overridden-property.html:
3:52 PM Changeset in webkit [246222] by dbates@webkit.org
  • 2 edits in trunk/Tools

[lldb-webkit] Pretty-print all kinds of Documents
https://bugs.webkit.org/show_bug.cgi?id=198620

Reviewed by Simon Fraser.

Register formatters for all classes derived from WebCore::Document so we get nice summaries
without having to drill down in Xcode- or casting- to the base class, Document.

Older LLDB versions use to do this automatically, but this functionality was removed in newer
versions:

[[

Warning: previous versions of LLDB defined cascading to mean not only going through typedef
chains, but also through inheritance chains. This feature has been removed since it
significantly degrades performance. You need to set up your formatters for every type in
inheritance chains to which you want the formatter to apply.

]]
<https://lldb.llvm.org/use/variable.html> (as of 06/06/2019)

  • lldb/lldb_webkit.py:

(lldb_init_module):

3:50 PM Changeset in webkit [246221] by Jonathan Bedard
  • 5 edits in trunk/Tools

webkitpy: Support reporting results for uncommon test configurations
https://bugs.webkit.org/show_bug.cgi?id=198662
<rdar://problem/51524128>

Reviewed by Aakash Jain.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run): Override wk1 and wk2 flavors with specified flavor.

  • Scripts/webkitpy/port/base.py:

(Port.configuration_for_upload): Set flavor based on options.

  • Scripts/webkitpy/results/options.py:

(upload_options): Add result-report-flavor option.

  • Scripts/webkitpy/test/main.py:

(Tester._run_tests): Set flavor based on options.

3:43 PM Changeset in webkit [246220] by Alan Coon
  • 7 edits in branches/safari-608.1.27-branch/Source

Versioning.

3:40 PM Changeset in webkit [246219] by Alan Coon
  • 1 copy in tags/Safari-608.1.27.5

Tag Safari-608.1.27.5.

3:26 PM Changeset in webkit [246218] by Michael Catanzaro
  • 1 edit in trunk/Source/WebCore/ChangeLog

Correct commit message for my previous commit

Brent didn't review this. It was unreviewed. Whoops!

3:24 PM Changeset in webkit [246217] by Justin Fan
  • 25 edits in trunk

[WebGPU] Remove GPUBuffer.setSubData and implement GPUDevice.createBufferMapped
https://bugs.webkit.org/show_bug.cgi?id=198591

Reviewed by Myles C. Maxfield.

Source/WebCore:

Remove GPUBuffer.setSubData from the WebGPU API.
Add GPUDevice.createBufferMapped to the WebGPU API.

Existing tests have been updated.

  • Modules/webgpu/WebGPUBuffer.cpp:

(WebCore::WebGPUBuffer::setSubData): Deleted.

  • Modules/webgpu/WebGPUBuffer.h:
  • Modules/webgpu/WebGPUBuffer.idl:
  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createBufferMapped const):

  • Modules/webgpu/WebGPUDevice.h:
  • Modules/webgpu/WebGPUDevice.idl:
  • platform/graphics/gpu/GPUBuffer.h:
  • platform/graphics/gpu/GPUCommandBuffer.h:
  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::tryCreateBuffer):

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

(WebCore::GPUBuffer::tryCreate):
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::state const):
(WebCore::GPUBuffer::mapOnCreation):
(WebCore::GPUBuffer::commandBufferCompleted):
(WebCore::GPUBuffer::copyStagingBufferToGPU):

Required to unmap GPUBuffers created with GPU-private storage.

(WebCore::GPUBuffer::unmap):
(WebCore::GPUBuffer::setSubData): Deleted.
(WebCore::GPUBuffer::reuseSubDataBuffer): Deleted.

LayoutTests:

GPUBuffer.setSubData has been removed from the WebGPU implementation.
GPUDevice.createBufferMapped has been added to the WebGPU implementation.
Replace all setSubData calls with appropriate replacements.

  • webgpu/blend-triangle-strip.html:
  • webgpu/blit-commands.html:
  • webgpu/buffer-command-buffer-races.html:
  • webgpu/buffer-resource-triangles.html:
  • webgpu/compute-squares.html:
  • webgpu/depth-enabled-triangle-strip.html:
  • webgpu/draw-indexed-triangles.html:
  • webgpu/js/webgpu-functions.js:

(createBufferWithData):
(async.mapWriteDataToBuffer):

  • webgpu/map-read-buffers-expected.txt:
  • webgpu/map-read-buffers.html:
  • webgpu/texture-triangle-strip.html:
  • webgpu/vertex-buffer-triangle-strip.html:
3:18 PM Changeset in webkit [246216] by Michael Catanzaro
  • 3 edits in trunk/Source/WebCore

Fix non-iOS build after r246205
https://bugs.webkit.org/show_bug.cgi?id=198657

Reviewed by Brent Fulgham.
<rdar://problem/51345064>

  • page/Quirks.cpp:
  • page/Quirks.h:
3:12 PM Changeset in webkit [246215] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

mediaDevices.enumerateDevices() doesn't list the system default audio devices with deviceId as "default"
https://bugs.webkit.org/show_bug.cgi?id=198577
<rdar://problem/51454067>

Reviewed by Eric Carlson.

Make the system default microphone/camera be the first in the list.
This ensures that getUserMedia without constraints will pick these devices.
This also ensures enumerateDevices will show these default devices as first in the list.
Make sure that a default device change will refresh the list.

For CoreAudioCaptureSource, we always add the default system input device in the list of capture devices.

Covered by manual testing.

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

(WebCore::toCaptureDevice):
(WebCore::AVCaptureDeviceManager::isMatchingExistingCaptureDevice):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevices):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::getDefaultDeviceID):
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):

2:49 PM Changeset in webkit [246214] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test fast/events/fire-mousedown-while-pressing-mouse-button.html is failing
https://bugs.webkit.org/show_bug.cgi?id=198679

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:55 PM Changeset in webkit [246213] by graouts@webkit.org
  • 7 edits
    2 adds in trunk

Restrict fast clicks everywhere to desktop content mode
https://bugs.webkit.org/show_bug.cgi?id=198610
<rdar://problem/50114230>

Reviewed by Dean Jackson.

Source/WebKit:

We now set a new allowsFastClicksEverywhere property on the WebPageProxy when the content mode changes, set to true
when we're in desktop browsing mode. We now check on this property to opt into the fast clicks everywhere behavior.

This patch had been reverted once because it yielded some regressions in existing tests, notably under
fast/events/touch/ios/content-observation. This updated patch addresses this by ensuring the gesture recognizers
used for double-tap-to-zoom are disabled in -[WKContentViewInteraction _didStartProvisionalLoadForMainFrame]
to ensure that two tests dispatching a tap at the same location don't yield the recognition of a double-tap
rathern than the recognition of two single taps.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::allowsFastClicksEverywhere const):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):
(_didStartProvisionalLoadForMainFrame):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

LayoutTests:

Add a new test that enables fast clicks but also sets a mobile content mode.

We also mark fast/visual-viewport/ios/min-scale-greater-than-one.html as non-flaky
since the flakiness was due to the fast clicks everywhere behavior being enabled on iPhone.

Finally, we can now remove the hack where ui.tap() in the Pointer Events utility returned
a promise with a one-second delay since the issue of double-taps being recognized instead of
two consecutive single taps across two tests has been resolved.

  • fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
  • fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • pointerevents/utils.js:
1:08 PM Changeset in webkit [246212] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

A MediaStreamTrack cannot modify whether being a capture track or not
https://bugs.webkit.org/show_bug.cgi?id=198669

Reviewed by Eric Carlson.

Add a boolean in MediaStreamTrack to store whether a track is a capture one or not.
This removes the need to always go through the private and its source.
As a track might change of source (for non capture track cases), this
also removes the possibility for a track to be capture and then no
longer capture.
No change of behavior.
See also rdar://problem/49444622.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::MediaStreamTrack):

  • Modules/mediastream/MediaStreamTrack.h:

(WebCore::MediaStreamTrack::isCaptureTrack const):

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

Add a RELEASE_ASSERT that removeAudioProducer should always be done in the main thread
https://bugs.webkit.org/show_bug.cgi?id=198668

Reviewed by Eric Carlson.

See rdar://problem/49444622 for background information.
No change of behavior.

  • dom/Document.cpp:

(WebCore::Document::removeAudioProducer):

11:54 AM Changeset in webkit [246210] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

AI should get GetterSetter structure from the base's GlobalObject for GetGetterSetterByOffset
https://bugs.webkit.org/show_bug.cgi?id=198581
<rdar://problem/51099753>

Reviewed by Saam Barati.

JSTests:

  • stress/global-object-proto-getter.js: Added.

(f):
(test):

Source/JavaScriptCore:

For GetGetterSetterByOffset, when the abstract interpreter fails to read the property
from the object, it gets the GetterSetter structure from the CodeBlock's global object.
However, that's not correct, since the global object for the base object might differ
from the CodeBlock's. Instead, we try to get the global object from the base, when it's
a constant object. Otherwise, we can't infer the value and only set the type.

  • dfg/DFGAbstractInterpreterInlines.h:

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

11:05 AM Changeset in webkit [246209] by bshafiei@apple.com
  • 8 edits in branches/safari-608.1.27-branch/Source/WebCore

Cherry-pick r246207. rdar://problem/51185518

Images are not resizing correctly when dragged to a message in 1/3 view
https://bugs.webkit.org/show_bug.cgi?id=198623
<rdar://problem/51185518>

Reviewed by Wenson Hsieh.

Mail's max-width: 100%; default style is in conflict with the preferred presentation size. This patch preserves the existing behaviour for Mail by
not setting the height (and rely on the width + aspect ratio).

  • editing/WebContentReader.h:
  • editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragmentForImageAttachment): (WebCore::WebContentReader::readImage): (WebCore::attachmentForFilePath): (WebCore::attachmentForData): (WebCore::WebContentReader::readFilePath): (WebCore::WebContentReader::readDataBuffer):
  • editing/gtk/EditorGtk.cpp: (WebCore::createFragmentFromPasteboardData):
  • editing/markup.cpp: (WebCore::createFragmentForImageAndURL):
  • editing/markup.h:
  • platform/Pasteboard.h: (WebCore::PasteboardWebContentReader::readFilePath): (WebCore::PasteboardWebContentReader::readImage): (WebCore::PasteboardWebContentReader::readDataBuffer):
  • platform/PasteboardItemInfo.h: (WebCore::PasteboardItemInfo::encode const): (WebCore::PasteboardItemInfo::decode):
  • platform/ios/PasteboardIOS.mm: (WebCore::Pasteboard::readPasteboardWebContentDataForType): (WebCore::Pasteboard::read): (WebCore::Pasteboard::readRespectingUTIFidelities):
  • platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::informationForItemAtIndex):

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

10:57 AM Changeset in webkit [246208] by bshafiei@apple.com
  • 3 edits in branches/safari-608.1.27-branch/Source/WebCore

Cherry-pick r246205. rdar://problem/51345064

Limit simulated mouse events on Google Maps to entering Street View
https://bugs.webkit.org/show_bug.cgi?id=198657
<rdar://problem/51345064>

Reviewed by Brent Fulgham.

  • page/Quirks.cpp: (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const): (WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):
  • page/Quirks.h:

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

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

Images are not resizing correctly when dragged to a message in 1/3 view
https://bugs.webkit.org/show_bug.cgi?id=198623
<rdar://problem/51185518>

Reviewed by Wenson Hsieh.

Mail's max-width: 100%; default style is in conflict with the preferred presentation size. This patch preserves the existing behaviour for Mail by
not setting the height (and rely on the width + aspect ratio).

  • editing/WebContentReader.h:
  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::createFragmentForImageAttachment):
(WebCore::WebContentReader::readImage):
(WebCore::attachmentForFilePath):
(WebCore::attachmentForData):
(WebCore::WebContentReader::readFilePath):
(WebCore::WebContentReader::readDataBuffer):

  • editing/gtk/EditorGtk.cpp:

(WebCore::createFragmentFromPasteboardData):

  • editing/markup.cpp:

(WebCore::createFragmentForImageAndURL):

  • editing/markup.h:
  • platform/Pasteboard.h:

(WebCore::PasteboardWebContentReader::readFilePath):
(WebCore::PasteboardWebContentReader::readImage):
(WebCore::PasteboardWebContentReader::readDataBuffer):

  • platform/PasteboardItemInfo.h:

(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readPasteboardWebContentDataForType):
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::readRespectingUTIFidelities):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::informationForItemAtIndex):

10:15 AM Changeset in webkit [246206] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Line should skip all vertical adjustment when running preferred width computation
https://bugs.webkit.org/show_bug.cgi?id=198642
<rdar://problem/51511043>

Reviewed by Antti Koivisto.

While layout triggers both horizontal and vertical aligment, preferred width computation should only do (logical)horizontal.
Make all vertical alignment computation optional in Line.

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::UncommittedContent::add):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
(WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
(WebCore::Layout::inlineItemHeight): Deleted.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Content::Run::Run):
(WebCore::Layout::Line::Line):
(WebCore::Layout::Line::close):
(WebCore::Layout::Line::removeTrailingTrimmableContent):
(WebCore::Layout::Line::moveLogicalLeft):
(WebCore::Layout::Line::trailingTrimmableWidth const):
(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendInlineContainerEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::inlineItemHeight const):

  • layout/inlineformatting/InlineLine.h:
10:11 AM Changeset in webkit [246205] by graouts@webkit.org
  • 3 edits in trunk/Source/WebCore

Limit simulated mouse events on Google Maps to entering Street View
https://bugs.webkit.org/show_bug.cgi?id=198657
<rdar://problem/51345064>

Reviewed by Brent Fulgham.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldDispatchSimulatedMouseEventsOnTarget const):

  • page/Quirks.h:
10:10 AM Changeset in webkit [246204] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Update sandboxes to address iokit-get-property errors
https://bugs.webkit.org/show_bug.cgi?id=198494
<rdar://problem/51322072> and <rdar://problem/50602737>

Reviewed by Per Arne Vollan.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
9:31 AM Changeset in webkit [246203] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=198663

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating expectations for flaky test
9:12 AM Changeset in webkit [246202] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

scrollingcoordinator/mac/nested-sticky.html is a flaky Timeout and ImageOnlyFailure
https://bugs.webkit.org/show_bug.cgi?id=198661

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating expectations for flaky test
8:44 AM Changeset in webkit [246201] by aestes@apple.com
  • 5 edits in trunk/Source/WebKit

process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
https://bugs.webkit.org/show_bug.cgi?id=196930
<rdar://problem/47819301>

Reviewed by Chris Dumez.

The ContentFilterDidBlockLoadForFrame message needs to be handled by ProvisionalPageProxy in
order to look up the blocked frame in the correct WebProcessProxy.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrameShared):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::contentFilterDidBlockLoadForFrame):
(WebKit::ProvisionalPageProxy::didReceiveMessage):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageProxy.h:
8:36 AM Changeset in webkit [246200] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Use const TabSize& instead of TabSize to avoid unnecessary copy.

Using const reference is a c++ feature to extend the life time of
a temporary object to the life time of the const reference which refers to it.

No behavioral changes.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-06-07

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setTabSize):

7:57 AM Changeset in webkit [246199] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GTK] GLContextEGL.h must be built with @no-unify
https://bugs.webkit.org/show_bug.cgi?id=198659

Unreviewed ARM build fix.

  • SourcesGTK.txt:
7:42 AM Changeset in webkit [246198] by wenson_hsieh@apple.com
  • 3 edits in trunk/Tools

[iOS] At least 6 API tests are failing due to an exception when writing NSAttributedString to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=198641
<rdar://problem/51266310>

Reviewed by Tim Horton.

Work around a bug in a lower-level framework, which currently prevents NSAttributedStrings from being written to
UIPasteboard by way of -[NSItemProvider registerObject:visibility:]. This is because, when saving a
representation of "public.rtfd" to disk, the default suggested filename (determined using CoreServices APIs
_UTTypeCreateSuggestedFilename and UTTypeCopyDescription) ends up being nil; UIKit then subsequently tries to
append nil as a path component using -URLByAppendingPathComponent:, which throws an exception. This only
reproduces on iOS simulator.

To work around this for the time being, simply avoid writing a representation of "public.rtfd" to disk. This
representation is actually ignored by most clients anyways (including WebKit), in favor of using
"com.apple.flat-rtfd".

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(applyWorkaroundToAllowWritingAttributedStringsToItemProviders):
(-[TestWKWebView initWithFrame:configuration:addToWindow:]):

7:17 AM Changeset in webkit [246197] by Antti Koivisto
  • 7 edits
    6 adds in trunk

position:fixed inside overflow positioning nodes is jumpy
https://bugs.webkit.org/show_bug.cgi?id=198647
<rdar://problem/51514437>

Reviewed by Frédéric Wang.

Source/WebCore:

Tests: scrollingcoordinator/ios/fixed-overflow-no-stacking-context-1.html

scrollingcoordinator/ios/fixed-overflow-no-stacking-context-2.html
scrollingcoordinator/ios/fixed-overflow-stacking-context-stationary.html

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/cocoa/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::applyLayerPositions):

Take deltas from positioning nodes into account.

  • page/scrolling/cocoa/ScrollingTreePositionedNode.h:
  • page/scrolling/cocoa/ScrollingTreePositionedNode.mm:

(WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const):

Rename since 'scrollOffset' has other meaning.

(WebCore::ScrollingTreePositionedNode::applyLayerPositions):
(WebCore::ScrollingTreePositionedNode::scrollOffsetSinceLastCommit const): Deleted.

  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::applyLayerPositions):

LayoutTests:

  • scrollingcoordinator/ios/fixed-overflow-no-stacking-context-1-expected.html: Added.
  • scrollingcoordinator/ios/fixed-overflow-no-stacking-context-1.html: Added.
  • scrollingcoordinator/ios/fixed-overflow-no-stacking-context-2-expected.html: Added.
  • scrollingcoordinator/ios/fixed-overflow-no-stacking-context-2.html: Added.
  • scrollingcoordinator/ios/fixed-overflow-stacking-context-stationary-expected.html: Added.
  • scrollingcoordinator/ios/fixed-overflow-stacking-context-stationary.html: Added.
7:12 AM Changeset in webkit [246196] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Unreviewed. Fix api used to release wpe_fdo_egl_exported_image in GTK

We are using the old deprecated API in AcceleratedBackingStoreWayland::displayBuffer().

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::displayBuffer):

3:54 AM Changeset in webkit [246195] by eocanha@igalia.com
  • 3 edits
    6 adds in trunk

[MSE][GStreamer] Avoid QUOTA_EXCEEDED_ERR when seeking to a buffered range just before the buffered one
https://bugs.webkit.org/show_bug.cgi?id=166620

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

This patch is fixing a seek to unbuffered range just before the buffered one.
For example, supposing a [120, 176) append has filled all the memory and then
a seek to 115.0 is done, a subsequent [115, 120) append would fail without
this fix. EvictCodedFrames() would return without actually evicting anything,
and appendBufferInternal will print "buffer full, failing with
QUOTA_EXCEEDED_ERR error" on GStreamer platforms instead of letting the new
[115, 120) append succeed.

This patch is based on an original patch by iivlev <iivlev@productengine.com>

Test: media/media-source/media-source-append-before-last-range-no-quota-exceeded.html

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::evictCodedFrames):
Removed the "only if there are buffered ranges *containing* the currentTime" condition
to enter into the second part of the eviction algorithm, which removes frames
starting from the duration of the media and going backwards down to currentPosition + 30.
The loop break condition has also been changed to deal with notFound currentTimeRange.

LayoutTests:

Added a test to check that, after the memory is filled by appending a continuous
range, a seek right before it and a new append can be done without getting a
QuotaExceededError on GStreamer ports. On the rest of the ports, QuotaExceededError
is never thrown and the expectations just check that the right buffered ranges
remain.

  • media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt: Added.
  • media/media-source/media-source-append-before-last-range-no-quota-exceeded.html: Added.
  • platform/gtk/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt: Added.
  • platform/wpe/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt: Added.
1:59 AM Changeset in webkit [246194] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] AVC1 decoding capabilities probing support
https://bugs.webkit.org/show_bug.cgi?id=198569

Patch by Philippe Normand <philn@igalia.com> on 2019-06-07
Reviewed by Xabier Rodriguez-Calvar.

When capabilities for an avc1 codec are requested, the registry scanner looks
for a compatible decoder for the given H.264 profile and level.

This new approach can be avoided by using the WEBKIT_GST_MAX_AVC1_RESOLUTION
environment variable. If supplied, the decoder capabilities won't be probed and
the codec will be advertised as supported if it complies with the contents of
the environment variable. The resolutions currently handled are specifically:
1080P, 720P and 480P. We don't handle framerate checking yet, so the implied
H.264 levels are assumed to be for 30FPS.

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::isCodecSupported const):
(WebCore::GStreamerRegistryScanner::areInputCapsAccepted const):
(WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const):

  • platform/graphics/gstreamer/GStreamerRegistryScanner.h:
1:27 AM Changeset in webkit [246193] by jh718.park@samsung.com
  • 23 edits
    6 adds in trunk

Implement tab-size with units
https://bugs.webkit.org/show_bug.cgi?id=179022

Reviewed by Simon Fraser.

This change is ported from Blink.
The committed revision is https://src.chromium.org/viewvc/blink?revision=189430&view=revision.

Additionally, this patch lets css "number" value be allowed as tab-size's property value,
not css "integer" value,
according to https://drafts.csswg.org/css-text-3/#tab-size-property.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text/inheritance-expected.txt:
  • web-platform-tests/css/css-text/parsing/tab-size-valid-expected.txt:
  • web-platform-tests/css/css-values/calc-numbers-expected.txt: Added.
  • web-platform-tests/css/css-values/calc-numbers.html: Added.

Source/WebCore:

Tests: css3/tab-size.html

imported/w3c/web-platform-tests/css/css-values/calc-numbers.html

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertTabSize):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTabSize):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::tabWidth const):

  • platform/graphics/TabSize.h: Added.

(WebCore::TabSize::TabSize):
(WebCore::TabSize::isSpaces const):
(WebCore::TabSize::widthInPixels const):
(WebCore::TabSize::operator bool const):
(WebCore::operator==):
(WebCore::operator!=):

  • platform/graphics/TextRun.cpp:
  • platform/graphics/TextRun.h:

(WebCore::TextRun::tabSize const):
(WebCore::TextRun::setTabSize):

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::tabSize const):
(WebCore::RenderStyle::setTabSize):
(WebCore::RenderStyle::initialTabSize):

  • rendering/style/StyleRareInheritedData.cpp:
  • rendering/style/StyleRareInheritedData.h:

LayoutTests:

  • TestExpectations:
  • css3/tab-size-expected.txt: Added.
  • css3/tab-size.html: Added.
  • fast/css/tab-size-expected.html:
  • fast/css/tab-size.html:
1:14 AM Changeset in webkit [246192] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] videorate issues with v4l2src
https://bugs.webkit.org/show_bug.cgi?id=198614

Reviewed by Xabier Rodriguez-Calvar.

Configure videorate to cope with the live stream provided by the
source element. Not doing so might lead to errors in the v4l2
buffer allocator.

  • platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:

(WebCore::GStreamerVideoCapturer::createConverter):

Jun 6, 2019:

11:26 PM Changeset in webkit [246191] by bshafiei@apple.com
  • 4 edits
    2 adds in branches/safari-608.1.27-branch

Cherry-pick r246096. rdar://problem/51375055

[ContentChangeObserver] Gmail text editing controls require two taps
https://bugs.webkit.org/show_bug.cgi?id=198541
<rdar://problem/51375055>

Reviewed by Simon Fraser.

Source/WebCore:

When the animation completes we should also check if the newly visible content is also clickable and report it accordingly.
When the animated content is not clickable, we need to proceed with click instead of stopping at hover.

Test: fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html

  • page/ios/ContentChangeObserver.cpp: (WebCore::isConsideredClickable): (WebCore::ContentChangeObserver::didFinishTransition): (WebCore::ContentChangeObserver::adjustObservedState): (WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope): (WebCore::ContentChangeObserver::StyleChangeScope::isConsideredClickable const): Deleted. -> Turn it into a static function so that didFinishTransition could call it as well.
  • page/ios/ContentChangeObserver.h:

LayoutTests:

  • fast/events/touch/ios/content-observation/100ms-delay-10ms-transition-on-mousemove-no-clickable.html: Added.

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

11:09 PM Changeset in webkit [246190] by aestes@apple.com
  • 5 edits in trunk/Source/WebCore

process-swap-on-navigation error when loading blocked website on iOS 12.2 only.
https://bugs.webkit.org/show_bug.cgi?id=196930
<rdar://problem/47819301>

Reviewed by Chris Dumez.

When the content filter blocks a navigation, it will continue to load the content filter
error page in the provisional web process. When dispatching didFailProvisionalLoad, we need
to specify WillContinueLoading::Yes so that WebKit presents the error page rather than
switching back to the committed web process.

Testing blocked by <https://webkit.org/b/198626>.

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::willHandleProvisionalLoadFailure):
(WebCore::ContentFilter::handleProvisionalLoadFailure):

  • loader/ContentFilter.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

  • loader/FrameLoader.h:
10:47 PM Changeset in webkit [246189] by Carlos Garcia Campos
  • 4 edits in trunk/Tools

REGRESSION(r244857): [GTK][WPE] Many tests are no longer run in the bots after r244857
https://bugs.webkit.org/show_bug.cgi?id=198607

Reviewed by Michael Catanzaro.

Since r244857 several test executables are compiled in the base tests directory instead of using their own sub
directory. Our scripts to run the tests rely on the tests location to decide whether to run them or not, or
determine the type of the tests.

  • Scripts/run-gtk-tests:

(GtkTestRunner): Rename TEST_DIRS as TEST_TARGETS and use the executable names for tests not in a subdirectory.
(GtkTestRunner._setup_testing_environment): Fix TestWebKitAccessibility directory name.
(GtkTestRunner.is_glib_test): Use the test name for the ones not using a subdirectory.
(GtkTestRunner.is_google_test): Ditto.

  • Scripts/run-wpe-tests:

(WPETestRunner): Rename TEST_DIRS as TEST_TARGETS and use the executable names for tests not in a subdirectory.
(WPETestRunner.is_glib_test): Use the test name for the ones not using a subdirectory.
(WPETestRunner.is_google_test): Ditto.

  • glib/api_test_runner.py:

(TestRunner): Rename TEST_DIRS as TEST_TARGETS.
(TestRunner._get_tests): Handle test targets which can now contain directories and executables.

10:46 PM Changeset in webkit [246188] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
https://bugs.webkit.org/show_bug.cgi?id=198561

Reviewed by Chris Dumez.

This is another regression of delaying the web process launch until the first load. If the session is restored
before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
those cases, the history item is not marked as restored from session. We need to ensure the session is restored
in the web process from the IPC message handler, by launching the initial process before the session is
restored.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::restoreFromSessionState):

10:14 PM Changeset in webkit [246187] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

RELEASE_ASSERT hit in CachedFrame constructor
https://bugs.webkit.org/show_bug.cgi?id=198625
<rdar://problem/49877867>

Reviewed by Geoffrey Garen.

This is a speculative fix, it appears the document is already detached from its
frame by the time we construct a CachedFrame for it when entering PageCache.

No new tests, because we do not know yet how this can be reproduced.

  • history/PageCache.cpp:

(WebCore::canCacheFrame):
Make a frame as ineligible for PageCache if:

  1. It does not have a document

or

  1. Its document is already detached from the frame

(WebCore::PageCache::addIfCacheable):
Destroy the render tree *before* we check if the page can enter page cache, in case
destroying the render tree has any side effects that could make the page ineligible
for Page Cache.

8:38 PM Changeset in webkit [246186] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Web Inspector: Timelines: only complete Composite records if the m_startedComposite (followup to r246142)
https://bugs.webkit.org/show_bug.cgi?id=198639

Reviewed by Matt Baker.

In r246142, an ASSERT was removed because it is possible for Web Inspector to be opened in
between willComposite and didComposite, meaning that previously the ASSERT would fire.

In order to properly handle this, we should replace the ASSERT with an if so that Web
Inspector doesn't even try to complete a Composite record if it was opened in that case.

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::didComposite):

8:29 PM Changeset in webkit [246185] by youenn@apple.com
  • 5 edits in trunk/Source/WebKit

Use an enumeration in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo callback
https://bugs.webkit.org/show_bug.cgi?id=198548

Reviewed by Eric Carlson.

Move from an Optional<bool> to an enum having three values to ease readability.

  • UIProcess/UserMediaPermissionCheckProxy.cpp:

(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
(WebKit::UserMediaPermissionCheckProxy::complete):

  • UIProcess/UserMediaPermissionCheckProxy.h:

(WebKit::UserMediaPermissionCheckProxy::invalidate):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged):
(WebKit::UserMediaPermissionRequestManagerProxy::startProcessingUserMediaPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
6:28 PM Changeset in webkit [246184] by youenn@apple.com
  • 15 edits in trunk

Allow WebKitTestRunner to terminate network process after it finishes service worker file operations
https://bugs.webkit.org/show_bug.cgi?id=198584

Reviewed by Geoffrey Garen.

Source/WebCore:

Add a promise-based internal API to store service worker registrations on disk.
Covered by updated test.

  • testing/Internals.cpp:

(WebCore::Internals::storeRegistrationsOnDisk):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/SWClientConnection.h:

(WebCore::SWClientConnection::storeRegistrationsOnDiskForTesting):

  • workers/service/server/RegistrationStore.cpp:

(WebCore::RegistrationStore::startSuspension):
(WebCore::RegistrationStore::closeDatabase):

  • workers/service/server/RegistrationStore.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::Connection::storeRegistrationsOnDisk):

  • workers/service/server/SWServer.h:

Source/WebKit:

Add IPC binding to new internal API.

  • NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::storeRegistrationsOnDiskForTesting):

  • WebProcess/Storage/WebSWClientConnection.h:

LayoutTests:

  • http/wpt/service-workers/service-worker-networkprocess-crash.html:
5:30 PM Changeset in webkit [246183] by commit-queue@webkit.org
  • 5 edits
    2 deletes in trunk

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

Causing test failures in 7 content-observation tests.
(Requested by ShawnRoberts on #webkit).

Reverted changeset:

"Restrict fast clicks everywhere to desktop content mode"
https://bugs.webkit.org/show_bug.cgi?id=198610
https://trac.webkit.org/changeset/246165

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

Avoid generating new XSLT-based document when already changing the document.
https://bugs.webkit.org/show_bug.cgi?id=198525
<rdar://problem/51393787>

Reviewed by Ryosuke Niwa.

We should not allow a pending XSLT transform to change the current document when
that current document is int he process of being replaced.

  • dom/Document.cpp:

(WebCore::Document::applyPendingXSLTransformsTimerFired):

5:14 PM Changeset in webkit [246181] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

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

Causes test failures (Requested by ShawnRoberts on #webkit).

Reverted changeset:

"[iOS] Update sandboxes to address iokit-get-property errors"
https://bugs.webkit.org/show_bug.cgi?id=198494
https://trac.webkit.org/changeset/246123

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

Web Inspector: Timelines: remove always disabled details sidebar navigation item
https://bugs.webkit.org/show_bug.cgi?id=198393

Reviewed by Timothy Hatcher.

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView):

4:37 PM Changeset in webkit [246179] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r245833): Timelines: CPU: JavaScript label is missing and JavaScript section of pie chart is black
https://bugs.webkit.org/show_bug.cgi?id=198627

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CPUTimelineView.js:

(WI.CPUTimelineView.displayNameForSampleType):

  • UserInterface/Views/CPUTimelineView.css:

(.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript):
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-javascript): Added.
(.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script): Deleted.

  • UserInterface/Views/CPUUsageCombinedView.css:

(.cpu-usage-combined-view > .graph > .range-chart .sample-type-javascript): Added.
(.cpu-usage-combined-view > .graph > .range-chart .sample-type-script): Deleted.
Use the enum string added in r245833 (sample-type-javascript) instead of what was there
before (sample-type-script).

  • UserInterface/Views/Variables.css:

(:root):
Rename --cpu-script-* to --cpu-javascript-*.

4:35 PM Changeset in webkit [246178] by Devin Rousso
  • 8 edits
    16 adds in trunk

Web Inspector: Formatter: pretty-print CSS using a Worker
https://bugs.webkit.org/show_bug.cgi?id=197829
<rdar://problem/36891532>

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

  • UserInterface/Proxies/FormatterWorkerProxy.js:

(WI.FormatterWorkerProxy.prototype.formatCSS): Added.

  • UserInterface/Workers/Formatter/FormatterWorker.js:

(FormatterWorker.prototype.formatCSS): Added.

  • UserInterface/Workers/Formatter/CSSFormatter.js: Added.

(CSSFormatter):
(CSSFormatter.prototype.get success):
(CSSFormatter.prototype.get formattedText):
(CSSFormatter.prototype.get sourceMapData):
(CSSFormatter.prototype._format):

  • UserInterface/Workers/Formatter/FormatterContentBuilder.js:

(FormatterContentBuilder.prototype.get currentLine): Added.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype._canUseFormatterWorker):
(WI.TextEditor.prototype._startWorkerPrettyPrint):

  • .eslintrc:

LayoutTests:

  • inspector/formatting/formatting-css.html: Added.
  • inspector/formatting/formatting-css-expected.txt: Added.
  • inspector/formatting/resources/css-tests/basic-expected.css: Added.
  • inspector/formatting/resources/css-tests/basic.css: Added.
  • inspector/formatting/resources/css-tests/gradient-expected.css: Added.
  • inspector/formatting/resources/css-tests/gradient.css: Added.
  • inspector/formatting/resources/css-tests/keyframes-expected.css: Added.
  • inspector/formatting/resources/css-tests/keyframes.css: Added.
  • inspector/formatting/resources/css-tests/media-query-expected.css: Added.
  • inspector/formatting/resources/css-tests/media-query.css: Added.
  • inspector/formatting/resources/css-tests/selectors-expected.css: Added.
  • inspector/formatting/resources/css-tests/selectors.css: Added.
  • inspector/formatting/resources/css-tests/wrapping-expected.css: Added.
  • inspector/formatting/resources/css-tests/wrapping.css: Added.
  • inspector/formatting/resources/utilities.js:

(TestPage.registerInitializer.runFormattingTest):

4:31 PM Changeset in webkit [246177] by Devin Rousso
  • 9 edits in trunk/Source

Web Inspector: create CommandLineAPIHost lazily like the other agents
https://bugs.webkit.org/show_bug.cgi?id=196047
<rdar://problem/49087835>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/InjectedScriptManager.h:
  • inspector/InjectedScriptManager.cpp:

(Inspector::InjectedScriptManager::connect): Added.

Source/WebCore:

No change in functionality.

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::createLazyAgents):

  • inspector/WorkerInspectorController.cpp:

(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::createLazyAgents):

  • inspector/WebInjectedScriptManager.h:
  • inspector/WebInjectedScriptManager.cpp:

(WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
(WebCore::WebInjectedScriptManager::connect): Added.
(WebCore::WebInjectedScriptManager::disconnect):
(WebCore::WebInjectedScriptManager::discardInjectedScripts):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::setInspectedNode):

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

Web Inspector: Elements: print/rulers/compositing/paint navigation items shouldn't be visible if the inspected target doesn't have a PageAgent
https://bugs.webkit.org/show_bug.cgi?id=198410

Reviewed by Timothy Hatcher.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.get navigationItems):
(WI.DOMTreeContentView.prototype._showRulersChanged):

4:19 PM Changeset in webkit [246175] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r243270) [ iOS Sim Release ] Layout Test imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers.htm is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=198573
<rdar://problem/51447519>

Unreviewed.

  • platform/ios-simulator-wk2/TestExpectations:

Marking test as slow.

4:00 PM Changeset in webkit [246174] by ggaren@apple.com
  • 2 edits in trunk/Source/WebKit

Crash using WKHTTPCookieStore when you use WKWebView and UIWebView in the same app
https://bugs.webkit.org/show_bug.cgi?id=198622

Reviewed by Chris Dumez.

Today in a WWDC lab, I saw some crash reports from an app that mixed
WKWebView and UIWebView. The proximate cause of the crash is that
WKHTTPCookieStore queues a callOnMainThread function, and then
UIWebView dequeues it on the WebThread.

No test because this crash depends on mixing WKWebView and UIWebView and
getting (un)lucky on the timing.

  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookies):
(API::HTTPCookieStore::deleteCookie): Avoid using callOnMainThread
becuase it is prohibited in the UI process.

3:34 PM Changeset in webkit [246173] by Keith Rollin
  • 6 edits in trunk/Tools

Remove SSL-based tests from TestWebKitAPI on some configurations
https://bugs.webkit.org/show_bug.cgi?id=198551
<rdar://problem/51424996>

Reviewed by Jonathan Bedard.

Not all platforms have SSL handy, so don't include SSL-based tests on
those platforms.

  • TestWebKitAPI/TCPServer.cpp:
  • TestWebKitAPI/TCPServer.h:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
  • TestWebKitAPI/config.h:
3:08 PM Changeset in webkit [246172] by Kocsen Chung
  • 7 edits in branches/safari-608.1.27-branch/Source

Versioning.

3:03 PM Changeset in webkit [246171] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.27.4

Tag Safari-608.1.27.4.

2:56 PM Changeset in webkit [246170] by Said Abou-Hallawa
  • 4 edits
    2 adds in trunk

REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute
https://bugs.webkit.org/show_bug.cgi?id=198576

Reviewed by Simon Fraser.

Source/WebCore:

Firing the load event should only happen when dynamic update changes the
attribute 'externalResourcesRequired'. Animating this attribute should
not fire the load event.

When stopping the animations, applyAnimatedPropertyChange() should be
called first then stopAnimation() is called second. The target element
should know that its svgAttributeChanged() is called because of animating
the attribute. So it can differentiate this case from the dynamic update.

Test: svg/animations/animate-externalResourcesRequired-no-load-event.html

  • svg/SVGExternalResourcesRequired.cpp:

(WebCore::SVGExternalResourcesRequired::svgAttributeChanged):

  • svg/properties/SVGAnimatedPropertyAnimator.h:

LayoutTests:

  • svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt: Added.
  • svg/animations/animate-externalResourcesRequired-no-load-event.html: Added.
1:23 PM Changeset in webkit [246169] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

1:21 PM Changeset in webkit [246168] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.28

Tag Safari-608.1.28.

1:15 PM Changeset in webkit [246167] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Remove duplicated websiteDataStoreParameters code from WebsitePoliciesData::applyToDocumentLoader()
https://bugs.webkit.org/show_bug.cgi?id=198608

Patch by Antoine Quint <Antoine Quint> on 2019-06-06
Reviewed by Wenson Hsieh.

Due to a rebasing error, r244218 re-introduced code that was removed in r244197. This patch removes this code for good.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::applyToDocumentLoader):

1:11 PM Changeset in webkit [246166] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix typo in cageWithoutUntagging
https://bugs.webkit.org/show_bug.cgi?id=198617

Reviewed by Saam Barati.

  • assembler/testmasm.cpp:

(JSC::testCagePreservesPACFailureBit):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cageWithoutUntagging):
(JSC::AssemblyHelpers::cageConditionally):
(JSC::AssemblyHelpers::cageWithoutUntaging): Deleted.

12:45 PM BuildingGtk edited by Basuke Suzuki
Remove + (diff)
12:32 PM Changeset in webkit [246165] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Restrict fast clicks everywhere to desktop content mode
https://bugs.webkit.org/show_bug.cgi?id=198610
<rdar://problem/50114230>

Patch by Antoine Quint <Antoine Quint> on 2019-06-06
Reviewed by Dean Jackson.

Source/WebKit:

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::allowsFastClicksEverywhere const):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _handleSmartMagnificationInformationForPotentialTap:renderRect:fitEntireRect:viewportMinimumScale:viewportMaximumScale:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

LayoutTests:

Add a new test that enables fast clicks but also sets a mobile content mode.

  • fast/events/ios/ipad/fast-click-always-mobile-content-mode-expected.txt: Added.
  • fast/events/ios/ipad/fast-click-always-mobile-content-mode.html: Added.
12:27 PM Changeset in webkit [246164] by dbates@webkit.org
  • 2 edits in trunk/Tools

[lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with
non-default port number
https://bugs.webkit.org/show_bug.cgi?id=198618

Reviewed by Brent Fulgham.

WebCoreSecurityOriginProvider.port() returns an int data type. We need to explicitly convert this to
a string before we concatenate it with another string when building the string representation
for the WebCore::SecurityOrigin object. Otherwise, Python complains that we are concatenating a str
with an int and we don't get a pretty-printed representation for WebCore::SecurityOrigin.

  • lldb/lldb_webkit.py:

(WebCoreSecurityOriginProvider.to_string): Call str() on the port before concatenting it.

12:15 PM Changeset in webkit [246163] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

NetworkHTTPSUpgradeChecker should construct and destruct database on the background thread
https://bugs.webkit.org/show_bug.cgi?id=198496

Reviewed by Chris Dumez.

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::~NetworkHTTPSUpgradeChecker):

  • NetworkProcess/NetworkHTTPSUpgradeChecker.h:
12:07 PM Changeset in webkit [246162] by commit-queue@webkit.org
  • 4 edits in trunk

JSON.parse throws incorrect exception when called w/o arguments
https://bugs.webkit.org/show_bug.cgi?id=198574

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-06-06
Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Always coerce first argument to string and attempt to parse it.
(steps 1-2 of https://tc39.github.io/ecma262/#sec-json.parse)

  • runtime/JSONObject.cpp:

(JSC::JSONProtoFuncParse): Remove argumentCount check.

LayoutTests:

SyntaxError should be thrown if JSON.parse is called w/o arguments.
(steps 1-2 of https://tc39.github.io/ecma262/#sec-json.parse)

  • js/dom/JSON-parse-expected.txt:
11:54 AM Changeset in webkit [246161] by Jonathan Bedard
  • 2 edits in trunk/Tools

Remove obsolete TOOLCHAINS overrides from as asan.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=198613

Reviewed by Alexey Proskuryakov.

  • asan/asan.xcconfig: XCBuild doesn't support overriding toolchains.
11:45 AM Changeset in webkit [246160] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unrevied build fix for FTL without Gigacage.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

11:44 AM Changeset in webkit [246159] by Jonathan Bedard
  • 5 edits in trunk/Tools

webkitpluginhost: Support ASan as a style
https://bugs.webkit.org/show_bug.cgi?id=198586
<rdar://problem/51459088>

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/base.py:

(Port.configuration_for_upload): Add ASan as a style.

  • Scripts/webkitpy/port/config.py:

(Config._read_configuration):
(Config):
(Config.asan): Add property to check if the ASan configuration is active.

  • Scripts/webkitpy/port/config_unittest.py:

(ConfigTest.test_default_configurationscripterror):
(ConfigTest):
(ConfigTest.test_asan):

  • Scripts/webkitpy/test/main.py:

(Tester._run_tests): Add Asan as a style.

10:18 AM WebKitGTK/2.24.x edited by cturner@igalia.com
This is an important bug fix for MSE, especially on YouTube (diff)
9:53 AM Changeset in webkit [246158] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Move baseline and line height computation to a dedicated function
https://bugs.webkit.org/show_bug.cgi?id=198611
<rdar://problem/51482708>

Reviewed by Antti Koivisto.

This is in preparation for adding vertical aligment.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):

  • layout/inlineformatting/InlineLine.h:
9:50 AM Changeset in webkit [246157] by Truitt Savell
  • 17 edits
    6 deletes in trunk/Source/WebKit

Unreviewed, rolling out r246137.

Broke internal builds.

Reverted changeset:

"Introduce new SPI for context menus on iOS"
https://bugs.webkit.org/show_bug.cgi?id=198590
https://trac.webkit.org/changeset/246137

9:39 AM Changeset in webkit [246156] by Antti Koivisto
  • 9 edits
    2 adds in trunk

Position fixed is buggy with overflow:auto scrolling inside iframes
https://bugs.webkit.org/show_bug.cgi?id=154399
<rdar://problem/24742251>

Reviewed by Frederic Wang and Simon Fraser.

Source/WebCore:

Test: scrollingcoordinator/ios/fixed-frame-overflow-swipe.html

After layer tree commit we were calling mainFrameViewportChangedViaDelegatedScrolling (even if viewport did not change)
and expecting it to apply UI side scrolling deltas. However optimization prevents it from descending into subframes
and we fail to update those properly.

In reality we only need to to apply scrolling tree positiong after commit if there has been delegated scrolling after the last
one. Track this and do full update when needed.

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::applyLayerPositionsAfterCommit):

Add specific function for this. Don't do anything unless needed.

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::didScrollByDelegatedScrolling):

Track if there has been any delegated scrolling.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling):

We can now bail out if nothing changes since we no longer rely on this for post-commit updates.

Source/WebKit:

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

Remove viewportChangedViaDelegatedScrolling call as we were just relying on its side effect of (partially) applying
the scrolling tree. Instead call the new applyScrollingTreeLayerPositionsAfterCommit() unconditionally.
It only does work if there are local deltas to apply.

Local deltas will potentially need to be applied in non-fixed cases too and it is hard to reason about the conditions.

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositionsAfterCommit):
(WebKit::RemoteScrollingCoordinatorProxy::applyScrollingTreeLayerPositions): Deleted.

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:

LayoutTests:

  • scrollingcoordinator/ios/fixed-frame-overflow-swipe-expected.html: Added.
  • scrollingcoordinator/ios/fixed-frame-overflow-swipe.html: Added.
9:34 AM Changeset in webkit [246155] by ap@apple.com
  • 2 edits in trunk/Tools

block-spammers tool doesn't block e-mail
https://bugs.webkit.org/show_bug.cgi?id=198570

Reviewed by Jonathan Bedard.

  • Scripts/block-spammers: (disable_user): Corrected the parameters, Bugzilla doesn't

recognize "false" here. Also, request body is unnecessary.

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

[LFC][IFC] Layout and preferred width computation should both call placeInlineItems().
https://bugs.webkit.org/show_bug.cgi?id=198587
<rdar://problem/51460340>

Reviewed by Antti Koivisto.

This patch enables inline placement logic sharing between layout and preferred width computation.

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):

7:12 AM Changeset in webkit [246153] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview/Safari Technology Preview 84

Added a tag for Safari Technology Preview release 84.

6:51 AM Changeset in webkit [246152] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

[WPE][GTK] Clean up use of initiatingPageID in implementation of webkit_uri_scheme_request_get_web_view()
https://bugs.webkit.org/show_bug.cgi?id=198564

Reviewed by Carlos Garcia Campos.

Note that we have to use RefPtr rather than Ref here because the priv struct has to remain
default-constructible.

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkitURISchemeRequestCreate):
(webkit_uri_scheme_request_get_web_view):

6:41 AM Changeset in webkit [246151] by Michael Catanzaro
  • 2 edits in trunk/Source/JavaScriptCore

aarch64: ‘JSC::ARM64Assembler::LinkRecord::<unnamed union>::RealTypes::m_compareRegister’ is too small to hold all values of ‘JSC::ARM64Assembler::RegisterID’ {aka ‘enum JSC::ARM64Registers::RegisterID’}
https://bugs.webkit.org/show_bug.cgi?id=198014

Reviewed by Yusuke Suzuki.

When building for aarch64, there is a huge warning spam here. It's impossible to see any
other warnings. This has been ongoing for so long I've begun to suspect that nobody works
on this architecture.

Anyway, the problem is because we need eight bits to store all possible RegisterID values,
but the bitfield is only six bits wide. Fix it. The COMPILE_ASSERT checking the size of this
struct is still happy, so I presume the change is OK.

  • assembler/ARM64Assembler.h:
6:20 AM Changeset in webkit [246150] by keith_miller@apple.com
  • 20 edits in trunk/Source

Reenable Gigacage on ARM64.
https://bugs.webkit.org/show_bug.cgi?id=198453

Reviewed by Michael Saboff.

Source/bmalloc:

  • bmalloc/Gigacage.h:

Source/JavaScriptCore:

This patch adds back Gigacaging on Apple's ARM64 ports. Unlike the
old Gigacage however, arm64e uses both Gigacaging and PAC. In
order to ensure the PAC bits are not stripped in the caging
process we use the bit field insert instruction to take the low
bits from caging and the high bits from the PAC authentication.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::bitFieldInsert64):

  • assembler/MacroAssemblerARM64E.h:
  • assembler/testmasm.cpp:

(JSC::testCagePreservesPACFailureBit):
(JSC::run):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::jumpForTypedArrayIsNeuteredIfOutOfBounds):
(JSC::DFG::SpeculativeJIT::cageTypedArrayStorage):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cageWithoutUntaging):
(JSC::AssemblyHelpers::cageConditionally):
(JSC::AssemblyHelpers::cage): Deleted.

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/arm64.rb:
  • offlineasm/instructions.rb:
  • offlineasm/registers.rb:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::AirIRGenerator::addCallIndirect):

  • wasm/WasmB3IRGenerator.cpp:

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

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

4:34 AM Changeset in webkit [246149] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Pointer Events] Add support for chorded button interactions
https://bugs.webkit.org/show_bug.cgi?id=198462

Unreviewed, rebaselining this test for WK1.

  • platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:
4:34 AM Changeset in webkit [246148] by Carlos Garcia Campos
  • 5 edits
    2 adds in trunk

[GTK][WPE] Enable PSON
https://bugs.webkit.org/show_bug.cgi?id=194979

Reviewed by Žan Doberšek.

Source/WebKit:

  • Shared/WebPreferencesDefaultValues.h:

Tools:

Add WPEBackend-fdo patch required for PSON to work. It can be removed once we have a new version to depend on.

  • gtk/jhbuild.modules:
  • gtk/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch: Added.
  • wpe/jhbuild.modules:
  • wpe/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch: Added.
2:31 AM Changeset in webkit [246147] by msaboff@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[ARM64E]: Add disassembler support for authenticated instructions
https://bugs.webkit.org/show_bug.cgi?id=198562

Reviewed by Keith Miller.

Added support for all the instructions supported in ARM64EAssembler.h.

  • disassembler/ARM64/A64DOpcode.cpp:

(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::format):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing2Source::format):
(JSC::ARM64Disassembler::A64DOpcodeHint::format):
(JSC::ARM64Disassembler::A64DOpcodeHint::opName):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::format):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::authOpName):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::format):

  • disassembler/ARM64/A64DOpcode.h:

(JSC::ARM64Disassembler::A64DOpcodeDataProcessing2Source::opNameIndex):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::opName):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::opNum):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::mBit):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::sBit):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::wBit):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreAuthenticated::immediate10):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::authOpCode):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::op2):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::op3):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::op4):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::mBit):
(JSC::ARM64Disassembler::A64DOpcodeUnconditionalBranchRegister::rm):
(JSC::ARM64Disassembler::A64DOpcodeHint::opName): Deleted.

1:58 AM Changeset in webkit [246146] by Caio Lima
  • 2 edits in trunk/Source/WTF

[JSCOnly] JSCOnly port is not building on macOS
https://bugs.webkit.org/show_bug.cgi?id=198563

Reviewed by Don Olmstead.

We are adding <mach/vm_types.h> to fix build issues when compiling
JSCOnly port on macOS.

  • wtf/WTFAssertions.cpp:

Jun 5, 2019:

10:21 PM Changeset in webkit [246145] by mitz@apple.com
  • 83 moves in releases/Apple/Safari Technology Preview

Moved Safari Technology Preview releases into their own subdirectory.

10:21 PM Changeset in webkit [246144] by mitz@apple.com
  • 1 add in releases/Apple/Safari Technology Preview

Prepared to move Safari Technology Preview releases into their own subdirectory.

8:55 PM Changeset in webkit [246143] by commit-queue@webkit.org
  • 7 edits
    3 adds in trunk

[Curl] Report all request headers to web inspector.
https://bugs.webkit.org/show_bug.cgi?id=191653

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-06-05
Reviewed by Fujii Hironori.

Source/WebCore:

Test: http/tests/inspector/network/resource-request-headers.html

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::setDebugCallbackFunction):

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didReceiveDebugInfo):
(WebCore::CurlRequest::updateNetworkLoadMetrics):
(WebCore::CurlRequest::didReceiveDebugInfoCallback):

  • platform/network/curl/CurlRequest.h:

LayoutTests:

  • platform/wincairo/TestExpectations:
  • platform/wincairo/http/tests/inspector/network/resource-request-headers-expected.txt: Added.
8:39 PM Changeset in webkit [246142] by commit-queue@webkit.org
  • 11 edits in trunk/Source

[Cocoa] REGRESSION(r244182): Inspector thinks CA commits can be nested
https://bugs.webkit.org/show_bug.cgi?id=198497

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-06-05
Reviewed by Simon Fraser.

Source/WebCore:

WebInspecter should coalesce nested composites as one recorded composite.
This can be done by ensuring that we only process CA preCommit and postCommit
once per nested commits.

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::willComposite):

  • inspector/InspectorController.h:

Export willComposite(). We want to call willComposite()/ didComposite()
from CA preCommit and postCommit handlers in flushLayers().

  • inspector/agents/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::didComposite):
Unrelated change: didComposite() should not assert that we're in the middle
of a composite. Web Inspector may connect in the middle of a composite.

  • page/FrameView.cpp:

(WebCore::FrameView::flushCompositingStateIncludingSubframes):
InspectorController::willComposite() will be called form CA preCommit
handler of flushLayers().

Source/WebKit:

Call InspectorController::willComposite() from the CA preCommit handler
similar to the call to InspectorController::didComposite() in the CA
postCommit handler. Ensure these calls will be once for nested commits.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::firstFlushAfterCommit const):
(WebKit::WebPage::setFirstFlushAfterCommit):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

8:24 PM Changeset in webkit [246141] by aestes@apple.com
  • 5 edits
    1 move in trunk/Tools

[macOS] Stop calling -[NSDraggingItem setItem:]
https://bugs.webkit.org/show_bug.cgi?id=198588
<rdar://problem/48297453>

On macOS Catalina, use -[NSDraggingItem _initWithItem:] instead.

Reviewed by Wenson Hsieh.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Fixed up file paths in the

TestRunnerShared group.

  • DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:

(-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
Changed to call -[NSDraggingItem _initWithItem:] when available.

  • TestRunnerShared/spi/AppKitTestSPI.h: Renamed from

Tools/DumpRenderTree/mac/AppKitTestSPI.h and moved NSDraggingItem internal interface
declarations here from DumpRenderTree.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Added TestRunnerShared/spi/AppKitTestSPI.h.

  • TestWebKitAPI/mac/TestDraggingInfo.mm:

(-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
Changed to call -[NSDraggingItem _initWithItem:] when available.

8:20 PM Changeset in webkit [246140] by commit-queue@webkit.org
  • 6 edits in trunk/Websites/bugs.webkit.org

Add support of zxcvbn password strength checker to bugs.webkit.org website.
https://bugs.webkit.org/show_bug.cgi?id=198391
rdar://problem/51278166

Patch by Ling Ho <lingcherd_ho@apple.com> on 2019-06-05
Reviewed by David Kilzer.

  • Bugzilla/Config/Auth.pm:

(get_param_list):

  • Bugzilla/Install/Requirements.pm:

(REQUIRED_MODULES):

  • Bugzilla/User.pm:

(validate_password_check):

  • template/en/default/admin/params/auth.html.tmpl:
  • template/en/default/global/user-error.html.tmpl:
8:14 PM Changeset in webkit [246139] by justin_michaud@apple.com
  • 18 edits
    3 adds
    1 delete in trunk

[WASM-References] Add support for Anyref tables, Table.get and Table.set (for Anyref only).
https://bugs.webkit.org/show_bug.cgi?id=198398

Reviewed by Saam Barati.

JSTests:

  • wasm/references/anyref_table.js: Added.

(string_appeared_here.doGCSet):
(doGCTest):
(doGCSet.doGCTest.let.count.0.doBarrierSet):

  • wasm/references/anyref_table_import.js: Added.

(makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl.makeImport):
(string_appeared_here.fullGC.assert.eq.1.exports.get_tbl):

  • wasm/references/is_null_error.js: Removed.
  • wasm/references/validation.js: Added.

(assert.throws.new.WebAssembly.Module.bin):
(assert.throws):

  • wasm/wasm.json:

Source/JavaScriptCore:

Create a new table subtype called FuncRefTable (note: Anyfunc was renamed to Funcref in the references spec).
Table now write-barriers and visits its children's wrapper objects. FuncRefTable caches some extra data to
support calling from wasm. A JSWebAssemblyTable is required to set an anyref element, but this is only because
we need to write barrier it (so it should not restrict how we implement threads). This patch does, however,
restrict the implementation of function references to require every Ref.func to have an associated wrapper. This
can be done statically, so this too should not restrict our threads implementation.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addCallIndirect):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addLocal):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmFormat.h:

(JSC::Wasm::TableInformation::TableInformation):
(JSC::Wasm::TableInformation::type const):

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseTableHelper):

  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::Table):
(JSC::Wasm::Table::tryCreate):
(JSC::Wasm::Table::grow):
(JSC::Wasm::Table::clear):
(JSC::Wasm::Table::set):
(JSC::Wasm::Table::get):
(JSC::Wasm::Table::visitChildren):
(JSC::Wasm::FuncRefTable::FuncRefTable):
(JSC::Wasm::FuncRefTable::setFunction):
(JSC::Wasm::Table::~Table): Deleted.
(JSC::Wasm::Table::clearFunction): Deleted.
(JSC::Wasm::Table::setFunction): Deleted.

  • wasm/WasmTable.h:

(JSC::Wasm::Table::length const):
(JSC::Wasm::Table::type const):
(JSC::Wasm::Table::setOwner):
(JSC::Wasm::FuncRefTable::offsetOfFunctions):
(JSC::Wasm::FuncRefTable::offsetOfInstances):
(JSC::Wasm::Table::offsetOfFunctions): Deleted.
(JSC::Wasm::Table::offsetOfInstances): Deleted.

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addTableGet):
(JSC::Wasm::Validate::addTableSet):
(JSC::Wasm::Validate::addCallIndirect):

  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::finishCreation):
(JSC::JSWebAssemblyTable::visitChildren):
(JSC::JSWebAssemblyTable::grow):
(JSC::JSWebAssemblyTable::get):
(JSC::JSWebAssemblyTable::set):
(JSC::JSWebAssemblyTable::clear):
(JSC::JSWebAssemblyTable::getFunction): Deleted.
(JSC::JSWebAssemblyTable::clearFunction): Deleted.
(JSC::JSWebAssemblyTable::setFunction): Deleted.

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

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/js/WebAssemblyTablePrototype.cpp:

(JSC::webAssemblyTableProtoFuncGet):
(JSC::webAssemblyTableProtoFuncSet):

  • wasm/wasm.json:
7:17 PM Changeset in webkit [246138] by mmaxfield@apple.com
  • 12 edits
    35 adds in trunk

[WHLSL] Educate the property resolver about IndexExpressions
https://bugs.webkit.org/show_bug.cgi?id=198399

Reviewed by Saam Barati.

Source/WebCore:

This is part one of two patches which will allow buffers to work. This patch
adds support in the property resolver for index expressions. Index expressions
get turned into calls to "getter indexers", "setter indexers", or "ander
indexers". They work almost identically to dot expressions, except there is an
extra "index" expression which gets turned into an extra argument to those
functions.

There's actually a bit of a trick here. Let's say we need to run a getter and
a setter separately (e.g. "foo[3]++;"). The index expression can't be duplicated
for both the getter and the setter (e.g. the functions are
int operator[](Foo, uint) and Foo operator[]=(Foo, uint, int), and we aren't
allowed to execute the index expression multiple times. Consider if that "3"
in the example is actually "bar()" with some side effect. So, we have to run
the index expression once at the correct time, and save its result to a temporary
variable, and then pass in the temporary variable into the getter and setter.

So, if the code says "foo[bar()][baz()] = quux();" the following sequence of
functions get run:

  • bar()
  • operator[](Foo, uint)
  • baz()
  • quux()
  • operator[]=(OtherType, uint, OtherOtherType)
  • operator[]=(Foo, uint, OtherType)

The next patch will modify the WebGPU JavaScript implementation to send buffer
lengths to the shader, and for the shader compiler to correctly unpack this
information and place it inside the array references. That should be everything
that's needed to get buffers to work. After that, hooking up compute should be
fairly trivial.

Tests: webgpu/propertyresolver/ander-abstract-lvalue.html

webgpu/propertyresolver/ander-lvalue-3-levels.html
webgpu/propertyresolver/ander-lvalue.html
webgpu/propertyresolver/ander.html
webgpu/propertyresolver/getter.html
webgpu/propertyresolver/indexer-ander-abstract-lvalue.html
webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html
webgpu/propertyresolver/indexer-ander-lvalue.html
webgpu/propertyresolver/indexer-ander.html
webgpu/propertyresolver/indexer-getter.html
webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html
webgpu/propertyresolver/indexer-setter-abstract-lvalue.html
webgpu/propertyresolver/indexer-setter-lvalue.html
webgpu/propertyresolver/indexer-setter.html
webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html
webgpu/propertyresolver/setter-abstract-lvalue.html
webgpu/propertyresolver/setter-lvalue.html

  • Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:

(WebCore::WHLSL::AST::toString):

  • Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:

(WebCore::WHLSL::AST::toString):

  • Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:

(WebCore::WHLSL::AST::IndexExpression::takeIndex):

  • Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
  • Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:

(WebCore::WHLSL::Metal::writeNativeFunction):
(WebCore::WHLSL::Metal::convertAddressSpace): Deleted.

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::checkOperatorOverload):
(WebCore::WHLSL::Checker::finishVisiting):
(WebCore::WHLSL::Checker::visit):

  • Modules/webgpu/WHLSL/WHLSLInferTypes.h:
  • Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:

(WebCore::WHLSL::PropertyResolver::visit):
(WebCore::WHLSL::setterCall):
(WebCore::WHLSL::getterCall):
(WebCore::WHLSL::modify):
(WebCore::WHLSL::PropertyResolver::simplifyRightValue):
(WebCore::WHLSL::LeftValueSimplifier::finishVisiting):
(WebCore::WHLSL::LeftValueSimplifier::visit):

  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:

(WebCore::WHLSL::synthesizeStructureAccessors):

LayoutTests:

  • webgpu/propertyresolver/ander-abstract-lvalue-expected.html: Added.
  • webgpu/propertyresolver/ander-abstract-lvalue.html: Added.
  • webgpu/propertyresolver/ander-expected.html: Added.
  • webgpu/propertyresolver/ander-lvalue-3-levels-expected.html: Added.
  • webgpu/propertyresolver/ander-lvalue-3-levels.html: Added.
  • webgpu/propertyresolver/ander-lvalue-expected.html: Added.
  • webgpu/propertyresolver/ander-lvalue.html: Added.
  • webgpu/propertyresolver/ander.html: Added.
  • webgpu/propertyresolver/getter-expected.html: Added.
  • webgpu/propertyresolver/getter.html: Added.
  • webgpu/propertyresolver/indexer-ander-abstract-lvalue-expected.html: Added.
  • webgpu/propertyresolver/indexer-ander-abstract-lvalue.html: Added.
  • webgpu/propertyresolver/indexer-ander-expected.html: Added.
  • webgpu/propertyresolver/indexer-ander-lvalue-3-levels-expected.html: Added.
  • webgpu/propertyresolver/indexer-ander-lvalue-3-levels.html: Added.
  • webgpu/propertyresolver/indexer-ander-lvalue-expected.html: Added.
  • webgpu/propertyresolver/indexer-ander-lvalue.html: Added.
  • webgpu/propertyresolver/indexer-ander.html: Added.
  • webgpu/propertyresolver/indexer-getter-expected.html: Added.
  • webgpu/propertyresolver/indexer-getter.html: Added.
  • webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels-expected.html: Added.
  • webgpu/propertyresolver/indexer-setter-abstract-lvalue-3-levels.html: Added.
  • webgpu/propertyresolver/indexer-setter-abstract-lvalue-expected.html: Added.
  • webgpu/propertyresolver/indexer-setter-abstract-lvalue.html: Added.
  • webgpu/propertyresolver/indexer-setter-expected.html: Added.
  • webgpu/propertyresolver/indexer-setter-lvalue-expected.html: Added.
  • webgpu/propertyresolver/indexer-setter-lvalue.html: Added.
  • webgpu/propertyresolver/indexer-setter.html: Added.
  • webgpu/propertyresolver/setter-abstract-lvalue-3-levels-expected.html: Added.
  • webgpu/propertyresolver/setter-abstract-lvalue-3-levels.html: Added.
  • webgpu/propertyresolver/setter-abstract-lvalue-expected.html: Added.
  • webgpu/propertyresolver/setter-abstract-lvalue.html: Added.
  • webgpu/propertyresolver/setter-lvalue-expected.html: Added.
  • webgpu/propertyresolver/setter-lvalue.html: Added.
7:10 PM Changeset in webkit [246137] by achristensen@apple.com
  • 17 edits
    6 adds in trunk/Source/WebKit

Introduce new SPI for context menus on iOS
https://bugs.webkit.org/show_bug.cgi?id=198590

Reviewed by Tim Horton.

Also introduce WKContextMenuElementInfo which is API.
This is part of <rdar://problem/51003503>

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

(API::Object::newObject):

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContextMenuElementInfo.cpp: Added.

(API::ContextMenuElementInfo::ContextMenuElementInfo):

  • UIProcess/API/APIContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfo.mm: Added.

(-[WKContextMenuElementInfo linkURL]):
(-[WKContextMenuElementInfo _apiObject]):
(-[WKContextMenuElementInfo _activatedElementInfo]):

  • UIProcess/API/Cocoa/WKContextMenuElementInfoInternal.h: Added.
  • UIProcess/API/Cocoa/WKContextMenuElementInfoPrivate.h: Added.
  • UIProcess/API/Cocoa/WKPreviewElementInfo.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
(-[_WKActivatedElementInfo isAnimatedImage]):

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

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

  • UIProcess/ios/WKContentView.h:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:
6:22 PM Changeset in webkit [246136] by jer.noble@apple.com
  • 10 edits
    1 add in trunk

-[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
https://bugs.webkit.org/show_bug.cgi?id=198585

Reviewed by Chris Dumez.

Source/WebKit:

Add a new WebPageCreationParameters entry for mediaPlaybackIsSuspended, and pass
that value across during WebPage creation.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::suspendAllMediaPlayback):
(WebKit::WebPageProxy::resumeAllMediaPlayback):
(WebKit::WebPageProxy::creationParameters):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSuspendAllMediaPlayback.mm: Added.

(TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-audio.html:
5:46 PM Changeset in webkit [246135] by rmorisset@apple.com
  • 5 edits in trunk/Source/WebCore

[WHLSL] Parsing and lexing the standard library is slow
https://bugs.webkit.org/show_bug.cgi?id=192890
<rdar://problem/50746335>

Reviewed by Myles Maxfield.

The main idea is to avoid backtracking by instead peeking at the next token (and occasionally at the one after that).
This implies a few things:

  • We can replace the stack of tokens by a trivial ring buffer of size 2 (holding the next token and the one after, or WTF::nullopt if we are at the end of the file).
  • We now have "completeFooExpression" functions, to avoid having to reparse the prefix of some expression, if we find half-way through what it is.

I also fixed the following parser bug:

which was due to a mistake I made in the grammar

Finally I added two new macros: CONSUME_TYPE and PARSE to eliminate about 500 lines of error propagation boilerplate.

There are still lots of ways of improving the parser and lexer, such as:

  • finishing the conversion of tokens in the lexer, not bothering with allocating string views
  • make two special tokens Invalid and EOF, to remove the overhead of Optional
  • make peekTypes and consumeTypes use templates to avoid constructing a Vector and calling find on it.
  • Turn the entire lexer into a proper automata, not going through the same characters again and again (this is certainly the largest win by far)
  • Remove the last few pieces of backtracking from the parser.

The current patch is already enough to make parsing the full standard library (something like 85k lines) approximately 260ms.
This is still longer than I would like, but nowhere near the bottleneck any longer because of some other parts of the compiler.

  • Modules/webgpu/WHLSL/WHLSLLexer.h:

(WebCore::WHLSL::Lexer::Lexer):
(WebCore::WHLSL::Lexer::consumeToken):
(WebCore::WHLSL::Lexer::peek):
(WebCore::WHLSL::Lexer::peekFurther):
(WebCore::WHLSL::Lexer::state const):
(WebCore::WHLSL::Lexer::setState):
(WebCore::WHLSL::Lexer::unconsumeToken): Deleted.

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::parse):
(WebCore::WHLSL::Parser::peek):
(WebCore::WHLSL::Parser::peekTypes):
(WebCore::WHLSL::Parser::tryType):
(WebCore::WHLSL::Parser::tryTypes):
(WebCore::WHLSL::Parser::consumeTypes):
(WebCore::WHLSL::Parser::parseConstantExpression):
(WebCore::WHLSL::Parser::parseTypeArgument):
(WebCore::WHLSL::Parser::parseTypeArguments):
(WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
(WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
(WebCore::WHLSL::Parser::parseType):
(WebCore::WHLSL::Parser::parseTypeDefinition):
(WebCore::WHLSL::Parser::parseResourceSemantic):
(WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
(WebCore::WHLSL::Parser::parseStageInOutSemantic):
(WebCore::WHLSL::Parser::parseSemantic):
(WebCore::WHLSL::Parser::parseQualifiers):
(WebCore::WHLSL::Parser::parseStructureElement):
(WebCore::WHLSL::Parser::parseStructureDefinition):
(WebCore::WHLSL::Parser::parseEnumerationDefinition):
(WebCore::WHLSL::Parser::parseEnumerationMember):
(WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
(WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
(WebCore::WHLSL::Parser::parseAttributeBlock):
(WebCore::WHLSL::Parser::parseParameter):
(WebCore::WHLSL::Parser::parseParameters):
(WebCore::WHLSL::Parser::parseFunctionDefinition):
(WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseVertexFragmentFunctionDeclaration):
(WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
(WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
(WebCore::WHLSL::Parser::parseFunctionDeclaration):
(WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
(WebCore::WHLSL::Parser::parseBlock):
(WebCore::WHLSL::Parser::parseBlockBody):
(WebCore::WHLSL::Parser::parseIfStatement):
(WebCore::WHLSL::Parser::parseSwitchStatement):
(WebCore::WHLSL::Parser::parseSwitchCase):
(WebCore::WHLSL::Parser::parseForLoop):
(WebCore::WHLSL::Parser::parseWhileLoop):
(WebCore::WHLSL::Parser::parseDoWhileLoop):
(WebCore::WHLSL::Parser::parseVariableDeclaration):
(WebCore::WHLSL::Parser::parseVariableDeclarations):
(WebCore::WHLSL::Parser::parseStatement):
(WebCore::WHLSL::Parser::parseEffectfulExpression):
(WebCore::WHLSL::Parser::parseEffectfulAssignment):
(WebCore::WHLSL::Parser::parseExpression):
(WebCore::WHLSL::Parser::parseTernaryConditional): Deleted.
(WebCore::WHLSL::Parser::completeTernaryConditional):
(WebCore::WHLSL::Parser::parseAssignment): Deleted.
(WebCore::WHLSL::Parser::completeAssignment):
(WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
(WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleLogicalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::completePossibleRelationalBinaryOperation):
(WebCore::WHLSL::Parser::parsePossibleShift):
(WebCore::WHLSL::Parser::completePossibleShift):
(WebCore::WHLSL::Parser::parsePossibleAdd):
(WebCore::WHLSL::Parser::completePossibleAdd):
(WebCore::WHLSL::Parser::parsePossibleMultiply):
(WebCore::WHLSL::Parser::completePossibleMultiply):
(WebCore::WHLSL::Parser::parsePossiblePrefix):
(WebCore::WHLSL::Parser::parsePossibleSuffix):
(WebCore::WHLSL::Parser::parseCallExpression):
(WebCore::WHLSL::Parser::parseTerm):
(WebCore::WHLSL::Parser::parseAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseNonAddressSpaceType): Deleted.
(WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulPrefix): Deleted.
(WebCore::WHLSL::Parser::parseEffectfulSuffix): Deleted.

  • Modules/webgpu/WHLSL/WHLSLParser.h:

(WebCore::WHLSL::Parser::Error::dump const):

5:28 PM Changeset in webkit [246134] by justin_michaud@apple.com
  • 4 edits
    3 adds in trunk

WebAssembly: pow functions returns 0 when exponent 1.0 or -1.0
https://bugs.webkit.org/show_bug.cgi?id=198106

Reviewed by Saam Barati.

JSTests:

  • wasm/regress/selectf64.js: Added.
  • wasm/regress/selectf64.wasm: Added.
  • wasm/regress/selectf64.wat: Added.

Source/JavaScriptCore:

Fix bug caused by using fcsel sX instead of fcsel dX on an f64 value in moveDoubleConditionally32.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveDoubleConditionally32):

4:55 PM Changeset in webkit [246133] by Kocsen Chung
  • 7 edits in branches/safari-608.1.27-branch/Source

Versioning.

4:05 PM Changeset in webkit [246132] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

TestWebKitAPI.WKWebView.LocalStorageProcessSuspends is flaky on release builds
https://bugs.webkit.org/show_bug.cgi?id=198582

Reviewed by Youenn Fablet.

Initialize the state of StorageManager.

  • NetworkProcess/WebStorage/StorageManager.h:
3:53 PM Changeset in webkit [246131] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Revert part of r246126
https://bugs.webkit.org/show_bug.cgi?id=197132

  • platform/ios/WebItemProviderPasteboard.h:

This change broke an internal build, so I'm reverting it.

3:37 PM Changeset in webkit [246130] by Kocsen Chung
  • 1 copy in tags/Safari-608.1.27.3

Tag Safari-608.1.27.3.

3:09 PM Changeset in webkit [246129] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

[CSP] Data URLs should inherit their CSP policy
https://bugs.webkit.org/show_bug.cgi?id=198572
<rdar://problem/50660927>

Reviewed by Brent Fulgham.

Source/WebCore:

As per <https://w3c.github.io/webappsec-csp/#security-inherit-csp> (Editor's Draft, 28 February 2019) data
URLs should inherit their CSP policy from their parent (if they have one).

Test: http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html

  • dom/Document.cpp:

(WebCore::Document::shouldInheritContentSecurityPolicyFromOwner const):

LayoutTests:

Add a test to ensure that a framed data URL inherits its CSP policy from its parent document.

  • http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/subframe-with-data-url-inheritance.html: Added.
2:28 PM Changeset in webkit [246128] by sbarati@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Follow up fix after r246115.
I changed the code to assert that we don't have duplicate native
functions. It turns out we do. I will fix that here, then add
back the assert. https://bugs.webkit.org/show_bug.cgi?id=198580

  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:

(WebCore::WHLSL::checkDuplicateFunctions):

2:24 PM Changeset in webkit [246127] by commit-queue@webkit.org
  • 9 edits in trunk

Re-enable safe browsing in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=196161
<rdar://problem/49171413>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-05
Reviewed by Ryosuke Niwa.

Source/WebKit:

This is mostly just reverting r241728.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKPreferences.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences setSafeBrowsingEnabled:]):
(-[WKPreferences isSafeBrowsingEnabled]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:

(TEST):
(safeBrowsingView):

LayoutTests:

  • platform/mac-wk2/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt:
2:11 PM Changeset in webkit [246126] by commit-queue@webkit.org
  • 24 edits in trunk

Progress towards resurrecting Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=197132

Patch by Alex Christensen <achristensen@webkit.org> on 2019-06-05
Reviewed by Don Olmstead.

Source/JavaScriptCore:

  • API/JSScript.mm:

(-[JSScript readCache]):
(-[JSScript sourceCode]):
(-[JSScript jsSourceCode]):
(-[JSScript writeCache:]):

  • CMakeLists.txt:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:
1:39 PM Changeset in webkit [246125] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Remove logSiteIdentifier from UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame
https://bugs.webkit.org/show_bug.cgi?id=198575

Reviewed by Eric Carlson.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

1:32 PM Changeset in webkit [246124] by Michael Catanzaro
  • 7 edits
    7 copies in trunk

Rolled over to ChangeLog-2019-06-05

1:26 PM Changeset in webkit [246123] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Update sandboxes to address iokit-get-property errors
https://bugs.webkit.org/show_bug.cgi?id=198494
<rdar://problem/51322072> and <rdar://problem/50602737>

Reviewed by Alexey Proskuryakov.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
12:21 PM Changeset in webkit [246122] by commit-queue@webkit.org
  • 10 edits in trunk

[Pointer Events] Fire pointerout and pointerleave events after firing pointercancel
https://bugs.webkit.org/show_bug.cgi?id=198560

Patch by Antoine Quint <Antoine Quint> on 2019-06-05
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions. Notably, the iOS-specific tests now have 100% PASS rate.

  • web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_pointercancel_touch-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_pointerleave_after_pointercancel_touch-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_pointerout_after_pointercancel_touch-expected.txt:

Source/WebCore:

The Pointer Events specification mandates that "pointerout" and "pointerleave" events must be dispatched
immediately after dispatching a "pointercancel" event.

Since we needed to determine the bubbling, cancelable and composed nature of those events in additional
places, we now have static methods to determine this defined in PointerEvent.h such that both PointerEvent.cpp
and PointerEventIOS.cpp may use them. This should guarantee consistency going forward.

  • dom/PointerEvent.cpp:

(WebCore::PointerEvent::create):
(WebCore::PointerEvent::PointerEvent):

  • dom/PointerEvent.h:
  • dom/ios/PointerEventIOS.cpp:

(WebCore::pointerEventType):
(WebCore::PointerEvent::create):
(WebCore::PointerEvent::PointerEvent):
(WebCore::phaseIsCancelable): Deleted.
(WebCore::typeCanBubble): Deleted.

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::cancelPointer):

11:36 AM Changeset in webkit [246121] by sbarati@apple.com
  • 10 edits
    18 adds in trunk

[WHLSL] Implement loop expressions
https://bugs.webkit.org/show_bug.cgi?id=195808
<rdar://problem/50746309>

Reviewed by Myles Maxfield.

Source/WebCore:

This patch makes continue/break break for "do/while/for" loops
in WHLSL. Because of the way we emit code where every expression
turns into a Metal statement, it's not convenient to emit native
Metal loop constructs. Instead, we model break/continue as if
we had goto.

For example, this WHLSL program:
`
for (INIT; COND; INC) {

if (b)

continue;

if (b2)

break;

}
`
would become something like:
`
INIT;
while (1) {

if (!COND)

break;

if (b)

goto increment;

if (b2)

goto exit;

increment:

INC;

}
exit:
`

However, Metal doesn't have goto, so we model goto using a run-once
loop and a variable indicating if we should break out early. This
"break out early" variable is initially set to false. We "should
break out early" when executing a WHLSL "break" statement. "continue"
is modeled as breaking out of the run-once loop, but not touching the
"break out early" variable. "break" is modeled as setting the "break
out early" variable to true, followed by breaking out of the run-once loop.
The above WHLSL will turn into this Metal:
`
bool breakOutOfCurrentLoop = false;
INIT;
while (1) {

if (!COND)

break;

do {

if (b) {

WHLSL 'continue'
break;

}
if (b2) {

WHLSL 'break'
breakOutOfCurrentLoop = true;
break;

}

} while (0);
if (breakOutOfCurrentLoop)

break;

INC;

}
`

This patch also found a bug with ForLoop where it held a Variant<VariableDeclarationsStatement, Expression>.
This is invalid to do since we mutate the AST in place. This means some phase
could replace VariableDeclarationsStatement with some other Statement, and
we'd be breaking the C++ type system. So this patch migrates ForLoop to hold
a statement instead. In general, AST nodes that point to other AST nodes
should use broad types unless we know apriori that a certain type will
never be replaced.

Tests: webgpu/whlsl-do-while-loop-break.html

webgpu/whlsl-do-while-loop-continue.html
webgpu/whlsl-do-while-loop.html
webgpu/whlsl-loops-break.html
webgpu/whlsl-loops-continue.html
webgpu/whlsl-loops.html
webgpu/whlsl-nested-loop.html
webgpu/whlsl-while-loop-break.html
webgpu/whlsl-while-loop-continue.html

  • Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:

(WebCore::WHLSL::AST::ForLoop::ForLoop):
(WebCore::WHLSL::AST::ForLoop::initialization):

  • Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:

(WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
(WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):

  • Modules/webgpu/WHLSL/WHLSLASTDumper.cpp:

(WebCore::WHLSL::ASTDumper::visit):

  • Modules/webgpu/WHLSL/WHLSLChecker.cpp:

(WebCore::WHLSL::Checker::visit):

  • Modules/webgpu/WHLSL/WHLSLParser.cpp:

(WebCore::WHLSL::Parser::parseForLoop):

  • Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
  • Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp:

(WebCore::WHLSL::Visitor::visit):

LayoutTests:

  • webgpu/whlsl-do-while-loop-break-expected.html: Added.
  • webgpu/whlsl-do-while-loop-break.html: Added.
  • webgpu/whlsl-do-while-loop-continue-expected.html: Added.
  • webgpu/whlsl-do-while-loop-continue.html: Added.
  • webgpu/whlsl-do-while-loop-expected.html: Added.
  • webgpu/whlsl-do-while-loop.html: Added.
  • webgpu/whlsl-loops-break-expected.html: Added.
  • webgpu/whlsl-loops-break.html: Added.
  • webgpu/whlsl-loops-continue-expected.html: Added.
  • webgpu/whlsl-loops-continue.html: Added.
  • webgpu/whlsl-loops-expected.html: Added.
  • webgpu/whlsl-loops.html: Added.
  • webgpu/whlsl-nested-loop-expected.html: Added.
  • webgpu/whlsl-nested-loop.html: Added.
  • webgpu/whlsl-while-loop-break-expected.html: Added.
  • webgpu/whlsl-while-loop-break.html: Added.
  • webgpu/whlsl-while-loop-continue-expected.html: Added.
  • webgpu/whlsl-while-loop-continue.html: Added.
11:29 AM Changeset in webkit [246120] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: inactive tab bar tint is too light
https://bugs.webkit.org/show_bug.cgi?id=198546

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TabBar.css:

(@media (prefers-color-scheme: dark)):

11:23 AM Changeset in webkit [246119] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Fix icons positioned incorrectly when a featured image is used
https://bugs.webkit.org/show_bug.cgi?id=198535

Reviewed by Devin Rousso.

  • wp-content/themes/webkit/style.css:

(.tile .background-image.loaded svg):
(.tile .featured-image::before):

11:23 AM Changeset in webkit [246118] by wenson_hsieh@apple.com
  • 40 edits
    1 move
    1 add
    1 delete in trunk

Upstream content mode support into open source from WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=198484
<rdar://problem/51355671>

Reviewed by Andy Estes.

Source/WebCore:

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

(MediaController.prototype.get layoutTraits):

Adjust modern media controls code to use iOS-style controls on PLATFORM(IOS_FAMILY), instead of depending on the
navigator's platform name or the presence of touch events.

  • page/Quirks.cpp:

(WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
(WebCore::shouldEmulateUndoRedoInHiddenEditableAreasForHost):

  • page/SettingsBase.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::mediaControlsScript):

Source/WebCore/PAL:

Add some new constants to MobileGestaltSPI.h.

  • pal/spi/ios/MobileGestaltSPI.h:

Source/WebKit:

Move code for handling WKContentMode into open source. No change in behavior, for internal builds.

  • Shared/API/Cocoa/WebKit.apinotes:
  • Shared/WebContentMode.h: Renamed from Source/WebKit/Shared/WebCompatibilityMode.h.
  • Shared/WebPreferences.yaml:
  • UIProcess/API/APINavigation.h:

(API::Navigation::setEffectiveContentMode):
(API::Navigation::effectiveContentMode const):
(API::Navigation::setEffectiveCompatibilityMode): Deleted.
(API::Navigation::effectiveCompatibilityMode const): Deleted.

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::shouldBypassContentModeSafeguards const):
(API::NavigationClient::shouldBypassCompatibilityModeSafeguards const): Deleted.

  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKNavigation.h:
  • UIProcess/API/Cocoa/WKNavigation.mm:

(-[WKNavigation effectiveContentMode]):

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

(WebKit::contentMode):
(WebKit::webContentMode):
(-[WKWebpagePreferences _allowSiteSpecificQuirksToOverrideCompatibilityMode]):
(-[WKWebpagePreferences _setAllowSiteSpecificQuirksToOverrideCompatibilityMode:]):
(-[WKWebpagePreferences setPreferredContentMode:]):
(-[WKWebpagePreferences preferredContentMode]):

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

(WebKit::NavigationState::NavigationClient::shouldBypassContentModeSafeguards const):
(WebKit::NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards const): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
(WebKit::WebPageProxy::effectiveCompatibilityModeAfterAdjustingPolicies): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::desktopClassBrowsingSupported):
(WebKit::webViewSizeIsNarrow):
(WebKit::desktopClassBrowsingRecommendedForRequest):
(WebKit::desktopClassBrowsingRecommended):
(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

Change the "useModernCompatibilityMode" layout test option to instead be "contentMode", with values of either
"mobile" or "desktop".

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/ios/PreferredCompatibilityMode.mm: Removed.
  • TestWebKitAPI/ios/PreferredContentMode.mm: Added.

(-[ContentModeNavigationDelegate setDecidePolicyForNavigationActionWithPreferences:]):
(-[ContentModeNavigationDelegate decidePolicyForNavigationActionWithPreferences]):
(-[ContentModeNavigationDelegate webView:decidePolicyForNavigationAction:preferences:decisionHandler:]):
(+[WKWebpagePreferences preferencesWithContentMode:]):
(-[WKWebView navigatorUserAgent]):
(-[WKWebView navigatorPlatform]):
(-[WKWebView loadTestPageNamed:withPolicyDecisionHandler:]):
(-[WKWebView loadHTMLString:withPolicyDecisionHandler:]):
(-[WKWebView loadTestPageNamed:andExpectEffectiveContentMode:withPolicyDecisionHandler:]):
(-[NSString shouldContainStrings:]):
(IPhoneUserInterfaceSwizzler::IPhoneUserInterfaceSwizzler):
(IPhoneUserInterfaceSwizzler::phoneUserInterfaceIdiom):
(TestWebKitAPI::setUpWebViewForPreferredContentModeTestingWithoutNavigationDelegate):
(TestWebKitAPI::setUpWebViewForPreferredContentModeTesting):
(TestWebKitAPI::makeContentModeDecisionHandler):
(TestWebKitAPI::TEST):

  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView):
(WTR::TestController::configureContentMode):
(WTR::TestController::enableModernCompatibilityMode): Deleted.

LayoutTests:

Explicitly opt a few tests into desktop or mobile content mode.

  • fast/media/ios/ipad/enable-MediaSource-API-in-modern-compatibility-mode.html:
  • fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode-expected.html:
  • fast/scrolling/ipad/overflow-scrolling-touch-enabled-stacking-modern-compatibility-mode.html:
  • media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html:
  • platform/ipad/fast/css/webkit-overflow-scrolling-parsing-modern-compatibility-mode.html:
  • platform/ipad/fast/viewport/empty-meta.html:
  • platform/ipad/fast/viewport/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport.html:
  • platform/ipad/media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html:
11:02 AM Changeset in webkit [246117] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/IndexedDB/keypath-special-identifiers.htm is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=198573

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updating expectations for flaky test
11:01 AM Changeset in webkit [246116] by timothy_horton@apple.com
  • 7 edits in trunk/Source/WebKit

Remove some unused selection code
https://bugs.webkit.org/show_bug.cgi?id=198451

Reviewed by Wenson Hsieh.

  • Platform/spi/ios/UIKitSPI.h:
  • Shared/ios/GestureTypes.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(toGestureType):
(toUIWKGestureType):

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::canShrinkToTextSelection): Deleted.
(WebKit::hasCustomLineHeight): Deleted.
(WebKit::WebPage::rangeForWebSelectionAtPosition): Deleted.

10:40 AM Changeset in webkit [246115] by sbarati@apple.com
  • 8 edits in trunk/Source/WebCore

[WHLSL] checkDuplicateFunctions() should not be O(n2)
https://bugs.webkit.org/show_bug.cgi?id=198155
<rdar://problem/51288811>

Reviewed by Myles Maxfield.

Originally, we filed this bug because we thought checkDuplicateFunctions()
would take on the order of hundreds of milliseconds when using the
full standard library. However, I was never able to reproduce that phase
taking that long. I was seeing it take 3.5-4ms. Anyways, it makes sense
to make this phase not be O(N2), since the number of functions is a user
controlled value. I am now seeing ~2.5ms to run this phase against the
full standard library. On a microbenchmark I checked against, where there
were 100,000 unique functions, this pass runs twice as fast as it used
to, now taking 450ms instead of 900ms.

  • Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:

(WebCore::WHLSL::AST::ArrayReferenceType::ArrayReferenceType):

  • Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:

(WebCore::WHLSL::AST::PointerType::PointerType):

  • Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
  • Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
  • Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:

(WebCore::WHLSL::DuplicateFunctionKey::DuplicateFunctionKey):
(WebCore::WHLSL::DuplicateFunctionKey::isEmptyValue const):
(WebCore::WHLSL::DuplicateFunctionKey::isHashTableDeletedValue const):
(WebCore::WHLSL::DuplicateFunctionKey::hash const):
(WebCore::WHLSL::DuplicateFunctionKey::operator== const):
(WebCore::WHLSL::DuplicateFunctionKey::Hash::hash):
(WebCore::WHLSL::DuplicateFunctionKey::Hash::equal):
(WebCore::WHLSL::DuplicateFunctionKey::Traits::isEmptyValue):
(WebCore::WHLSL::checkDuplicateFunctions):

10:34 AM Changeset in webkit [246114] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] LineLayout::placeInlineItems should not apply float contraint.
https://bugs.webkit.org/show_bug.cgi?id=198565
<rdar://problem/51440718>

Reviewed by Antti Koivisto.

This patch moves float constraint handling from placeInlineItems() to LineLayout::layout().
When placeInlineItems() is called by the preferred width computation, intruding floats should be ignored
since they don't constrain the "min/max lines".

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::HorizontalConstraint::HorizontalConstraint):
(WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
(WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
(WebCore::Layout::constructLine): Deleted.

10:33 AM Changeset in webkit [246113] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

REGRESSION (~r244378) fast/events/touch/ios/content-observation/stuck-with-hover-state.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=198571
<rdar://problem/50349265>

Reviewed by Brent Fulgham.

testRunner.notifyDone() is called prematurely.

  • fast/events/touch/ios/content-observation/stuck-with-hover-state.html:
10:03 AM Changeset in webkit [246112] by Jon Davis
  • 3 edits in trunk/Websites/webkit.org

Improve accessibility on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=198531

Reviewed by Devin Rousso.

  • wp-content/themes/webkit/functions.php: Added menuitem ARIA role to links
  • wp-content/themes/webkit/widgets/post.php: Added aria-label to SVG icons
10:02 AM Changeset in webkit [246111] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers.html is a flaky failure on Mojave
https://bugs.webkit.org/show_bug.cgi?id=176240

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:01 AM Changeset in webkit [246110] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed assertion fix for macOS after r246097.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):

9:56 AM Changeset in webkit [246109] by Philippe Normand
  • 1 edit
    2 adds in trunk/LayoutTests

Unreviewed, add GTK baselines for new mediacapabilities test.

This test was added in r245636 with baselines for the mac port, but not for the GTK port.

  • platform/gtk/media/mediacapabilities/mediacapabilities-types-expected.txt: Added.
9:48 AM Changeset in webkit [246108] by Truitt Savell
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r246052.

Caused 3 webgpu/ failures.

Reverted changeset:

"[WHLSL] Parsing and lexing the standard library is slow"
https://bugs.webkit.org/show_bug.cgi?id=192890
https://trac.webkit.org/changeset/246052

9:41 AM Changeset in webkit [246107] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GStreamer] Crash in MediaPlayerPrivateGStreamerBase::ensureGstGLContext
https://bugs.webkit.org/show_bug.cgi?id=198567

Reviewed by Philippe Normand.

MediaPlayerPrivateGStreamerBase::ensureGstGLContext is currently a guaranteed crash because
it expects PlatformDisplay::sharedDisplayForCompositing() to return a PlatformDisplayLibWPE
if compiled with USE(WPE_RENDERER), but PlatformDisplayLibWPE has lower precedence than
PlatformDisplayX11 and PlatformDisplayWayland. When running our layout tests with
run-webkit-tests --gtk, it's guaranteed to be a PlatformDisplayX11.

I think Carlos was clearly expecting PlatformDisplayLibWPE, so I don't know what the ideal
desired behavior is, but the crashes go away if we change the code to allow any type of
PlatformDisplay. This should hopefully fix our bots, which are still exiting early.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):

7:52 AM Changeset in webkit [246106] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Mark two tests added in r246016 as slow.
https://bugs.webkit.org/show_bug.cgi?id=198459

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
7:47 AM Changeset in webkit [246105] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move inline item height computation to a dedicated function
https://bugs.webkit.org/show_bug.cgi?id=198550
<rdar://problem/51424223>

Reviewed by Antti Koivisto.

The inlineItem height value is not available during preferred width computation (hence optional).

  • layout/inlineformatting/InlineFormattingContextLineLayout.cpp:

(WebCore::Layout::UncommittedContent::add):
(WebCore::Layout::inlineItemWidth):
(WebCore::Layout::inlineItemHeight):
(WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendInlineContainerEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendReplacedInlineBox):

  • layout/inlineformatting/InlineLine.h:
6:22 AM Changeset in webkit [246104] by jfernandez@igalia.com
  • 22 edits
    8 copies
    10 adds in trunk/LayoutTests

Update the CSS Text WPT test suite
https://bugs.webkit.org/show_bug.cgi?id=197929

Reviewed by Myles C. Maxfield.

Import the last changes in the CSS Text suite.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text/line-break/line-break-anywhere-001.html:
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-002.html:
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-013-expected.html: Added.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-013.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-014-expected.html: Added.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-014.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-015-expected.html: Added.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-015.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-016-expected.html: Added.
  • web-platform-tests/css/css-text/line-break/line-break-anywhere-016.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/line-break/w3c-import.log:
  • web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-break-word-008.html:
  • web-platform-tests/css/css-text/white-space/break-spaces-009.html:
  • web-platform-tests/css/css-text/white-space/break-spaces-010-expected.html: Added.
  • web-platform-tests/css/css-text/white-space/break-spaces-010.html: Added.
  • web-platform-tests/css/css-text/white-space/w3c-import.log:
  • web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-004-expected.html:
  • web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-004.html:
  • web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-002-expected.html:
  • web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-002.html:
  • web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-003-expected.html:
  • web-platform-tests/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-003.html:
  • web-platform-tests/css/css-text/word-break/w3c-import.log:
  • web-platform-tests/css/css-text/word-break/word-break-break-all-017.html:
  • web-platform-tests/css/css-text/word-break/word-break-break-all-023.html:
  • web-platform-tests/css/css-text/word-break/word-break-break-all-024.html:
  • web-platform-tests/css/css-text/word-break/word-break-break-all-025-expected.html: Added.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-025.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-026-expected.html: Added.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-026.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-027-expected.html: Added.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-027.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-028-expected.html: Added.
  • web-platform-tests/css/css-text/word-break/word-break-break-all-028.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html.

LayoutTests:

  • TestExpectations: A few tests pass now
    • white-space-intrinsic-size-004.html
    • white-space-pre-wrap-trailing-spaces-003.html
1:41 AM Changeset in webkit [246103] by graouts@webkit.org
  • 36 edits
    2 copies
    5 adds in trunk

[Pointer Events] Add support for chorded button interactions
https://bugs.webkit.org/show_bug.cgi?id=198462

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark the progression for web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover.html which
proves the correct implementation of the chorded button interactions section of the Pointer Events spec. To do that,
we also had to make use of the "button" parameter used in WPT tests action sequences, which allows the test to indicate
which mouse button is pressed. Finally, there is now a change in the pointerevent_pointermove_on_chorded_mouse_button.html
results, another source change is required to get this test to fully pass.

  • web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_pointermove_on_chorded_mouse_button-expected.txt:
  • web-platform-tests/resources/testdriver-vendor.js:

(dispatchMouseActions):

Source/WebCore:

Pointer events differ from mouse events in that pressing a button on a mouse and then pressing a second button
would yield two "mousedown" events but a single "pointerdown" event, for the first time we're transitioning from
a state where no button is pressed at all, and then a "pointermove" event to indicate an additional button has been
pressed. This is what the Pointer Events specification calls "chorded button interactions".
See https://w3c.github.io/pointerevents/#chorded-button-interactions for the full details.

To implement this, we no longer directly call PointerEvent::create() from Element::dispatchMouseEvent() but instead
call the new PointerCaptureController::pointerEventForMouseEvent() which implements the required logic to determine
for "mousedown" and "mouseup" mouse events, if we're transitioning from or to a state where no button is pressed at
all.

While that basic change is pretty small, a wider change was required to report the correct value for a PointerEvents'
"button" property which should return "-1" when there is no change in pressed button state compared to any previous
pointer event.

Up until now, MouseEvent.button was an "unsigned short", as specified up to and including DOM Level 2 Events. But the
UI Events spec says that property is a "short", and PointerEvent is the only interface where a "-1" value is used. This
required some changes throughout our codebase since we used a "-1" value to specify that no button was pressed when dealing
with NSEvent input and going through PlatformMouseEvent and eventually MouseEvent. So now we change the various NoButton
enum values to be "-2" and use that value, which is not going to be used for any mouse button, as the value reflected as
"0" through MouseEvent.button, as specified by UI Events.

Furthermore, we identified another issue: MouseEvent.buttons would always return 0 in DRT and WKTR. We rely upon that
value in PointerCaptureController::pointerEventForMouseEvent() and so we had to make that work for the relevant WPT test,
web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover.html, to pass and show a correct implementation
of chorded button interactions. The details of the work required for this is in Tools/ChangeLog.

  • dom/Element.cpp:

(WebCore::Element::dispatchMouseEvent):

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):
(WebCore::MouseEvent::initMouseEventQuirk):

  • dom/MouseEvent.h:

(WebCore::MouseEvent::button const):

  • dom/MouseEvent.idl:
  • dom/MouseEventInit.h:
  • dom/MouseEventInit.idl:
  • dom/PointerEvent.cpp:

(WebCore::PointerEvent::create):
(WebCore::PointerEvent::PointerEvent):

  • dom/PointerEvent.h:
  • loader/NavigationAction.h:
  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::pointerEventForMouseEvent):

  • page/PointerCaptureController.h:
  • platform/PlatformMouseEvent.h:

Source/WebKit:

Update to use -2 instead of -1 for NoButton.

  • Shared/API/c/WKEvent.h:
  • Shared/WebEvent.h:

Source/WebKitLegacy/mac:

Update -[DOMMouseEvent button] to be a "short" and update the noButton value from -1 to -2.

  • DOM/DOMMouseEvent.h:
  • DOM/DOMMouseEvent.mm:

(-[DOMMouseEvent button]):

  • WebView/WebPDFView.mm:

(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Tools:

Until now, MouseEvent.buttons would always return 0 when used within DRT and WKTR as [NSEvent pressedMouseButtons], used
by PlatformMouseEventBuilder to set the m_buttons value eventually used to set MouseEvent.buttons, not account for the
NSEvent created through the eventSender JS object in tests. To fix this, we now track the pressed mouse buttons within
DRT and WKTR as mouseDown() and mouseUp() are called, and swizzle [NSEvent pressedMouseButtons] to return that value.

In the case of DRT, one test would fail when swizzling this method in the case where the target view for the event would
be the DRTMockScroller, a subclass of NSScroller. So we only swizzle when the target view is *not* an NSScroller or a
subclass.

Finally, we change the NoMouseButton enum value from -1 to -2 to adjust to MouseEvent.button now being a "short".

  • DumpRenderTree/mac/EventSendingController.mm:

(swizzledEventPressedMouseButtons):
(-[EventSendingController mouseDown:withModifiers:]):
(-[EventSendingController mouseUp:withModifiers:]):
(-[EventSendingController mouseMoveToX:Y:]):

  • TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm:
  • WebKitTestRunner/EventSenderProxy.h:

(WTR::EventSenderProxy::mouseButtonsCurrentlyDown const):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::swizzledEventPressedMouseButtons):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):

LayoutTests:

Update some tests and their expectations due to MouseEvent.buttons now returning the correct value in DRT and WKTR
and MouseEvent.button now being a "short" instead of an "unsigned short".

  • fast/events/constructors/mouse-event-constructor-expected.txt:
  • fast/events/constructors/mouse-event-constructor.html: Update the test to test the boundary values for "short" instead

of "unsigned short" as well as the new "magic" value of -2 for no button, which ends up being reported as 0.

  • fast/events/constructors/wheel-event-constructor-expected.txt:
  • fast/events/constructors/wheel-event-constructor.html: Update the test to test the boundary values for "short" instead

of "unsigned short" as well as the new "magic" value of -2 for no button, which ends up being reported as 0.

  • fast/events/fire-mousedown-while-pressing-mouse-button.html: Rewrite this test to always use MouseEvent.buttons and

adjust the bitmask expectations which were way off.

  • platform/mac-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:
  • platform/mac-highsierra/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:
  • platform/mac-highsierra-wk1/imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_capture_change_hover-expected.txt:

This test fails differently in WK1 and WK2 and will be addressed in a future patch.

12:56 AM Changeset in webkit [246102] by Michael Catanzaro
  • 5 edits in trunk/Source

REGRESSION(r245796): [WPE][GTK] Web process crash on startup
https://bugs.webkit.org/show_bug.cgi?id=198485

Reviewed by Chris Dumez.

Source/WebCore:

ResourceRequest's PageIdentifier may be unset, which causes coding to fail as
ObjectIdentifiers are required to be valid (nonzero). We need to use Optional here.
Previously, 0 was used to indicate unset page ID. This is clearer.

  • platform/network/soup/ResourceRequest.h:

(WebCore::ResourceRequest::initiatingPageID const):
(WebCore::ResourceRequest::decodeWithPlatformData):

  • platform/network/soup/ResourceRequestSoup.cpp:

(WebCore::ResourceRequest::updateSoupRequest const):

Source/WebKit:

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkitURISchemeRequestCreate):

12:42 AM Changeset in webkit [246101] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit

[GTK][WPE] Re-enable process warming
https://bugs.webkit.org/show_bug.cgi?id=198526

Reviewed by Michael Catanzaro.

It was disabled in r243490 because bubblewrap sandbox needs a valid WebsiteDataStore before launching the web
process. We can use the default WebsiteDataStore from the WebProcessPool and only use the prewarmed process
later if the given WebsiteDataStore is the same as the WebProcessPool one.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::tryTakePrewarmedProcess): Do not use the prewarmed process if WebsiteDataStore is
different than the one used to launch the process when sandboxing is enabled.

  • UIProcess/glib/WebProcessPoolGLib.cpp:

(WebKit::WebProcessPool::platformInitialize): Do not disable process warming.

  • UIProcess/glib/WebProcessProxyGLib.cpp:

(WebKit::WebProcessProxy::platformGetLaunchOptions): Use the WebsiteDataStore from the WebProcessPool if process
is prewarmed and sandboxing is enabled.

Note: See TracTimeline for information about the timeline view.