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

Timeline



Jan 14, 2020:

10:40 PM Changeset in webkit [254560] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

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

Broke launching WebContent (Requested by ap_ on #webkit).

Reverted changeset:

"Expand WebContent process sandbox with additional syscall"
https://bugs.webkit.org/show_bug.cgi?id=206260
https://trac.webkit.org/changeset/254548

10:32 PM Changeset in webkit [254559] by Alan Bujtas
  • 8 edits
    2 adds in trunk

Long continuation chain could lead to stack exhaustion
https://bugs.webkit.org/show_bug.cgi?id=206271
<rdar://problem/41189798>

Reviewed by Simon Fraser.

Source/WebCore:

This patch replaces the recursive approach with an iterative one
to collect absolute quads across continuation.

Test: fast/inline/long-continuation-crash.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::absoluteQuads const):
(WebCore::RenderBlock::absoluteQuadsIgnoringContinuation const):

  • rendering/RenderBlock.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::collectAbsoluteQuadsForContinuation const):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::absoluteQuadsIgnoringContinuation const):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::absoluteQuads const):
(WebCore::RenderInline::absoluteQuadsIgnoringContinuation const):

  • rendering/RenderInline.h:

LayoutTests:

  • fast/inline/long-continuation-crash.html: Added.
10:02 PM Changeset in webkit [254558] by commit-queue@webkit.org
  • 26 edits in trunk

Unreviewed, rolling out r254480, r254496, and r254517.
https://bugs.webkit.org/show_bug.cgi?id=206278

"It regressed JetStream2 and Speedometer2" (Requested by
saamyjoon on #webkit).

Reverted changesets:

"Throw away baseline code if there is an optimized
replacement"
https://bugs.webkit.org/show_bug.cgi?id=202503
https://trac.webkit.org/changeset/254480

"Unreviewed. Change useLLInt=0 to forceBaseline=1"
https://trac.webkit.org/changeset/254496

"Add an option that enables/disables throwing away baseline
JIT code"
https://bugs.webkit.org/show_bug.cgi?id=206244
https://trac.webkit.org/changeset/254517

9:57 PM Changeset in webkit [254557] by rniwa@webkit.org
  • 18 edits in trunk/Source

Enable the offset assertion in HTMLTextFormControlElement::indexForPosition
https://bugs.webkit.org/show_bug.cgi?id=205706

Reviewed by Darin Adler.

Source/WebCore:

This patch fixes the erroneously disabled debug assertion in HTMLTextFormControlElement::indexForPosition.

It also fixes the bug that it was asserting even when VisiblePosition was null, and computed a wrong offset
when the entire input element is not visible (e.g. becaue height is 0px).

TextIterator::rangeLength and TextIterator::rangeFromLocationAndLength now takes an OptionSet of
newly added enum class TextIteratorLengthOption instead of a boolean indicating whether a space should be
generated for a replaced element. Most code changes are due to this refactoring.

No new tests since existing tests exercise this code.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::rangeMatchesTextNearRange):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::indexForVisiblePosition const):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(getSelectionOffsetsForObject):

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(objectFocusedAndCaretOffsetUnignored):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyBlockStyle):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/Editing.cpp:

(WebCore::indexForVisiblePosition):
(WebCore::visiblePositionForIndex):

  • editing/Editing.h:

(WebCore::indexForVisiblePosition):

  • editing/TextIterator.cpp:

(WebCore::behaviorFromLegnthOptions): Added.
(WebCore::TextIterator::rangeLength):
(WebCore::TextIterator::rangeFromLocationAndLength):

  • editing/TextIterator.h:

(WebCore::TextIterator::rangeLength):
(WebCore::TextIterator::rangeFromLocationAndLength):

  • editing/TextIteratorBehavior.h:
  • editing/ios/DictationCommandIOS.cpp:

(WebCore::DictationCommandIOS::doApply):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::indexForPosition const): Enabled the assertion when VisiblePosition
is not null, and fixed the bug that the offset computed from VisiblePosition were always 0 when the input
element is not visible (e.g. has 0px size or has visibility: hidden).

  • page/EventHandler.cpp:

(WebCore::textDistance):

Source/WebKit:

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeNearPositionMatchesText):

7:10 PM Changeset in webkit [254556] by Chris Dumez
  • 35 edits in trunk

document.cookie should not do a sync IPC to the network process for iframes that do not have storage access
https://bugs.webkit.org/show_bug.cgi?id=206108

Reviewed by Geoff Garen and John Wilander.

Source/WebCore:

When ITP is enabled and ThirdPartyCookieBlockingMode::All mode is used (default in Safari), we can now detect
that a third-party iframe does not have cookie access completely on the WebContent process side, instead of
doing the check on the Network process side. The benefit is that this avoids doing a synchronous IPC every
time a third-party iframe which does not have storage access tries to access document.cookie in JavaScript.
Given that this should apply to a lot of iframes, this change is very beneficial to performance.

No new tests, covered by existing tests that are still passing.

  • loader/CookieJar.cpp:

(WebCore::CookieJar::cookies const):
(WebCore::CookieJar::setCookies):
(WebCore::CookieJar::cookieRequestHeaderFieldValue const):
(WebCore::CookieJar::getRawCookies const):

  • platform/network/CacheValidation.cpp:

(WebCore::cookieRequestHeaderFieldValue):

  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNetWin.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
(WebCore::NetworkStorageSession::getRawCookies const):

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::cookiesForURL):
(WebCore::cookiesForSession):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::getRawCookies const):

  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):

Source/WebKit:

When ITP is enabled and ThirdPartyCookieBlockingMode::All mode is used (default in Safari), we can now detect
that a third-party iframe does not have cookie access completely on the WebContent process side, instead of
doing the check on the Network process side. The benefit is that this avoids doing a synchronous IPC every
time a third-party iframe which does not have storage access tries to access document.cookie in JavaScript.
Given that this should apply to a lot of iframes, this change is very beneficial to performance.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::logCookieInformationInternal):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • Scripts/webkit/messages.py:
  • Shared/WebProcessDataStoreParameters.h:

(WebKit::WebProcessDataStoreParameters::encode const):
(WebKit::WebProcessDataStoreParameters::decode):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::webProcessDataStoreParameters):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::setShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::thirdPartyCookieBlockingMode const):
(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::thirdPartyCookieBlockingMode const):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp:

(WebKit::WebResourceLoadObserver::requestStorageAccessUnderOpener):
(WebKit::WebResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

  • WebProcess/WebCoreSupport/WebResourceLoadObserver.h:
  • WebProcess/WebPage/WebCookieJar.cpp:

(WebKit::shouldBlockCookies):
(WebKit::WebCookieJar::cookies const):
(WebKit::WebCookieJar::setCookies):
(WebKit::WebCookieJar::cookieRequestHeaderFieldValue const):
(WebKit::WebCookieJar::getRawCookies const):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::addDomainWithPageLevelStorageAccess):
(WebKit::WebPage::hasPageLevelStorageAccess const):

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

(WebKit::WebProcess::setWebsiteDataStoreParameters):
(WebKit::WebProcess::setShouldBlockThirdPartyCookiesForTesting):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::thirdPartyCookieBlockingMode const):

  • WebProcess/WebProcess.messages.in:

Tools:

Make setStatisticsShouldBlockThirdPartyCookies IPC from the WebProcess to the UIProcess asynchronous
since this ends up sending an IPC back to the WebProcess now (which would deadlock).

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

6:51 PM Changeset in webkit [254555] by Peng Liu
  • 21 edits
    2 moves in trunk

[Media in GPU process] Implement the remote video layer support
https://bugs.webkit.org/show_bug.cgi?id=206043

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, covered by existing tests.

This patch adds function LayerHostingContext::createPlatformLayerForHostingContext() which is
a wrapper of [CALayer _web_renderLayerWithContextID:] to create WebVideoHostingLayer in the Web process.

It also moves LayerHostingContext.[h|mm] to from folder "mac" to "cocoa" because LayerHostingContext
is not only used on the Mac version.
Some issues related to unified build are also fixed.

  • platform/graphics/ColorSpace.h:
  • platform/graphics/LayoutRect.h:

(WebCore::LayoutRect::encode const):
(WebCore::LayoutRect::decode):

  • platform/graphics/cocoa/WebCoreCALayerExtras.mm:

(+[CALayer _web_renderLayerWithContextID:]):

  • platform/graphics/cv/ImageTransferSessionVT.mm:

Source/WebKit:

RemoteMediaPlayerProxy in the GPU process creates a LayerHostingContext with createForExternalHostingProcess()
and share the context ID with the MediaPlayerPrivateRemote in the Web process.
Then the MediaPlayerPrivateRemote creates a hosting layer with the context ID for rendering.

This patch updates RemoteMediaPlayerProxy::PrepareForPlayback to provide the initial video content box and scale
for the VideoFullscreenLayerManagerObjC on the GPU process to create WebVideoContainerLayer.
It adds XPC message RemoteMediaPlayerManager::FirstVideoFrameAvailable to notify the renderer on the Web process that the video layer is ready.
RemoteMediaPlayerManagerProxy::SetSize message is removed to avoid the unnecessary XPC message
because MediaPlayerPrivateAVFoundationObjC::setSize() does nothing.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerContentBoxRect const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerContentsScale const):
(WebKit::RemoteMediaPlayerProxy::setSize): Deleted.

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • Platform/cocoa/LayerHostingContext.h: Renamed from Source/WebKit/Platform/mac/LayerHostingContext.h.
  • Platform/cocoa/LayerHostingContext.mm: Renamed from Source/WebKit/Platform/mac/LayerHostingContext.mm.

(WebKit::LayerHostingContext::createPlatformLayerForHostingContext):

  • Platform/ios/PaymentAuthorizationController.mm:
  • PluginProcess/mac/PluginControllerProxyMac.mm:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):
(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load):
(WebKit::MediaPlayerPrivateRemote::firstVideoFrameAvailable):
(WebKit::MediaPlayerPrivateRemote::platformLayer const):
(WebKit::MediaPlayerPrivateRemote::setSize): Deleted.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::characteristicChanged):
(WebKit::RemoteMediaPlayerManager::sizeChanged):
(WebKit::RemoteMediaPlayerManager::addRemoteVideoTrack):
(WebKit::RemoteMediaPlayerManager::removeRemoteVideoTrack):
(WebKit::RemoteMediaPlayerManager::remoteVideoTrackConfigurationChanged):
(WebKit::RemoteMediaPlayerManager::firstVideoFrameAvailable):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

LayoutTests:

  • gpu-process/TestExpectations:
6:50 PM Changeset in webkit [254554] by jiewen_tan@apple.com
  • 25 edits
    5 copies
    1 add in trunk

[WebAuthn] Implement SPI to tell UI clients to select assertion responses
https://bugs.webkit.org/show_bug.cgi?id=206112
<rdar://problem/58495733>

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API tests.

This patch adds a new delegate method in _WKWebAuthenticationPanelDelegate to tell UI clients to
select an assertion response when multiple are returned from an authenticator. Here is the SPI:
@protocol _WKWebAuthenticationPanelDelegate <NSObject>
@optional
...

  • (void)panel:(_WKWebAuthenticationPanel *)panel selectAssertionResponse:(NSArray < _WKWebAuthenticationAssertionResponse *> *)responses completionHandler:(void ()(_WKWebAuthenticationAssertionResponse *))completionHandler;

...
@end

A new interface is introduced to represent an authenticator assertion response:
@interface _WKWebAuthenticationAssertionResponse : NSObject
@property (nonatomic, readonly, copy) NSString *name;
@property (nonatomic, readonly, copy) NSString *displayName;
@property (nonatomic, readonly, copy) NSData *userHandle;
@end
Only members that can assist users to make a decision are exposed to UI clients.

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

(API::Object::newObject):

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIWebAuthenticationAssertionResponse.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.

(API::WebAuthenticationAssertionResponse::create):
(API::WebAuthenticationAssertionResponse::WebAuthenticationAssertionResponse):

  • UIProcess/API/APIWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.

(-[_WKWebAuthenticationAssertionResponse dealloc]):
(-[_WKWebAuthenticationAssertionResponse name]):
(-[_WKWebAuthenticationAssertionResponse displayName]):
(-[_WKWebAuthenticationAssertionResponse userHandle]):
(-[_WKWebAuthenticationAssertionResponse _apiObject]):

  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient):
(WebKit::WebAuthenticationPanelClient::selectAssertionResponses const):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponses:completionHandler:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-multiple-accounts.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid.html:
6:21 PM Changeset in webkit [254553] by commit-queue@webkit.org
  • 11 edits in trunk

Update API availability for autoplay event
https://bugs.webkit.org/show_bug.cgi?id=202214
<rdar://problem/55710395>

Patch by Luming Yin <luming_yin@apple.com> on 2020-01-14
Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Make enums and WKUIDelegate method related to autoplay event available on iOS.

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

(WebKit::UIDelegate::setDelegate):
(WebKit::toWKAutoplayEventFlags):
(WebKit::toWKAutoplayEvent):
(WebKit::UIDelegate::UIClient::handleAutoplayEvent):
Make delegate methods related to autoplay events available on iOS.

Tools:

  • TestWebKitAPI/Tests/WebKit/js-play-with-controls.html:
  • TestWebKitAPI/Tests/WebKitCocoa/audio-with-play-button.html:
  • TestWebKitAPI/Tests/WebKitCocoa/video-with-play-button.html:

Provide an id for each play button on various testing pages so that they can be triggered on iOS.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[AutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
(-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
(TEST):
Enable tests related to autoplay policy on iOS.

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView clickOnElementID:]):
Helper method that performs a click on a given element ID.

6:03 PM Changeset in webkit [254552] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

REGRESSION (r253394): After swiping back during a navigation, WKWebView gets stuck with the forward content, stops repainting
https://bugs.webkit.org/show_bug.cgi?id=206268
<rdar://problem/58536702>

Reviewed by Simon Fraser.

  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::endSwipeGesture):

  • UIProcess/ViewGestureController.h:
  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
After r253394, we start loading the destination page in willEndSwipeGesture,
when we know the gesture will complete, instead of in endSwipeGesture,
when it is actually done.

This means that if we decide that we should tear down the snapshot immediately,
this can now happen in the window between willEndSwipeGesture and endSwipeGesture.

However, removeSwipeSnapshot has numerous dependencies on endSwipeGesture
(especially on iOS, where there are /also/ dependencies in the other direction -
endSwipeGesture will never be called after removeSwipeSnapshot because
of the gestureID mismatch).

Regardless, it does not make sense to remove the snapshot while the animation
is still running. So, if something causes removeSwipeSnapshot to be called
before endSwipeGesture, we just set a bit and call it inside endSwipeGesture instead.

This ends up putting the snapshot removal ordering back as it was before r253394.

6:00 PM Changeset in webkit [254551] by dino@apple.com
  • 19 edits in trunk/Source

Build ANGLE as a dynamic library
https://bugs.webkit.org/show_bug.cgi?id=204708
rdar://57349384

Rolling this out for the 2nd time.

Source/ThirdParty/ANGLE:

  • it caused issues with the shared dyld cache, because the

cache doesn't know to include the libary until it already
exists in the build

  • probably related to the above, we saw some performance

regressions directly related to this change

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE.xcconfig:
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • include/CMakeLists.txt:
  • include/GLSLANG/ShaderLang.h:
  • include/GLSLANG/ShaderVars.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:

(rx::DisplayCGL::isValidNativeWindow const):

  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm:

(rx::WindowSurfaceCGL::WindowSurfaceCGL):
(rx::WindowSurfaceCGL::~WindowSurfaceCGL):

  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm:

(rx::DisplayEAGL::terminate):
(rx::DisplayEAGL::isValidNativeWindow const):
(rx::WorkerContextEAGL::~WorkerContextEAGL):

  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm:

(rx::WindowSurfaceEAGL::WindowSurfaceEAGL):
(rx::WindowSurfaceEAGL::~WindowSurfaceEAGL):

Source/WebCore:

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ANGLEWebKitBridge.cpp:

(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
(WebCore::ANGLEWebKitBridge::angleAvailable): Deleted.

  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

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

REGRESSION(iOS 13): createMediaElementSource not working
https://bugs.webkit.org/show_bug.cgi?id=203435

Reviewed by David Kilzer.

The WebContent process is missing an entitlement according to logs.

  • Scripts/process-entitlements.sh:
5:45 PM Changeset in webkit [254549] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix scanSideState assertion
https://bugs.webkit.org/show_bug.cgi?id=206257

Reviewed by Yusuke Suzuki.

  • runtime/VM.cpp:

(JSC::VM::scanSideState const):

5:39 PM Changeset in webkit [254548] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Expand WebContent process sandbox with additional syscall
https://bugs.webkit.org/show_bug.cgi?id=206260
<rdar://problem/58580997>

Reviewed by Per Arne Vollan.

Testing shows that we will improve performance on some platforms by supporting an additional Syscall.

This patch revises our sandboxes so that WebKit can use this fast path if available.

No new tests. No change in test result behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
5:32 PM Changeset in webkit [254547] by Jonathan Bedard
  • 5 edits in trunk/Tools

EWS: Run webkitpy tests with Python 2 and 3
https://bugs.webkit.org/show_bug.cgi?id=206113

Reviewed by Aakash Jain.

  • BuildSlaveSupport/ews-build/factories.py:

(WebKitPyFactory.init): Run webkitpy tests in Python 2 and Python 3.

  • BuildSlaveSupport/ews-build/factories_unittest.py:

(TestTestsFactory.test_webkitpy_factory):

  • BuildSlaveSupport/ews-build/steps.py:

(WebKitPyTest): Renamed from RunWebKitPyTests.
(RunWebKitPyPython2Tests):
(RunWebKitPyPython3Tests):
(RunWebKitPyTests): Renamed to WebKitPyTest.

  • BuildSlaveSupport/ews-build/steps_unittest.py:

(TestWebKitPyPython2Tests): Moved from TestWebKitPyTests.
(TestWebKitPyTests): Moved to TestWebKitPyPython2Tests.
(TestWebKitPyPython3Tests): Copied from TestWebKitPyPython2Tests.

5:11 PM Changeset in webkit [254546] by rniwa@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION: fast/shadow-dom/link-element-in-shadow-tree.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=171784
<rdar://problem/58123584>

Reviewed by Antti Koivisto.

The timeout is likely caused by the stylesheet not loading within 100ms timeout in the very first test case.
Load and cache the stylesheet before any test cases run to avoid this timeout.

  • fast/shadow-dom/link-element-in-shadow-tree.html:
  • platform/mac-wk2/TestExpectations: Removed the flaky test expectation.
5:08 PM Changeset in webkit [254545] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[EWS] Status bubble tooltip might display success message sometimes on a failed build
https://bugs.webkit.org/show_bug.cgi?id=206180

Reviewed by Jonathan Bedard.

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

(StatusBubble._build_bubble):
(StatusBubble._most_recent_failure_message): Returns the status from failed step instead of last step.

4:38 PM WebKitGTK/2.26.x edited by clopez@igalia.com
(diff)
4:37 PM WebKitGTK/2.26.x edited by clopez@igalia.com
(diff)
4:26 PM Changeset in webkit [254544] by weinig@apple.com
  • 4 edits
    3 moves in trunk/Source/WTF

Plaform.h helper files should have a consistent naming scheme
https://bugs.webkit.org/show_bug.cgi?id=206240

Reviewed by Dean Jackson.

Rename Plaform.h helper files to use the prefix "Platform" consistently.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CPU.h: Removed.
  • wtf/FeatureDefines.h: Removed.
  • wtf/OS.h: Removed.
  • wtf/Platform.h:
  • wtf/PlatformCPU.h: Copied from Source/WTF/wtf/CPU.h.
  • wtf/PlatformEnable.h: Copied from Source/WTF/wtf/FeatureDefines.h.
  • wtf/PlatformOS.h: Copied from Source/WTF/wtf/OS.h.
4:10 PM Changeset in webkit [254543] by Jonathan Bedard
  • 2 edits in trunk/Tools

test-webkitpy: Make json file creation Python 3 compatible
https://bugs.webkit.org/show_bug.cgi?id=206255

Reviewed by Aakash Jain.

  • Scripts/webkitpy/test/main.py:

(_print_results_as_json): Convert maps to lists.

3:50 PM Changeset in webkit [254542] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Display authors of a Web Inspector reference article
https://bugs.webkit.org/show_bug.cgi?id=206176

Reviewed by Devin Rousso.

  • wp-content/themes/webkit/single-web_inspector_page.php:
3:45 PM Changeset in webkit [254541] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Supported mime types for encoding should be supported mime types for loading
https://bugs.webkit.org/show_bug.cgi?id=206239

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-01-14
Reviewed by Simon Fraser.

Source/WebCore:

Consult isSupportedImageType() for the system supported UTI before
considering its mime type is allowed for the image DataURL encoding.

Test: fast/canvas/toDataURL-unsupportedTypes.html

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData):

LayoutTests:

  • fast/canvas/toDataURL-unsupportedTypes-expected.txt: Added.
  • fast/canvas/toDataURL-unsupportedTypes.html: Added.

Unsupported mime-types for encoding should fall back to 'image/png'.

3:35 PM Changeset in webkit [254540] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Add Markdown support for Web Inspector Reference articles
https://bugs.webkit.org/show_bug.cgi?id=206256

Reviewed by Devin Rousso.

  • wp-content/plugins/web-inspector-pages.php:
3:11 PM Changeset in webkit [254539] by Ryan Haddad
  • 25 edits
    6 deletes in trunk

Unreviewed, rolling out r254533 and r254535.
https://bugs.webkit.org/show_bug.cgi?id=206263

Breaks iOS and macOS builds (Requested by ryanhaddad on
#webkit).

Reverted changesets:

"[WebAuthn] Implement SPI to tell UI clients to select
assertion responses"
https://bugs.webkit.org/show_bug.cgi?id=206112
https://trac.webkit.org/changeset/254533

"Unreviewed, a build fix after r254533"
https://trac.webkit.org/changeset/254535

Patch by Commit Queue <commit-queue@webkit.org> on 2020-01-14

2:37 PM Changeset in webkit [254538] by Wenson Hsieh
  • 6 edits in trunk

[iOS] Keyboard input is severely delayed after switching away from unresponsive tab
https://bugs.webkit.org/show_bug.cgi?id=206242
<rdar://problem/57132891>

Reviewed by Tim Horton.

Source/WebKit:

UIKit delivers key events to WKWebView using asynchronous SPI (-handleKeyWebEvent:withCompletionHandler:). The
completion handler is invoked when the web page has processed the event, and determines whether to proceed with
default behavior via the BOOL handled argument. Using UIKeyboardImpl's UIKeyboardTaskQueue, UIKit appends
subsequent key events to a queue, to be processed by the current first responder after the current key event
has been handled.

In the scenario where the web page is completely unresponsive, this means key events that come after an event
that has been dispatched to the unresponsive page will be stuck in the task queue; this manifests in behaviors
similar to the one in this bug:

  • Using a hardware keyboard, press any key in an unresponsive page in Safari.
  • Press CMD+T (to create a new tab and focus the unified field) or CMT+L (to just focus the unified field).
  • Try to type in the unified field.

The result is that no characters are inserted in the unified field, because the hardware key events are stuck in
UIKeyboardTaskQueue waiting for the unresponsive page to finish handling the current key event. To fix this, we
introduce a mechanism for invoking the key event handler on WKContentView before the web page has actually
finished processing the event, but only in the case where the web view has resigned first responder (and
therefore won't receive subsequent key events anyways).

Tests: KeyboardInputTests.ResigningFirstResponderCancelsKeyEvents

KeyboardInputTests.WaitForKeyEventHandlerInFirstResponder

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::hasQueuedKeyEvent const):
(WebKit::WebPageProxy::firstQueuedKeyEvent const):

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

(-[WKContentView resignFirstResponderForWebView]):

After the content view has resigned first responder with a pending key event handler (and if it did not
immediately become first responder again in the same runloop), then invoke the key event handler early, passing
in YES for handled to prevent any default actions such as text insertion from being dispatched to the view.

Tools:

Add a couple of new API tests: (1) verify that the key event completion handler can still be invoked in an
unresponsive web view after resigning first responder, and (2) verify that we'll try to wait for the current
key event to be processed in a web view, if it remains the first responder.

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
2:35 PM Changeset in webkit [254537] by Alan Coon
  • 7 edits in branches/safari-610.1.1-branch

Revert r254334. rdar://problem/58542040

2:35 PM Changeset in webkit [254536] by Alan Coon
  • 23 edits in branches/safari-610.1.1-branch

Revert r254521. rdar://problem/58542040

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

Unreviewed, a build fix after r254533

  • UIProcess/WebAuthentication/fido/FidoAuthenticator.cpp:
2:13 PM Changeset in webkit [254534] by mmaxfield@apple.com
  • 18 edits
    4 adds in trunk

[Cocoa] Glyph lookup should be language-sensitive (specifically between Yiddish and Hebrew)
https://bugs.webkit.org/show_bug.cgi?id=77568
<rdar://problem/14649193>

Reviewed by Simon Fraser.

Source/WebCore:

Switch from CTFontTransformGlyphs() to CTFontTransformGlyphsWithLanguage().

CTFontTransformGlyphsWithLanguage() accepts a callback when it needs to insert
glyphs and the glyph buffer isn't big enough. This patch hooks up this callback to
a "makeHole()" function which reallocs the glyph buffer so the hole can be filled in
by shaping.

We cache the CFDictionaries of the CFAttributedString we pass into CoreText using a
HashMap stored in Font.

Tests: fast/text/locale-shaping-complex.html

fast/text/locale-shaping.html

  • platform/graphics/Font.cpp:

(WebCore::Font::applyTransforms const):

  • platform/graphics/Font.h:

(WebCore::Font::CFStringAttributesKey::CFStringAttributesKey):
(WebCore::Font::CFStringAttributesKey::operator== const):
(WebCore::Font::CFStringAttributesKey::operator!= const):
(WebCore::Font::CFStringAttributesKey::isHashTableDeletedValue const):
(WebCore::Font::CFStringAttributesKey::computeHash const):
(WebCore::Font::CFStringAttributesKeyHash::hash):
(WebCore::Font::CFStringAttributesKeyHash::equal):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::isEmpty const):
(WebCore::GlyphBuffer::size const):
(WebCore::GlyphBuffer::clear):
(WebCore::GlyphBuffer::advances const):
(WebCore::GlyphBuffer::fontAt const):
(WebCore::GlyphBuffer::add):
(WebCore::GlyphBuffer::remove):
(WebCore::GlyphBuffer::makeHole):
(WebCore::GlyphBuffer::shrink):
(WebCore::GlyphBuffer::swap):
(WebCore::GlyphBuffer::advancesCount const): Deleted.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):

  • platform/graphics/WidthIterator.h:
  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::applyTransforms const):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • platform/graphics/mac/SimpleFontDataCoreText.cpp:

(WebCore::Font::getCFStringAttributes const):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/Platform.h:

LayoutTests:

  • fast/text/locale-shaping-complex-expected-mismatch.html: Added.
  • fast/text/locale-shaping-complex.html: Added.
  • fast/text/locale-shaping-expected-mismatch.html: Added.
  • fast/text/locale-shaping.html: Added.
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
1:37 PM Changeset in webkit [254533] by jiewen_tan@apple.com
  • 23 edits
    5 copies
    1 add in trunk

[WebAuthn] Implement SPI to tell UI clients to select assertion responses
https://bugs.webkit.org/show_bug.cgi?id=206112
<rdar://problem/58495733>

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API tests.

This patch adds a new delegate method in _WKWebAuthenticationPanelDelegate to tell UI clients to
select an assertion response when multiple are returned from an authenticator. Here is the SPI:
@protocol _WKWebAuthenticationPanelDelegate <NSObject>
@optional
...

  • (void)panel:(_WKWebAuthenticationPanel *)panel selectAssertionResponse:(NSArray < _WKWebAuthenticationAssertionResponse *> *)responses completionHandler:(void ()(_WKWebAuthenticationAssertionResponse *))completionHandler;

...
@end

A new interface is introduced to represent an authenticator assertion response:
@interface _WKWebAuthenticationAssertionResponse : NSObject
@property (nonatomic, readonly, copy) NSString *name;
@property (nonatomic, readonly, copy) NSString *displayName;
@property (nonatomic, readonly, copy) NSData *userHandle;
@end
Only members that can assist users to make a decision are exposed to UI clients.

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

(API::Object::newObject):

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIWebAuthenticationAssertionResponse.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.

(API::WebAuthenticationAssertionResponse::create):
(API::WebAuthenticationAssertionResponse::WebAuthenticationAssertionResponse):

  • UIProcess/API/APIWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.

(-[_WKWebAuthenticationAssertionResponse dealloc]):
(-[_WKWebAuthenticationAssertionResponse name]):
(-[_WKWebAuthenticationAssertionResponse displayName]):
(-[_WKWebAuthenticationAssertionResponse userHandle]):
(-[_WKWebAuthenticationAssertionResponse _apiObject]):

  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h: Copied from Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h.
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient):
(WebKit::WebAuthenticationPanelClient::selectAssertionResponses const):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:selectAssertionResponses:completionHandler:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-multiple-accounts.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid.html:
1:32 PM Changeset in webkit [254532] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Pass ImageDiff commands in a single write
https://bugs.webkit.org/show_bug.cgi?id=206194
<rdar://problem/58578775>

Reviewed by Stephanie Lewis.

ImageDiff can encounter race conditions if it is fed content in multiple writes,
instead of in a single block.

  • Scripts/webkitpy/port/image_diff.py:

(ImageDiffer.diff_image): Pass ImageDiff data in a single write command.

  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase.test_diff_imagemissing_both): diff_image only accepts byte arrays.
(PortTestCase.test_diff_image
missing_actual): Ditto.
(PortTestCase.test_diff_imagemissing_expected): Ditto.
(PortTestCase.test_diff_image): Ditto.
(PortTestCase.test_diff_image_passed): Ditto.
(PortTestCase.test_diff_image_failed): Ditto.
(PortTestCase.test_diff_image_crashed): Ditto.

1:24 PM Changeset in webkit [254531] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

Gardening after r251750
https://bugs.webkit.org/show_bug.cgi?id=206249

Patch by Lauro Moura <Lauro Moura> on 2020-01-14
Reviewed by Žan Doberšek.

  • platform/gtk/fast/css/hsl-color-expected.txt:
  • platform/gtk/fast/css/hsla-color-expected.txt:
1:23 PM Changeset in webkit [254530] by mmaxfield@apple.com
  • 4 edits in trunk/LayoutTests

[iOS] fast/forms/contenteditable-font-optical-size.html landed flaky
https://bugs.webkit.org/show_bug.cgi?id=203371
<rdar://problem/56590026>

Reviewed by Wenson Hsieh.

  • fast/forms/contenteditable-font-optical-size-expected.txt:
  • fast/forms/contenteditable-font-optical-size.html:
  • platform/ios-wk2/TestExpectations:
1:19 PM Changeset in webkit [254529] by mmaxfield@apple.com
  • 3 edits
    1 delete in trunk/LayoutTests

REGRESSION: [ Catalina wk1 ] editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205814
<rdar://problem/58347056>

Unreviewed test gardening.

  • editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2-expected.txt: Removed.
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-with-style-2-expected.txt:
1:01 PM Changeset in webkit [254528] by Jon Davis
  • 2 edits in trunk/Websites/webkit.org

Fix blog post article title justification
https://bugs.webkit.org/show_bug.cgi?id=206245

Reviewed by Devin Rousso.

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

(main h1):

1:00 PM WebKitGTK/MaintenanceTips edited by clopez@igalia.com
(diff)
12:51 PM Changeset in webkit [254527] by basuke.suzuki@sony.com
  • 7 edits in trunk/Source/bmalloc

[bmalloc] Calculate LineMetadata for specific VM page size in compile time
https://bugs.webkit.org/show_bug.cgi?id=206044

Reviewed by Yusuke Suzuki.

LineMetadata is dependent only on VM page size. This patch enables the pre-calculation for
specific VM page sizes by compiler flags. The benefit is both runtime initialization speed
up and avoiding extra VM allocation on runtime.

First targets are 4k (Mac) and 16k (some iOS, PlayStation) VM page sizes.

  • bmalloc/Algorithm.h:

(bmalloc::divideRoundingUp):

  • bmalloc/BPlatform.h:
  • bmalloc/HeapConstants.cpp:

(bmalloc::fillLineMetadata):
(bmalloc::computeLineMetadata):
(bmalloc::HeapConstants::initializeLineMetadata):

  • bmalloc/HeapConstants.h:

(bmalloc::HeapConstants::smallLineCount const):
(bmalloc::HeapConstants::startOffset const):
(bmalloc::HeapConstants::objectCount const):
(bmalloc::HeapConstants::lineMetadata const):
(bmalloc::HeapConstants::startOffset): Deleted.
(bmalloc::HeapConstants::objectCount): Deleted.
(bmalloc::HeapConstants::lineMetadata): Deleted.

  • bmalloc/LineMetadata.h:
  • bmalloc/Sizes.h:

(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::logSizeClass):
(bmalloc::Sizes::logObjectSize):
(bmalloc::Sizes::sizeClass):
(bmalloc::Sizes::objectSize):
(bmalloc::Sizes::pageSize):
(bmalloc::Sizes::smallLineCount):

12:46 PM Changeset in webkit [254526] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

[PlayStation] Add standardUserAgentForURL stub
https://bugs.webkit.org/show_bug.cgi?id=206247

Reviewed by Don Olmstead.

  • platform/playstation/UserAgentPlayStation.cpp:

(WebCore::standardUserAgentForURL):

12:19 PM Changeset in webkit [254525] by Diego Pino Garcia
  • 2 edits
    2 adds in trunk/LayoutTests

[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=206224

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-sizing/button-min-width-expected.txt: Added.
12:03 PM Changeset in webkit [254524] by Ross Kirsling
  • 3 edits
    1 move
    1 add in trunk/Source/WebKit

WebPasteboardProxyWPE should be WebPasteboardProxyLibWPE
https://bugs.webkit.org/show_bug.cgi?id=206243

Reviewed by Adrian Perez de Castro.

WebPasteboardProxy.h already has USE(LIBWPE) so we basically just need to move the file.

  • SourcesWPE.txt:
  • UIProcess/WebPasteboardProxy.cpp:
  • UIProcess/libwpe/WebPasteboardProxyLibWPE.cpp: Renamed from Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp.
12:00 PM Changeset in webkit [254523] by Devin Rousso
  • 2 edits in trunk/Source/JavaScriptCore

Web Inspector: crash in DumpRenderTree at com.apple.JavaScriptCore: WTF::RefCountedBase::hasOneRef const
https://bugs.webkit.org/show_bug.cgi?id=206191
<rdar://problem/58415623>

Reviewed by Joseph Pecoraro.

  • debugger/Debugger.cpp:

(JSC::Debugger::attach):
(GatherSourceProviders::GatherSourceProviders): Deleted.
(GatherSourceProviders::operator()): Deleted.
Use RefPtr<SourceProvider> instead of SourceProvider* in case the FunctionExecutable
is destroyed after the SourceProvider* is saved, which would destroy the SourceProvider
as well.

11:37 AM Changeset in webkit [254522] by Alan Coon
  • 7 edits in branches/safari-610.1.1-branch/Source/WebKit

Cherry-pick r254433. rdar://problem/58554516

[macCatalyst] UI process crashes on launch after r254101
https://bugs.webkit.org/show_bug.cgi?id=206156
<rdar://problem/58514942>

Reviewed by Brent Fulgham.

Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on
macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it
should be defined only on iOS, watchOS and tvOS.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

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

11:37 AM Changeset in webkit [254521] by Alan Coon
  • 23 edits in branches/safari-610.1.1-branch

Revert r254392. rdar://problem/58542040

11:28 AM Changeset in webkit [254520] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Need workaround for crash in Intel OpenGL driver related to texture copying feedback loops
https://bugs.webkit.org/show_bug.cgi?id=205843

Source/ThirdParty/ANGLE:

Remove ANGLE workaround introduced in bug 205707, as it was
discovered to be incomplete, and was never upstreamed. The correct
workaround will be integrated in the next ANGLE roll.

Patch by Kenneth Russell <kbr@chromium.org> on 2020-01-14
Reviewed by Dean Jackson.

  • include/platform/FeaturesGL.h:
  • src/libANGLE/renderer/gl/StateManagerGL.cpp:

(rx::StateManagerGL::bindFramebuffer):

  • src/libANGLE/renderer/gl/renderergl_utils.cpp:

(rx::nativegl_gl::InitializeFeatures):

Source/WebCore:

Work around bug in Intel OpenGL driver related to
glCopyTex{Sub}Image/glDeleteTextures by flushing before texture
deletion, if a copy to a texture has been performed recently.

Tested with a forthcoming WebGL conformance test.

Patch by Kenneth Russell <kbr@chromium.org> on 2020-01-14
Reviewed by Dean Jackson.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::copyTexImage2D):
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage2D):
(WebCore::GraphicsContextGLOpenGL::finish):
(WebCore::GraphicsContextGLOpenGL::flush):
(WebCore::GraphicsContextGLOpenGL::deleteTexture):

11:05 AM Changeset in webkit [254519] by eric.carlson@apple.com
  • 13 edits
    1 add in trunk/Source/WebKit

Nake MediaPlayerPrivateRemoteProxy a message receiver
https://bugs.webkit.org/show_bug.cgi?id=206237
<rdar://problem/58569057>

Reviewed by Youenn Fablet.

No new tests, no functional change.

Make MediaPlayerPrivateRemoteProxy a message receiver so we don't need a trampoline
for every method in the MediaPlayerPrivateRemoteManagerProxy.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::didReceivePlayerMessage):
(WebKit::RemoteMediaPlayerManagerProxy::prepareForPlayback): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::load): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::cancelLoad): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::prepareToPlay): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::play): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::pause): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::seek): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::seekWithTolerance): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setVolume): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setMuted): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setPreload): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setPrivateBrowsingMode): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setPreservesPitch): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::prepareForRendering): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setSize): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setVisible): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setShouldMaintainAspectRatio): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setVideoFullscreenFrame): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setVideoFullscreenGravity): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::acceleratedRenderingStateChanged): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setShouldDisableSleep): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::setRate): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::audioTrackSetEnabled): Deleted.
(WebKit::RemoteMediaPlayerManagerProxy::videoTrackSetSelected): Deleted.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:

(WebKit::AudioTrackPrivateRemote::setEnabled):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):
(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote::load):
(WebKit::MediaPlayerPrivateRemote::cancelLoad):
(WebKit::MediaPlayerPrivateRemote::prepareToPlay):
(WebKit::MediaPlayerPrivateRemote::play):
(WebKit::MediaPlayerPrivateRemote::pause):
(WebKit::MediaPlayerPrivateRemote::setPreservesPitch):
(WebKit::MediaPlayerPrivateRemote::setVolumeDouble):
(WebKit::MediaPlayerPrivateRemote::setMuted):
(WebKit::MediaPlayerPrivateRemote::setPreload):
(WebKit::MediaPlayerPrivateRemote::setPrivateBrowsingMode):
(WebKit::MediaPlayerPrivateRemote::seek):
(WebKit::MediaPlayerPrivateRemote::seekWithTolerance):
(WebKit::MediaPlayerPrivateRemote::prepareForRendering):
(WebKit::MediaPlayerPrivateRemote::setSize):
(WebKit::MediaPlayerPrivateRemote::setVisible):
(WebKit::MediaPlayerPrivateRemote::setShouldMaintainAspectRatio):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenFrame):
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenGravity):
(WebKit::MediaPlayerPrivateRemote::acceleratedRenderingStateChanged):
(WebKit::MediaPlayerPrivateRemote::setShouldDisableSleep):

  • WebProcess/GPU/media/VideoTrackPrivateRemote.cpp:

(WebKit::VideoTrackPrivateRemote::setSelected):

10:37 AM Changeset in webkit [254518] by don.olmstead@sony.com
  • 6 edits
    1 move
    1 delete in trunk/Source/WebKit

Share TextChecker stub for ports without text checking
https://bugs.webkit.org/show_bug.cgi?id=205964

Reviewed by Ross Kirsling.

No new tests. No change in behavior.

The Windows and WPE ports have the same stub for text checking. Combine those
two for non-Cocoa and non-GTK ports.

  • PlatformFTW.cmake:
  • PlatformWin.cmake:
  • Sources.txt:
  • SourcesWPE.txt:
  • UIProcess/TextChecker.cpp: Renamed from Source/WebKit/UIProcess/wpe/TextCheckerWPE.cpp.

(WebKit::checkerState):
(WebKit::TextChecker::state):
(WebKit::TextChecker::checkTextOfParagraph):

  • UIProcess/win/TextCheckerWin.cpp: Removed.
  • WebKit.xcodeproj/project.pbxproj:
10:08 AM Changeset in webkit [254517] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Add an option that enables/disables throwing away baseline JIT code
https://bugs.webkit.org/show_bug.cgi?id=206244

Reviewed by Robin Morisset.

This option is now set to false as I investigate a perf regression with
the original patch.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeUnconditionally):

  • runtime/OptionsList.h:
9:48 AM Changeset in webkit [254516] by Ryan Haddad
  • 18 edits
    9 deletes in trunk

Unreviewed, rolling out r254505.

Breaks watchOS/tvOS/Catalyst builds.

Reverted changeset:

"Add support for MediaStream audio track rendering in
GPUProcess"
https://bugs.webkit.org/show_bug.cgi?id=206175
https://trac.webkit.org/changeset/254505

9:26 AM Changeset in webkit [254515] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Suppress compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=206235

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-01-14
Reviewed by Youenn Fablet.

Use PRIu64 formatter for uint64_t instead of %llu.

No functional changes.

  • UIProcess/WebPageProxy.cpp:
9:16 AM Changeset in webkit [254514] by Darin Adler
  • 41 edits
    1 delete in trunk

Use even more "shortest form" formatting, and less "fixed precision" and "fixed width"
https://bugs.webkit.org/show_bug.cgi?id=198918

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • API/tests/ExecutionTimeLimitTest.cpp:

(testExecutionTimeLimit): Rewrote the string creation code to use makeString instead
of StringBuilder and no longer use any fixed precision.

  • runtime/Options.cpp:

(JSC::OptionReader::Option::dump const): Dump doubles with shortest form instead of
fixed precision.

Source/WebCore:

The places left untouched are the ones where changing behavior has some kind of unwanted
observable effect for one of two reasons. Otherwise, switched almost all call sites.

1) Substantial number of test results that depend on the current behavior.

2) Poor rounding resulting in conversion from float to double and back (or similar) that

results in values with tiny fractional residue like "6.000001".

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::changeValueByStep): Use shortest instead of fixed.
(WebCore::AccessibilityNodeObject::changeValueByPercent): Ditto.

  • css/CSSAspectRatioValue.cpp:

(WebCore::CSSAspectRatioValue::customCSSText const): Ditto.

  • css/CSSFontVariationValue.cpp:

(WebCore::CSSFontVariationValue::customCSSText const): Ditto. Also use makeString instead of
StringBuilder for better efficiency.

  • css/CSSGradientValue.cpp:

(WebCore::appendGradientStops): Ditto.

  • css/CSSKeyframeRule.cpp:

(WebCore::StyleRuleKeyframe::keyText const): Ditto.

  • css/CSSTimingFunctionValue.cpp:

(WebCore::CSSCubicBezierTimingFunctionValue::customCSSText const): Ditto.

  • css/MediaQueryEvaluator.cpp:

(WebCore::aspectRatioValueAsString): Ditto.

  • css/TransformFunctions.h: Removed unnneeded forward declarations.
  • css/parser/CSSParserToken.cpp:

(WebCore::CSSParserToken::serialize const): Use shortest instead of fixed.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::completeURLsInAttributeValue const): Ditto.

  • html/track/VTTCue.cpp:

(WebCore::VTTCueBox::applyCSSProperties): Use shortest instead of fixed.
Also wrote a FIXME abot this strange code that uses "calc()" to do math on two numbers,
math that could instead be done by the code converting the numbers to a style string.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawRulers): Use shortest instead of fixed.

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const): Ditto.

  • page/scrolling/AxisScrollSnapOffsets.cpp:

(WebCore::snapOffsetsToString): Ditto.
(WebCore::snapOffsetRangesToString): Ditto.
(WebCore::snapPortOrAreaToString): Ditto.

  • platform/graphics/Color.cpp:

(WebCore::decimalDigit): Added.
(WebCore::serializedFractionDigitsForFractionalAlphaValue): Added.
(WebCore::Color::cssText const): Rewrote to generate the same results using
makeString rather than StringBuilder, and integer math rather than converting from
integer to floating point and then doing floating point math.

  • platform/graphics/ExtendedColor.cpp:

(WebCore::ExtendedColor::cssText const): Use shortest instead of fixed.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo): Ditto.

  • svg/SVGAngleValue.cpp:

(WebCore::SVGAngleValue::valueAsString const): Ditto.

  • svg/SVGLengthList.h: Added now-needed include of StringBuilder.h.
  • svg/SVGLengthValue.cpp:

(WebCore::SVGLengthValue::valueAsString const): Use shortest instead of fixed.

  • svg/SVGNumberList.h: Ditto.
  • svg/SVGPathStringBuilder.cpp:

(WebCore::appendFlag): Use multiple-argument append for better efficiency.
(WebCore::appendNumber): Added a comment about why we can't yet convert this to use
shortest instead of fixed: code that parses floats but then creates a CG path
that stores things as double and does math as double then converts back to float
results in float values that didn't round trip well and have fractions. This is
smoothed away (hidden) by using fixed precision to conver them to strings.
(WebCore::appendPoint): Call appendNumber to cut down on repeated code.

  • svg/SVGPointList.h: Use shortest instead of fixed.
  • svg/SVGTransformValue.h:

(WebCore::SVGTransformValue::prefixForTransfromType): Return a string literal
instead of a WTF::String to avoid creating and destroying an object each time.
(WebCore::SVGTransformValue::appendFixedPrecisionNumbers): Added a comment explaining
why we need to continue to use fixed precision here. Same issue with CGAffineTransform
using double as we have with CGPath above.

  • svg/properties/SVGPropertyTraits.h:

(WebCore::SVGPropertyTraits<float>::toString): Use shortest instead of fixed.
(WebCore::SVGPropertyTraits<FloatPoint>::toString): Ditto.
(WebCore::SVGPropertyTraits<FloatRect>::toString): Ditto.

  • testing/Internals.cpp:

(WebCore::Internals::dumpMarkerRects): Added a comment explaining why we have to use
fixed precision here. There are many test results that we would need to update.
(WebCore::Internals::configurationForViewport): Ditto.
(WebCore::Internals::getCurrentCursorInfo): Use shortest instead of fixed.

  • xml/XPathValue.cpp:

(WebCore::XPath::Value::toString const): Ditto.

Source/WebKit:

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::dumpContentsToFile): Use shortest instead of fixed.
Also use makeString instead of StringBuilder.

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::asJSON const): Use shortest instead of fixed.
Also use multiple-argument append on StringBuilder to make the function shorter
and easier to read.

  • Shared/Gamepad/GamepadData.cpp:

(WebKit::GamepadData::loggingString const): Ditto.

  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
Use shortest instead of fixed.

Source/WTF:

  • wtf/Logger.h:

(WTF::LogArgument::toString): Log floating point numbers as shortest form instead of fixed precision.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::toString const): Convert time to string as shortest form instead of fixed precision.
Also use multiple-argument append for great simplicity and clarity.

LayoutTests:

  • platform/mac/svg/dom/length-list-parser-expected.png: Removed. Not sure how many other pixel

results we have like this, but this included an ancient style Aqua scrollbar so hasn't matched
anything for years and would clearly not have any value for regression testing.

  • svg/dom/length-list-parser-expected.txt: Updated to expect logging of a 7 digit length as an

integer rather than rounded as "d.ddddd+6".

8:52 AM Changeset in webkit [254513] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk/LayoutTests

[GTK][WPE] Failures in imported/w3c/web-platform-tests/2dcontext/imagebitmap due to missing OffscreenCanvas.copiedImage
https://bugs.webkit.org/show_bug.cgi?id=206221

Unreviewed test gardening.

Patch by Chris Lord <Chris Lord> on 2020-01-14

  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-flipY-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-flipY-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
8:37 AM Changeset in webkit [254512] by Peng Liu
  • 2 edits in trunk/Source/WebCore

A video element cannot enter fullscreen from PiP mode
https://bugs.webkit.org/show_bug.cgi?id=204468

Reviewed by Eric Carlson.

This patch fixes two issues:

  • Make sure the message exchanges between WebContent and UI process can complete in the scenario that switching to fullscreen from PiP.
  • Do not send fullscreenModeChanged event with mode = 3 (both fullscreen and Picture-in-Picture) to WebContent process.

We need to use API tests to verify the fix.
No new tests are added because of webkit.org/b/203724.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::didStopPictureInPicture):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
(VideoFullscreenInterfaceAVKit::setMode):

8:22 AM Changeset in webkit [254511] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

[GLib] Remove unused private variable
https://bugs.webkit.org/show_bug.cgi?id=206232

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2020-01-14
Reviewed by Carlos Garcia Campos.

Remove m_context which is not used.

No functional changes.

  • UIProcess/API/glib/WebKitProtocolHandler.cpp:

(WebKit::WebKitProtocolHandler::WebKitProtocolHandler):

  • UIProcess/API/glib/WebKitProtocolHandler.h:
8:06 AM Changeset in webkit [254510] by Antti Koivisto
  • 11 edits in trunk

[LFC][Integration] Support the feature flag in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=206218

Reviewed by Zalan Bujtas.

Source/WebKitLegacy/mac:

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

(+[WebPreferences initialize]):
(-[WebPreferences layoutFormattingContextIntegrationEnabled]):
(-[WebPreferences setLayoutFormattingContextIntegrationEnabled:]):

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

(-[WebView _preferencesChanged:]):

Tools:

This allows tests to turn off the feature in WK1 if needed.

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):

LayoutTests:

  • platform/mac-wk1/TestExpectations:
7:22 AM Changeset in webkit [254509] by aboya@igalia.com
  • 5 edits in trunk

[WTF] Make MediaTime constructor constexpr
https://bugs.webkit.org/show_bug.cgi?id=206036

Reviewed by Adrian Perez de Castro.

Source/WTF:

https://bugs.webkit.org/show_bug.cgi?id=205723 allowed to declare
MediaTime variables as static inside functions without needing a
global destructor.

It did not eliminate the call to the MediaTime constructor on runtime
though. This wasn't a problem for static variables inside functions,
as the compiler adds a guard variable to call the constructor the
first time the function is called.

On the other hand, for variables defined outside of the scope of the
function, for them to be initialized the MediaTime constructor would
have to be called at runtime from a global constructor, something
we're trying to avoid and which generates an error in clang.

But again, MediaTime is a simple class with only integral values, we
shouldn't need a runtime function call to initialize it!

This patch makes the MediaTime constructor constexpr so that we don't
need runtime initialization for static MediaTime variables. This
allows us to declare them outside functions and enables the compiler
to generate code without guard variables when static MediaTime
variables are declared inside functions.

A test has been added accessing a global const static MediaTime. The
build should not produce any error stating the need for a global
constructor.

  • wtf/MediaTime.cpp:
  • wtf/MediaTime.h:

(WTF::MediaTime::MediaTime):

Tools:

Added test for global static MediaTime constants.

  • TestWebKitAPI/Tests/WTF/MediaTime.cpp:

(TestWebKitAPI::TEST):

6:51 AM Changeset in webkit [254508] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] Unreviewed build warning fix after r254503

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::dataReceived):

6:49 AM Changeset in webkit [254507] by Philippe Normand
  • 4 edits in trunk/Source/WebCore

[GStreamer] improve video rendering stats
https://bugs.webkit.org/show_bug.cgi?id=143827

Reviewed by Xabier Rodriguez-Calvar.

Enable fpsdisplaysink unconditionally for statistics retrieval. If
GStreamer 1.18 (current git master is 1.17) is detected at runtime
we can simply use the new basesink stats property, so proxy it
in our custom GL sink. The ENABLE(MEDIA_STATISTICS) feature seems
to have been deprecated in favor of the
HTMLVideoElement.getVideoPlaybackQuality() interface so remove the
unused corresponding MediaPlayerPrivate method overrides.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkGetProperty):
(webkit_gl_video_sink_class_init):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
(WebCore::MediaPlayerPrivateGStreamer::videoPlaybackQualityMetrics):
(WebCore::MediaPlayerPrivateGStreamer::decodedFrameCount const): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::droppedFrameCount const): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::audioDecodedByteCount const): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::videoDecodedByteCount const): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
6:40 AM Changeset in webkit [254506] by clopez@igalia.com
  • 12 edits
    3 adds in trunk

[Freetype] Support for the -webkit-font-smoothing CSS property
https://bugs.webkit.org/show_bug.cgi?id=54763

Reviewed by Simon Fraser.

Source/WebCore:

Pass the smoothing preference defined on the CSS style, so its
taken into account when drawing the font. If the CSS doesn't
specify any preference then it behaves like before this patch
(it tries to automatically antialias the font, if supported).

This patch sets the antialiasing value at drawing time without
affecting the font, like the Mac/iOS ports do. This approach is
maybe less efficient than taking into account the antialiasing
value when the font platform data its created, but its a better
fit for the current cross-platform code.
I did some benchmarks (see the bug above if you are curious) and
I was unable to prove this method is less efficient than setting
the antialising value when the font platform data is created.

Test: platform/gtk/fonts/webkit-font-smoothing.html

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawGlyphsToContext):
(WebCore::Cairo::drawGlyphsShadow):
(WebCore::Cairo::drawGlyphs):

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/CairoUtilities.cpp:
  • platform/graphics/cairo/CairoUtilities.h:
  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:

(WebCore::GraphicsContextImplCairo::drawGlyphs):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::drawGlyphs):

LayoutTests:

Add a regression test. This test is specific for platform gtk because
it depends on the custom fonts.conf file that its used for GTK layout
tests.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/css/font-smoothing-expected.png:
  • platform/gtk/fonts/webkit-font-smoothing-expected.html: Added.
  • platform/gtk/fonts/webkit-font-smoothing.html: Added.
  • platform/wpe/TestExpectations:
  • platform/wpe/fast/css/font-smoothing-expected.png: Added.
6:37 AM Changeset in webkit [254505] by youenn@apple.com
  • 18 edits
    1 copy
    8 adds in trunk

Add support for MediaStream audio track rendering in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=206175

Reviewed by Eric Carlson.

Source/WebCore:

Simplify model to use start/stop instead of setPaused.
Simplify and fix issue in computation of the muted state of the renderer.
Covered by existing tests run with GPU process enabled and manual testing

  • platform/mediastream/AudioMediaStreamTrackRenderer.h:
  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::playInternal):
(WebCore::AudioTrackPrivateMediaStream::pause):
(WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
(WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:

(WebCore::AudioMediaStreamTrackRendererCocoa::start):
(WebCore::AudioMediaStreamTrackRendererCocoa::stop):
(WebCore::AudioMediaStreamTrackRendererCocoa::clear):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
(WebCore::AudioMediaStreamTrackRendererCocoa::render):

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h:

Source/WebKit:

Implement an AudioMediaStreamTrackRenderer at WebKit level by creating a remote renderer in GPUProcess and sending IPC to pass
audio data as well as orders (start/stop/setMuted).

Implement the remote renderer using WebCore audio track renderer.

Enable WebKit remote renderer F GPU process for media is enabled.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::audioTrackRendererManager):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: Added.

(WebKit::nextLogIdentifier):
(WebKit::nullLogger):
(WebKit::RemoteAudioMediaStreamTrackRenderer::RemoteAudioMediaStreamTrackRenderer):
(WebKit::RemoteAudioMediaStreamTrackRenderer::~RemoteAudioMediaStreamTrackRenderer):
(WebKit::RemoteAudioMediaStreamTrackRenderer::storage):
(WebKit::RemoteAudioMediaStreamTrackRenderer::start):
(WebKit::RemoteAudioMediaStreamTrackRenderer::stop):
(WebKit::RemoteAudioMediaStreamTrackRenderer::clear):
(WebKit::RemoteAudioMediaStreamTrackRenderer::setMuted):
(WebKit::RemoteAudioMediaStreamTrackRenderer::setVolume):
(WebKit::RemoteAudioMediaStreamTrackRenderer::audioSamplesStorageChanged):
(WebKit::RemoteAudioMediaStreamTrackRenderer::audioSamplesAvailable):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.h: Added.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.messages.in: Added.
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp: Added.

(WebKit::RemoteAudioMediaStreamTrackRendererManager::didReceiveRendererMessage):
(WebKit::RemoteAudioMediaStreamTrackRendererManager::createRenderer):
(WebKit::RemoteAudioMediaStreamTrackRendererManager::releaseRenderer):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h: Added.

(WebKit::RemoteAudioMediaStreamTrackRendererManager::didReceiveMessageFromWebProcess):

  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.messages.in: Added.
  • Scripts/webkit/messages.py:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::updatePreferences):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp: Added.

(WebKit::AudioMediaStreamTrackRenderer::create):
(WebKit::AudioMediaStreamTrackRenderer::AudioMediaStreamTrackRenderer):
(WebKit::AudioMediaStreamTrackRenderer::~AudioMediaStreamTrackRenderer):
(WebKit::AudioMediaStreamTrackRenderer::start):
(WebKit::AudioMediaStreamTrackRenderer::stop):
(WebKit::AudioMediaStreamTrackRenderer::clear):
(WebKit::AudioMediaStreamTrackRenderer::setMuted):
(WebKit::AudioMediaStreamTrackRenderer::setVolume):
(WebKit::AudioMediaStreamTrackRenderer::pushSamples):
(WebKit::AudioMediaStreamTrackRenderer::storageChanged):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h: Added.

(WebKit::AudioMediaStreamTrackRenderer::identifier const):

  • WebProcess/GPU/webrtc/AudioMediaStreamTrackRendererIdentifier.h: Added.

LayoutTests:

  • gpu-process/TestExpectations:
5:12 AM Changeset in webkit [254504] by Pablo Saavedra
  • 1 edit
    31 adds in trunk/LayoutTests

[GTK] Many imported/w3c/web-platform-tests/html/ tests failing after r253791
https://bugs.webkit.org/show_bug.cgi?id=206127
<rdar://problem/58555260>

Unreviewed test gardening.

  • platform/gtk/imported/w3c/web-platform-tests/html/browsers/sandboxing/sandbox-parse-noscript-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/editing/editing-0/autocapitalization/autocapitalize-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/form-controls/resets-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-generated-content-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-sans-fieldset-display-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/abspos-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/grid-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/media_fragment_seek-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/video_loop_base-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_allow_downloads.sub.tentative-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigation_download_block_downloads.sub.tentative-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/valid-content-type.tentative-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt: Added.
2:16 AM Changeset in webkit [254503] by calvaris@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer] Rework WebKitWebSrc to improve robustness
https://bugs.webkit.org/show_bug.cgi?id=206003

Reviewed by Philippe Normand.

Reworked how the web source deals with data. It's more eager now
in pushing data downstream. We don't use the GstAdapter methods
marked as fast anymore because sometimes it was slower. The reason
why this was slower is that we can be waiting for more "fast"
(that could be retrieved with the _fast API) buffers to be
available even in cases where the queue is not empty. These other
buffers can be retrieved with the "non _fast" API.

The streaming thread locks now when it has no data to push
downstream and restarts the download if needed.

In this patch we also fixed the possible race condition of
receiving a flush during the streaming thread wait.

No new tests, just a rework.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::updateStates): Added FALLTHROUGH.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(restartLoaderIfNeeded):
(stopLoaderIfNeeded): Refactored.
(webKitWebSrcCreate): Avoid adapter methods marked as fast,
otherwise we might be waiting for data we already have. Streaming
thread is now going to lock waiting for data and is more eager in
pushing data downstream.
(webKitWebSrcStop): No more queueSize.
(webKitWebSrcDoSeek):
(webKitWebSrcUnLock):
(webKitWebSrcChangeState): Notify streaming thread.
(CachedResourceStreamingClient::checkUpdateBlocksize): Blocksize
adjustment improved. With former values blocksize grew too fast
and couldn't be reduced so easily. I think now it adjusts more
quickly to the real network values.
(CachedResourceStreamingClient::dataReceived): Added rudimentary
bandwith calculation and use stopLoaderIfNeeded.

2:01 AM Changeset in webkit [254502] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Always Use CAIRO_OPERATOR_SOURCE to copyRectFromOneSurfaceToAnother
https://bugs.webkit.org/show_bug.cgi?id=206215

Patch by Tomoki Imai <Tomoki Imai> on 2020-01-14
Reviewed by Žan Doberšek.

Most of copyRectFromOneSurfaceToAnother callers passed CAIRO_OPERATOR_SOURCE not to blend.
BackingStoreBackendCairoImpl::scroll had copyRectFromOneSurfaceToAnother with the default cairoOperator CAIRO_OPERATOR_OVER,
but scrolling should use CAIRO_OPERATOR_SOURCE because there is no need to blend and it can have a performance benefit.

No new tests, covered by the existing tests.

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::copyRectFromOneSurfaceToAnother): Use CAIRO_OPERATOR_SOURCE to copy rect.

  • platform/graphics/cairo/CairoUtilities.h: Remove cairoOperator parameter from copyRectFromOneSurfaceToAnother.
  • platform/graphics/cairo/GraphicsContextGLCairo.cpp:

(WebCore::GraphicsContextGLOpenGL::ImageExtractor::extractImage):

  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):

1:17 AM Changeset in webkit [254501] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

CacheStorage::Engine::clearCachesForOriginFromDisk ASSERT is buggy
https://bugs.webkit.org/show_bug.cgi?id=206057
<rdar://problem/57762994>

Reviewed by John Wilander.

The ASSERT is only valid if the engine is initialized.
It is not needed to initialize it if the plan is to remove all disk files.
Instead, update ASSERT to check that either m_salt is not there or the salt is there and the path is as expected.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):

12:40 AM Changeset in webkit [254500] by ddkilzer@apple.com
  • 12 edits in trunk/Source

Enable -Wconditional-uninitialized in bmalloc, WTF, JavaScriptCore
<https://webkit.org/b/206190>
<rdar://problem/58540387>

Reviewed by Mark Lam.

Source/bmalloc:

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wconditional-uninitialized.

Source/JavaScriptCore:

Initialize stack variables to fix warnings.

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wconditional-uninitialized.

  • b3/B3LowerToAir.cpp:

(LowerToAir::appendCAS):

  • b3/testb3_4.cpp:

(testLoadAddrShift):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCheckStructureOrEmpty):
Move declaration of notEmpty into if block since it's not used
outside that scope.
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):

  • ftl/FTLThunks.cpp:

(JSC::FTL::registerClobberCheck):

  • wasm/js/WebAssemblyTablePrototype.cpp:

(JSC::webAssemblyTableProtoFuncSet):
variables.

  • wasm/WasmFunctionParser.h:

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

Source/WTF:

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wconditional-uninitialized.

12:16 AM Changeset in webkit [254499] by eric.carlson@apple.com
  • 20 edits
    2 copies
    2 adds in trunk

Expose video tracks for media files in the GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=206209
<rdar://problem/58553026>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, un-skipped existing tests that pass because of this change.

  • platform/graphics/VideoTrackPrivate.h:

Source/WebKit:

  • GPUProcess/media/RemoteAudioTrackProxy.cpp:

(WebKit::RemoteAudioTrackProxy::configuration):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::videoTrackSetSelected):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddVideoTrack):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveVideoTrack):
(WebKit::RemoteMediaPlayerProxy::videoTrackSetSelected):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteVideoTrackProxy.cpp: Copied from Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp.

(WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy):
(WebKit::RemoteVideoTrackProxy::configuration):
(WebKit::RemoteVideoTrackProxy::configurationChanged):
(WebKit::RemoteVideoTrackProxy::willRemove):
(WebKit::RemoteVideoTrackProxy::selectedChanged):
(WebKit::RemoteVideoTrackProxy::idChanged):
(WebKit::RemoteVideoTrackProxy::labelChanged):
(WebKit::RemoteVideoTrackProxy::languageChanged):

  • GPUProcess/media/RemoteVideoTrackProxy.h: Added.
  • GPUProcess/media/TrackPrivateRemoteConfiguration.h:

(WebKit::TrackPrivateRemoteConfiguration::encode const):
(WebKit::TrackPrivateRemoteConfiguration::decode):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearCachesForOriginFromDirectories):

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:

(WebKit::AudioTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::addRemoteVideoTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteVideoTrack):
(WebKit::MediaPlayerPrivateRemote::remoteVideoTrackConfigurationChanged):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::addRemoteVideoTrack):
(WebKit::RemoteMediaPlayerManager::removeRemoteVideoTrack):
(WebKit::RemoteMediaPlayerManager::remoteVideoTrackConfigurationChanged):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/GPU/media/RemoteVideoTrackProxy.cpp: Copied from Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp.

(WebKit::RemoteVideoTrackProxy::RemoteVideoTrackProxy):
(WebKit::RemoteVideoTrackProxy::configuration):
(WebKit::RemoteVideoTrackProxy::configurationChanged):
(WebKit::RemoteVideoTrackProxy::willRemove):
(WebKit::RemoteVideoTrackProxy::selectedChanged):
(WebKit::RemoteVideoTrackProxy::idChanged):
(WebKit::RemoteVideoTrackProxy::labelChanged):
(WebKit::RemoteVideoTrackProxy::languageChanged):

  • WebProcess/GPU/media/RemoteVideoTrackProxy.h: Added.
  • WebProcess/GPU/media/VideoTrackPrivateRemote.cpp: Copied from Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp.

(WebKit::VideoTrackPrivateRemote::VideoTrackPrivateRemote):
(WebKit::VideoTrackPrivateRemote::setSelected):
(WebKit::VideoTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/VideoTrackPrivateRemote.h: Added.

(WebKit::VideoTrackPrivateRemote::create):

LayoutTests:

  • gpu-process/TestExpectations:

Jan 13, 2020:

11:55 PM Changeset in webkit [254498] by Alexey Shvayka
  • 4 edits in trunk

<iframe> attributes should be processed on "srcdoc" attribute removal
https://bugs.webkit.org/show_bug.cgi?id=205995

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes-expected.txt:

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes.html

Per spec, "srcdoc" attribute of an <iframe> takes precedence over "src" [1].
Before this change, "srcdoc" handling in HTMLFrameElementBase::parseAttribute didn't check whether
the attribute was set or removed. As a result, removal of "srcdoc" attribute navigated the <iframe>
to "about:srcdoc" instead of URL in value of "src" attribute.

With this change, <iframe> attributes processing matches Chrome and Firefox.

[1] https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::parseAttribute):

11:18 PM Changeset in webkit [254497] by Simon Fraser
  • 5 edits
    2 adds in trunk

REGRESSION (Catalina) non-scrolling iframe prevents document scrolling
https://bugs.webkit.org/show_bug.cgi?id=202687

Reviewed by Tim Horton.

Source/WebCore:

Latching code in EventHandlerMac would consider <iframe scrolling=no> to be a latching
candidate, which would cause mousewheel scrolling in a <iframe scrolling=no> nested inside
a scrollable frame to not scroll. This affected ads and twitch.tv.

Fix by having scrolledToEdgeInDominantDirection() return true for non-scrollable iframes.

Test: tiled-drawing/scrolling/scrolling-no-iframe-latching.html

  • page/mac/EventHandlerMac.mm:

(WebCore::scrolledToEdgeInDominantDirection):

  • platform/ScrollView.h:

(WebCore::ScrollView::canHaveScrollbars const): Deleted.

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::canHaveScrollbars const):

LayoutTests:

  • tiled-drawing/scrolling/scrolling-no-iframe-latching-expected.txt: Added.
  • tiled-drawing/scrolling/scrolling-no-iframe-latching.html: Added.
11:03 PM Changeset in webkit [254496] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Unreviewed. Change useLLInt=0 to forceBaseline=1

  • stress/racy-gc-cleanup-of-identifier-after-mutator-stops-running.js:
10:41 PM Changeset in webkit [254495] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Support CTAP Client Pin
https://bugs.webkit.org/show_bug.cgi?id=191516
<rdar://problem/56558558>

Unreviewed build fix after r254439.

CryptoKeyEC was forward declared into WebCore but the namespace was not used in
continueGetPinTokenAfterRequestPin. Looks like something in the unified sources
was covering this issue.

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:
10:24 PM Changeset in webkit [254494] by Ross Kirsling
  • 3 edits in trunk/Source/WebKit

Expose Phase on all WebWheelEvent implementations
https://bugs.webkit.org/show_bug.cgi?id=206195

Reviewed by Don Olmstead.

No change to behavior; just unhide what needn't be hidden.

  • Shared/WebEvent.h:

(WebKit::WebWheelEvent::directionInvertedFromDevice const):
(WebKit::WebWheelEvent::momentumPhase const):

  • Shared/WebWheelEvent.cpp:

(WebKit::WebWheelEvent::WebWheelEvent):

9:56 PM Changeset in webkit [254493] by Fujii Hironori
  • 4 edits in trunk

Unreviewed sort-Xcode-project-file

Source/JavaScriptCore:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
9:40 PM Changeset in webkit [254492] by Simon Fraser
  • 4 edits in trunk

Scrollbar hiding on iOS via ::-webkit-scrollbar { display: none } doesn't work
https://bugs.webkit.org/show_bug.cgi?id=206197

Reviewed by Tim Horton.
Source/WebCore:

The logic added in r251369 was reversed, causing scrollbar hiding to not work correctly.

Tested by fast/scrolling/ios/scrollbar-hiding.html

  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::isHiddenByStyle const):

LayoutTests:

The logic added in r251369 was reversed, causing scrollbar hiding to not work correctly.

  • fast/scrolling/ios/scrollbar-hiding-expected.txt:
9:24 PM Changeset in webkit [254491] by keith_miller@apple.com
  • 4 edits
    1 add in trunk

scanSideState scans too much side state
https://bugs.webkit.org/show_bug.cgi?id=206166

Reviewed by Tadeu Zagallo.

JSTests:

  • stress/checkpoint-side-state-gc-tmps-overflow.js: Added.

(v8):

Source/JavaScriptCore:

The old code would would scan tmps + sizeof(tmps) but sizeof(tmps)
is not the length of the array. instead we should scan tmps +
maxNumCheckpointTmps.

  • interpreter/CheckpointOSRExitSideState.h:
  • runtime/VM.cpp:

(JSC::VM::scanSideState const):

9:09 PM Changeset in webkit [254490] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[WK1][iOS] VideoFullscreenControllerContext uses UIKit on the WebThread
https://bugs.webkit.org/show_bug.cgi?id=206203
<rdar://problem/48742782>

Reviewed by Simon Fraser.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::setVideoLayerFrame):

8:53 PM Changeset in webkit [254489] by don.olmstead@sony.com
  • 8 edits
    1 move
    2 deletes in trunk/Source/WebKit

Share WebPreferences stub for ports without an implementation
https://bugs.webkit.org/show_bug.cgi?id=206186

Reviewed by Alex Christensen.

No new tests. No change in behavior.

Moved the platform agnostic stubs that were common in the GTK, WPE and Windows ports
into WebPreferences.cpp. Only Cocoa ports are implementing the platform specific parts
of WebPreferences.

Also moving WebPreferencesMac.mm to WebPreferencesCocoa.mm. There were no platform guards
for iOS family code and there was no iOS specific implementation.

  • PlatformFTW.cmake:
  • PlatformWin.cmake:
  • SourcesCocoa.txt:
  • SourcesWPE.txt:
  • UIProcess/Cocoa/WebPreferencesCocoa.mm: Renamed from Source/WebKit/UIProcess/mac/WebPreferencesMac.mm.
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
(WebKit::WebPreferences::platformUpdateDoubleValueForKey):
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit::WebPreferences::platformDeleteKey):
(WebKit::WebPreferences::platformGetStringUserValueForKey):
(WebKit::WebPreferences::platformGetBoolUserValueForKey):
(WebKit::WebPreferences::platformGetUInt32UserValueForKey):
(WebKit::WebPreferences::platformGetDoubleUserValueForKey):

  • UIProcess/gtk/WebPreferencesGtk.cpp:

(WebKit::WebPreferences::platformUpdateStringValueForKey): Deleted.
(WebKit::WebPreferences::platformUpdateBoolValueForKey): Deleted.
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey): Deleted.
(WebKit::WebPreferences::platformUpdateDoubleValueForKey): Deleted.
(WebKit::WebPreferences::platformUpdateFloatValueForKey): Deleted.
(WebKit::WebPreferences::platformDeleteKey): Deleted.
(WebKit::WebPreferences::platformGetStringUserValueForKey): Deleted.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Deleted.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Deleted.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Deleted.

  • UIProcess/win/WebPreferencesWin.cpp: Removed.
  • UIProcess/wpe/WebPreferencesWPE.cpp: Removed.
  • WebKit.xcodeproj/project.pbxproj:
8:37 PM Changeset in webkit [254488] by Jon Davis
  • 1 edit
    3 adds in trunk/Websites/webkit.org

Add support for Web Inspector pages and topic taxonomy
https://bugs.webkit.org/show_bug.cgi?id=206034

Reviewed by Devin Rousso.

  • wp-content/plugins/web-inspector-pages.php: Added.
  • wp-content/themes/webkit/archive-web_inspector_page.php: Added.
  • wp-content/themes/webkit/single-web_inspector_page.php: Added.
8:21 PM Changeset in webkit [254487] by Keith Rollin
  • 3 edits in trunk/Source/WebKit

Reformat WebProcessPool logging
https://bugs.webkit.org/show_bug.cgi?id=205882
<rdar://problem/58384349>

Reviewed by Brent Fulgham.

Update the format used by WebProcessPool in its RELEASE_LOG logging.
Use the format used by WebPageProxy and NetworkResourceLoader, which
is generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

Using prewarmed process 0

becomes:

0x7f81e8804008 - WebProcessPool::processForRegistrableDomain: Using prewarmed process (process=0x1471c2a00, PID=64197)

No new tests - no added or changed functionality.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::applicationIsAboutToSuspend):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::prewarmProcess):
(WebKit::WebProcessPool::processForRegistrableDomain):
(WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
(WebKit::WebProcessPool::handleMemoryPressureWarning):
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
(WebKit::WebProcessPool::setWebProcessHasUploads):
(WebKit::WebProcessPool::clearWebProcessHasUploads):
(WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
(WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
(WebKit::WebProcessPool::setUseSeparateServiceWorkerProcess):

8:05 PM Changeset in webkit [254486] by Pablo Saavedra
  • 11 edits in trunk/LayoutTests

[GTK] Many imported/w3c/web-platform-tests/html/ tests failing after r253791
https://bugs.webkit.org/show_bug.cgi?id=206127

Reviewed by Philippe Normand.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks-expected.txt:

LayoutTests:

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt:
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt:
7:44 PM Changeset in webkit [254485] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: "Enable Local Override" and "Delete Local Override" are displayed twice in the contextual menu
https://bugs.webkit.org/show_bug.cgi?id=206184
<rdar://problem/58409880>

Reviewed by Brian Burg.

  • UserInterface/Views/ContextMenuUtilities.js:

(WI.appendContextMenuItemsForSourceCode):

  • UserInterface/Views/LocalResourceOverrideTreeElement.js:

(WI.LocalResourceOverrideTreeElement.prototype.populateContextMenu):
Add an expando flag that can be set by WI.LocalResourceOverrideTreeElement to ensure that
the local override context menu items aren't added again by WI.ResourceTreeElement.

7:28 PM Changeset in webkit [254484] by Alan Bujtas
  • 3 edits
    2 adds in trunk

RenderTreeBuilder::Block::attachIgnoringContinuation should handle inline-block anonymous containers.
https://bugs.webkit.org/show_bug.cgi?id=202913
<rdar://problem/56233694>

Reviewed by Simon Fraser.

Source/WebCore:

When the before child happens to be a block level box wrapped in an anonymous inline-block (e.g. ruby),
let's attach this new child before the anonymous inline-block wrapper instead.

Test: fast/ruby/before-child-is-block-after.html

  • rendering/updating/RenderTreeBuilderBlock.cpp:

(WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):

LayoutTests:

  • fast/ruby/before-child-is-block-after-expected.txt: Added.
  • fast/ruby/before-child-is-block-after.html: Added.
7:18 PM Changeset in webkit [254483] by Darin Adler
  • 8 edits in trunk/Source/WebCore

Remove the "needsFullOrderingComparisons" feature from PODRedBlackTree
https://bugs.webkit.org/show_bug.cgi?id=205238

Reviewed by Sam Weinig.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Simplified code and
eliminate uses of the createInterval function to construct PODInterval objects.
(WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
(WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.

  • html/HTMLMediaElement.h: Removed unnecessary include of PODInterval.h.
  • html/shadow/MediaControlElements.cpp: Added include of PODInterval.h.
  • platform/PODInterval.h: Changed operator< to compare low, high, and user

data, not just low and high so it's consistent with operator== and we
can use it to search a tree. Added a partial specialization for WeakPtr
since a WeakPtr's value can change (to null) so it can't be used for
ordering and equality checks; luckily the clients don't need to use it
that way; they build an interval tree but never search for anything or
remove anything from the tree.

  • platform/PODIntervalTree.h: Make the search adapter used to find overlaps

a member class instead of a top level class template and simplified it a bit.
Removed the unneeded createInterval function. Stopped passing true for
"needsFullOrderingComparisons" since it's not needed any more due to the
changes to PODInterval.

  • platform/PODRedBlackTree.h: Removed the "needsFullOrderingComparisons"

template argument for the PODRedBlackTree class template.
(WebCore::PODRedBlackTree::Node::moveDataFrom): Take a reference (why not,
since this always requires a non-null pointer).
(WebCore::PODRedBlackTree::updateNode): Ditto.
(WebCore::PODRedBlackTree::treeSearch const): Merged the three search
functions into a single one since we don't need the peculiar
"full comparisons" mode.
(WebCore::PODRedBlackTree::propagateUpdates): Simplified logic to remove
the boolean local variable.
(WebCore::PODRedBlackTree::dumpSubtree const): Renamed from dumpFromNode
since the comment said "dumps the subtree". Also removed the comment now
that the function name says what it said.

  • rendering/FloatingObjects.h: Removed unnecessary include of PODInterval.h.
7:15 PM Changeset in webkit [254482] by wilander@apple.com
  • 3 edits in trunk/LayoutTests

Remove calls to testRunner.installStatisticsDidModifyDataRecordsCallback() in http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins*
https://bugs.webkit.org/show_bug.cgi?id=206188
<rdar://problem/58540033>

Unreviewed test gardening.

Removed the calls to testRunner.installStatisticsDidModifyDataRecordsCallback()
to address flakiness.

  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html:
  • http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins.html:
6:34 PM Changeset in webkit [254481] by Justin Fan
  • 19 edits in trunk

[WebGL 2] Implement transform feedback and pass transform feedback conformance tests
https://bugs.webkit.org/show_bug.cgi?id=205823

Reviewed by Dean Jackson.

Source/WebCore:

Covered by webgl/2.0.0/conformance2/transform_feedback conformance tests.

  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
(WebCore::WebGL2RenderingContext::~WebGL2RenderingContext):
(WebCore::WebGL2RenderingContext::initializeTransformFeedbackBufferCache):
(WebCore::WebGL2RenderingContext::getBufferSubData): ANGLE validation in mapBufferRange may fail; prevent copying from a nullptr.
(WebCore::WebGL2RenderingContext::vertexAttribIPointer):

Bare minimum stubs to get WebGLQuery passing transform_feedback tests:
(WebCore::WebGL2RenderingContext::createQuery):
(WebCore::WebGL2RenderingContext::beginQuery):
(WebCore::WebGL2RenderingContext::endQuery):
(WebCore::WebGL2RenderingContext::getQueryParameter):
(WebCore::WebGLQuery::WebGLQuery):

  • html/canvas/WebGLQuery.h:

Transform feedback functions:
(WebCore::WebGL2RenderingContext::createTransformFeedback):
(WebCore::WebGL2RenderingContext::deleteTransformFeedback):
(WebCore::WebGL2RenderingContext::isTransformFeedback):
(WebCore::WebGL2RenderingContext::bindTransformFeedback):
(WebCore::WebGL2RenderingContext::beginTransformFeedback):
(WebCore::WebGL2RenderingContext::endTransformFeedback):
(WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
(WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):

  • html/canvas/WebGLTransformFeedback.cpp:

(WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
(WebCore::WebGLTransformFeedback::deleteObjectImpl):

Misc functions that needed added functionality:
(WebCore::WebGL2RenderingContext::bindBufferBase):
(WebCore::WebGL2RenderingContext::getIndexedParameter):
(WebCore::WebGL2RenderingContext::getParameter):

Helper functions to track WebGL2 state/objects:
(WebCore::WebGL2RenderingContext::uncacheDeletedBuffer):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLAny.h:
  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::setTarget):

  • html/canvas/WebGLBuffer.h:
  • html/canvas/WebGLQuery.cpp:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding):
(WebCore::WebGLRenderingContextBase::bindBuffer):
(WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer):
(WebCore::WebGLRenderingContextBase::deleteBuffer):
(WebCore::WebGLRenderingContextBase::getProgramParameter):

  • html/canvas/WebGLRenderingContextBase.h:

Pipe new GraphicsContextGL methods to ANGLE:

  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
(WebCore::GraphicsContextGLOpenGL::createQuery):
(WebCore::GraphicsContextGLOpenGL::beginQuery):
(WebCore::GraphicsContextGLOpenGL::endQuery):
(WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::bindBufferBase):

Add missing unrelated GraphicsContextGL stubs for ANGLE builds:

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
(WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
(WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
(WebCore::GraphicsContextGLOpenGL::createQuery):
(WebCore::GraphicsContextGLOpenGL::beginQuery):
(WebCore::GraphicsContextGLOpenGL::endQuery):
(WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::bindBufferBase):
(WebCore::GraphicsContextGLOpenGL::bufferData):
(WebCore::GraphicsContextGLOpenGL::bufferSubData):
(WebCore::GraphicsContextGLOpenGL::getBufferSubData):
(WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
(WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
(WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
(WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
(WebCore::GraphicsContextGLOpenGL::readBuffer):
(WebCore::GraphicsContextGLOpenGL::texImage3D):
(WebCore::GraphicsContextGLOpenGL::texSubImage3D):
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
(WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
(WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
(WebCore::GraphicsContextGLOpenGL::uniform1ui):
(WebCore::GraphicsContextGLOpenGL::uniform2ui):
(WebCore::GraphicsContextGLOpenGL::uniform3ui):
(WebCore::GraphicsContextGLOpenGL::uniform4ui):
(WebCore::GraphicsContextGLOpenGL::uniform1uiv):
(WebCore::GraphicsContextGLOpenGL::uniform2uiv):
(WebCore::GraphicsContextGLOpenGL::uniform3uiv):
(WebCore::GraphicsContextGLOpenGL::uniform4uiv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
(WebCore::GraphicsContextGLOpenGL::drawRangeElements):
(WebCore::GraphicsContextGLOpenGL::drawBuffers):
(WebCore::GraphicsContextGLOpenGL::clearBufferiv):
(WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
(WebCore::GraphicsContextGLOpenGL::clearBufferfv):
(WebCore::GraphicsContextGLOpenGL::clearBufferfi):
(WebCore::GraphicsContextGLOpenGL::deleteQuery):
(WebCore::GraphicsContextGLOpenGL::isQuery):
(WebCore::GraphicsContextGLOpenGL::getQuery):
(WebCore::GraphicsContextGLOpenGL::createSampler):
(WebCore::GraphicsContextGLOpenGL::deleteSampler):
(WebCore::GraphicsContextGLOpenGL::isSampler):
(WebCore::GraphicsContextGLOpenGL::bindSampler):
(WebCore::GraphicsContextGLOpenGL::samplerParameteri):
(WebCore::GraphicsContextGLOpenGL::samplerParameterf):
(WebCore::GraphicsContextGLOpenGL::getSamplerParameterfv):
(WebCore::GraphicsContextGLOpenGL::getSamplerParameteriv):
(WebCore::GraphicsContextGLOpenGL::fenceSync):
(WebCore::GraphicsContextGLOpenGL::isSync):
(WebCore::GraphicsContextGLOpenGL::deleteSync):
(WebCore::GraphicsContextGLOpenGL::clientWaitSync):
(WebCore::GraphicsContextGLOpenGL::waitSync):
(WebCore::GraphicsContextGLOpenGL::getSynciv):
(WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindBufferRange):
(WebCore::GraphicsContextGLOpenGL::getUniformIndices):
(WebCore::GraphicsContextGLOpenGL::texImage2D):
(WebCore::GraphicsContextGLOpenGL::texSubImage2D):
(WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
(WebCore::GraphicsContextGLOpenGL::uniform1fv):
(WebCore::GraphicsContextGLOpenGL::uniform2fv):
(WebCore::GraphicsContextGLOpenGL::uniform3fv):
(WebCore::GraphicsContextGLOpenGL::uniform4fv):
(WebCore::GraphicsContextGLOpenGL::uniform1iv):
(WebCore::GraphicsContextGLOpenGL::uniform2iv):
(WebCore::GraphicsContextGLOpenGL::uniform3iv):
(WebCore::GraphicsContextGLOpenGL::uniform4iv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
(WebCore::GraphicsContextGLOpenGL::readPixels):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::glGetQueryObjectuiv): Deleted.

LayoutTests:

Add passing results for transform_feedback, as expected when ANGLE is enabled.

  • webgl/2.0.0/conformance2/transform_feedback/two-unreferenced-varyings-expected.txt:
  • webgl/2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero-expected.txt:
5:43 PM Changeset in webkit [254480] by sbarati@apple.com
  • 25 edits in trunk

Throw away baseline code if there is an optimized replacement
https://bugs.webkit.org/show_bug.cgi?id=202503

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-compare-eq-via-nonSpeculativeNonPeepholeCompareNullOrUndefined.js:
  • stress/getter-setter-inlining-should-emit-movhint.js:
  • stress/make-dictionary-repatch.js:
  • stress/merging-ic-variants-should-bail-if-structures-overlap.js:
  • stress/proxy-getter-stack-overflow.js:
  • stress/regress-192717.js:
  • stress/retry-cache-later.js:

Source/JavaScriptCore:

This patch's goal is to help us save JIT executable memory by throwing
away baseline code when it has an optimized replacement. To make it
easy to reason about, we do this when finalizing a GC, and when the
CodeBlock is not on the stack. When we do this, we throw away all JIT
data and unlink all incoming calls.

This patch also paves the way for the LOL tier by making it so we always
exit to the LLInt. This allows the code in CodeBlock finalization to not
have to consider whether or not an an OSR exit is wired to baseline
JIT code, since all exits are now to the LLInt. Because of this, this
patch removes the forceOSRExitToLLInt option. Also, this patch renames
the useLLInt option to forceBaseline and inverts its meaning.
Options::forceBaseline=true implies that code will start off executing in
the baseline JIT instead of the LLInt. However, it won't prevent us from
emitting an OSR exit which jumps to LLInt code.

  • API/tests/ExecutionTimeLimitTest.cpp:

(testExecutionTimeLimit):

  • API/tests/PingPongStackOverflowTest.cpp:

(testPingPongStackOverflow):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::resetJITData):
(JSC::CodeBlock::optimizedReplacement):
(JSC::CodeBlock::hasOptimizedReplacement):
(JSC::CodeBlock::tallyFrequentExitSites):
(JSC::CodeBlock::findStubInfo): Deleted.
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::setJITCode):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGOSRExitCompilerCommon.h:
  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::isCurrentlyExecuting):

  • heap/CodeBlockSet.h:
  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):
(JSC::Heap::runEndPhase):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::dispatchToNextInstruction):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):
(JSC::Options::initialize):
(JSC::Options::ensureOptionsAreCoherent):

  • runtime/OptionsList.h:
  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::prepareForExecutionImpl):

Tools:

  • Scripts/run-jsc-stress-tests:
5:37 PM Changeset in webkit [254479] by yoshiaki.jitsukawa@sony.com
  • 3 edits in trunk/Tools

Fix path-specific filters on Windows
https://bugs.webkit.org/show_bug.cgi?id=205786

Reviewed by David Kilzer.

  • Scripts/webkitpy/style/filter.py:

(FilterConfiguration._path_rules_from_path):
Convert forward slashes to backward slashes on Windows by using
os.path.normcase(). Nothing changed on other OSs.

  • Scripts/webkitpy/style/filter_unittest.py:

(FilterConfigurationTest.test_path_with_different_case):

5:10 PM Changeset in webkit [254478] by Alan Coon
  • 2 edits in branches/safari-609-branch/Tools

Cherry-pick r254440. rdar://problem/58530962

Don't softlink AVCapture classes on watchOS or tvOS
https://bugs.webkit.org/show_bug.cgi?id=205974
<rdar://problem/58427281>

Unreviewed test fix after r254257.

  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm: (TestWebKitAPI::TEST):

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

5:10 PM Changeset in webkit [254477] by Alan Coon
  • 3 edits
    4 adds in branches/safari-609-branch

Cherry-pick r254349. rdar://problem/58529720

ObjectAllocationSinkingPhase doesn't model pointers to allocations in control flow properly
https://bugs.webkit.org/show_bug.cgi?id=204738
<rdar://problem/57553238>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/allocation-sinking-must-model-allocation-pointers-properly-2.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-3.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-4.js: Added. (bool): (effects): (escape): (bar):
  • stress/allocation-sinking-must-model-allocation-pointers-properly.js: Added. (alwaysFalse): (sometimesZero): (assert): (v9):

Source/JavaScriptCore:

Allocation sinking phase conducts a points to analysis. It uses this
information for programs like:

`
1: NewObject
2: NewObject
3: PutByOffset(@2, @1, "x")
4: GetByOffset(@2, "x")
`

It solves the points to problem knowing @4 points to @1.

It tracks this data in the LocalHeap data structure. This is used to track
the heap across blocks, and it includes a merge function to handle control
flow merges. However, this merge function would not always merge the pointer
sets together. It sometimes would merge them together, since it had a fast
path check inside merge, which would just copy the contents of the block to be
merged with itself if it were this block's first time merging. This fast path happened
to hide the bug in general case merge code. If we didn't take this fast path,
we would just never transfer pointer sets from predecessor to successor. This
could lead to all kinds of issues, including using the incorrect phantom node
in IR instead of its materialized version. It could also lead to the phase not
sinking objects it is capable of sinking.

This patch makes it so that we merge together the pointer sets. We always add
new pointers to the set. So in pointer A->B, if the set has yet to see A, we
add it. If the set already contains pointer A->B, and we encounter a new
pointer A->C, or if we encounter a merge without any A->* pointer, we mark
the A pointer as top, marking it A->TOP. We do this to ensure that we fixpoint.
We're guaranteed that m_pointers is monotonically increasing (module liveness
pruning, which is a constant). And once something is TOP, it never becomes
anything else. (Instead of marking a pointer top, we used to just remove it
from the set, but this has issues, as it could lead to us ping-ponging in
our fixpoint analysis, add, remove, add, remove, etc.)

So the merge rules are:
{A->B} merge {A->B} => {A->B}
{A->B} merge {A->C} => {A->TOP}
{A->B} merge {A->TOP} => {A->TOP}
{A->B} merge {} => {A->TOP}

Thanks to Samuel Groß of Google Project Zero for identifying this bug.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:

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

5:10 PM Changeset in webkit [254476] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/WebCore/PAL

Cherry-pick r254257. rdar://problem/58530962

Don't softlink AVCapture classes on watchOS or tvOS
https://bugs.webkit.org/show_bug.cgi?id=205974
<rdar://problem/45508044>

Reviewed by Jon Lee.

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:

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

5:10 PM Changeset in webkit [254475] by Alan Coon
  • 3 edits
    2 adds in branches/safari-609-branch

Cherry-pick r254220. rdar://problem/58429234

Fix specification violation in Font Loading API
https://bugs.webkit.org/show_bug.cgi?id=205901
<rdar://problem/58083743>

Reviewed by Brent Fulgham.

Source/WebCore:

Our Font Loading API does not comply with the spec:

If the parsed value is a CSS-wide keyword, return a syntax error.

Rather than crashing, we should return a syntax error.

Test: fast/text/font-loading-global-keyword.html

  • css/CSSFontFaceSet.cpp: (WebCore::computeFontSelectionRequest): (WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts):

LayoutTests:

Test all the entry points to the CSS Font Loading API that accept CSS keywords.

  • fast/text/font-loading-global-keyword-expected.txt: Added.
  • fast/text/font-loading-global-keyword.html: Added.

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

5:10 PM Changeset in webkit [254474] by Alan Coon
  • 7 edits in branches/safari-609-branch/Source/WebKit

Cherry-pick r254101. rdar://problem/58535157

[iOS] Get display level in the UI process for all iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=205835
<rdar://problem/58116883>

Reviewed by Brent Fulgham.

This was previously only done for iOS, but should be done for all iOS platforms.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::registerNotificationObservers):
  • UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::initializeNewWebProcess):
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

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

5:08 PM Changeset in webkit [254473] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

WTR::TestController::decidePolicyForPluginLoad() should output bundle identifier on release assert
<https://webkit.org/b/206105>

Reviewed by Brent Fulgham.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::decidePolicyForPluginLoad): Change
RELEASE_ASSERT_NOT_REACHED() to
RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE() with bundle
identifier.

4:39 PM Changeset in webkit [254472] by Kate Cheney
  • 4 edits in trunk/Source/WebKit

_WKResourceLoadStatisticsFirstParty should be forward declared not imported in _WKResourceLoadStatisticsThirdParty
https://bugs.webkit.org/show_bug.cgi?id=206183
<rdar://problem/58535245>

Reviewed by Alex Christensen.

  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.mm:

The additional import statement here was unnecessary because
this file imports _WKResourceLoadStatisticsThirdPartyInternal.h
which forward declares the _WKResourceLoadStatisticsFirstParty class.

4:28 PM Changeset in webkit [254471] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for PlayStation and clang-cl.

clang for Windows (< v10.0.0) cannot destructure a const class. See also r249524.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

4:15 PM Changeset in webkit [254470] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

4:13 PM Changeset in webkit [254469] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Unreviewed followup fix to: https://bugs.webkit.org/show_bug.cgi?id=205288.
This flag should be off-by-default.

  • Shared/WebPreferences.yaml:
4:11 PM Changeset in webkit [254468] by Truitt Savell
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r254463.

Broke all Mac and iOS Builds.

Reverted changeset:

"Unreviewed build fix for PlayStation and clang-cl."
https://trac.webkit.org/changeset/254463

4:08 PM Changeset in webkit [254467] by commit-queue@webkit.org
  • 1568 edits
    2 copies
    39 adds
    2 deletes in trunk/LayoutTests

REGRESSION(r253683): [GTK][WPE] Lots of offscreen-canvas WPT tests failing
https://bugs.webkit.org/show_bug.cgi?id=205445

Patch by Chris Lord <Chris Lord> on 2020-01-13
Reviewed by Carlos Alberto Lopez Perez.

Bug 205445 - Update and re-enable OffscreenCanvas tests

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/fetch/nosniff/image-expected.txt: Newly passing test, presumable due to previously missing resource.
  • web-platform-tests/images/*: Updated.
  • web-platform-tests/offscreen-canvas/*: Updated.

LayoutTests:

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
4:05 PM Changeset in webkit [254466] by Alan Coon
  • 8 edits in branches/safari-609.1.14-branch/Source

Versioning.

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

Clean-up MediaPlayerPrivateMediaStreamAVFObjC.h/.mm
https://bugs.webkit.org/show_bug.cgi?id=206060

Reviewed by Eric Carlson.

No change of behavior.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3:55 PM Changeset in webkit [254464] by mark.lam@apple.com
  • 45 edits
    4 adds in trunk

Replace uses of Box<Identifier> with a new CacheableIdentifier class.
https://bugs.webkit.org/show_bug.cgi?id=205544
<rdar://problem/58041800>

Reviewed by Saam Barati.

JSTests:

  • stress/racy-gc-cleanup-of-identifier-after-mutator-stops-running.js: Added.

Source/JavaScriptCore:

The introduction of the use of Box<Identifier> was to get around having to
ref/deref the underlying UniqedStringImpl in Identifiers from the compiler
and GC threads. However, it proves to be difficult to control when these
Box<Identifier>s get destructed, and requires that we find all the places in
the compier and GC threads where this can happen, and apply keep alive tactics
there to defer destruction of the Box<Identifier> to the mutator thread.

This patch fixes this by replacing uses of Box<Identifier> with
CacheableIdentifier, which is effectively a tagged union of a JSCell* or a
UniquedStringImpl*. The JSCell*, in this case, can be either a Symbol* or a
JSString* that is backed by an atom string. The VM runtime ensures that we'll
never try to cache an identifier from a JSCell that is not one of these. This
CacheableIdentifier can be destructed from the compiler or GC thread. Since it
doesn't hold a ref of the underlying UniquedStringImpl, it won't try to deref
it on destruction.

Instead, we'll need to visit CacheableIdentifiers during GC scans to keep the
JSCell in it alive, and that JSCell will, in turn, keep the underlying
UniquedStringImpl alive.

This patch also does the following:

  1. Add a visitAggregate() method to StructureStubInfo, PolymorphicAccess, and AccessCase to visit the CacheableIdentifier's JSCell identifier. This visitAggregate() is called from CodeBlock::stronglyVisitStrongReferences().

When we write barrier a CodeBlock, it guarantees that its visitAggregate()
methods is called. However, it does not guarantee that its propagateTransitions()
method will be called. Since the CacheableIdentifier's reference to a cell
should be a strong reference, visiting it via a StructureStubInfo::visitAggregate()
method is the right thing to do.
See https://bugs.webkit.org/show_bug.cgi?id=205544#c7 for an example of why
propagateTransitions() doesn't always do the job.

StructureStubInfo::visitWeakReferences() is also inappropriate for this
because it is only called after all marking is done. It is also not meant
to keep cells alive but merely for clearing weak references to dead cells.

  1. Also add to visitAggregate() for ModuleNamespaceData's m_identifier in GetByStatus::markIfCheap().
  1. Remove previously applied keep alive tactics to work around Box<Identifier> destruction. This also retores the allowance to destruct DFG::Plans on a compiler thread.
  1. Added a JSString:getValueImpl() helper.
  1. Added a write barrier in DFG and FTL JITFinalizer's finalizeCommon() to ensure that frozen values are scanned by the GC.

During compilation, the frozen values were previously protected by the Plan.
After finalization, they should be protected by the CodeBlock. Hence, we
should barrier the CodeBlock since the last GC scan of the CodeBlock may have
happened before the frozen values were registered with the CodeBlock.

GC considerations:
==================
The following also addresses Yusuke's concerns in https://bugs.webkit.org/show_bug.cgi?id=205544#c10.

CacheableIdentifier is only stored as fields in 4 classes/structs:

  1. AccessCase::m_identifier
  2. GetByIdVariant::m_identifier
  3. ModuleNamespaceData::m_identifier
  4. StructureStubInfo::m_getByIdSelfIdentifier

AccessCase::m_identifier
========================
While the access case is being created and added in tryCacheGetBy(), the
CacheableIdentifier is still on the stack and protected from the GC. At the
bottom of tryCacheGetBy(), StructureStubInfo::addAccessCase() is called to add
the access case.

StructureStubInfo::addAccessCase() will barrier the owner CodeBlock at its end,
and CodeBlock::stronglyVisitStrongReferences() will visit the StructureStubInfo,
which in turn visits the AccessCase. StructureStubInfo::visitAggregate() has
been added for this purpose.

GetByIdVariant::m_identifier
============================
GetByIdVariant is only stored in GetByStatus. Both GetByIdVariant and GetByStatus
are only created and handled in the DFG/FTL compiler threads. While the compiler
thread is working with them, they are safe from the GC because the GC won't collect
objects until the compiler thread is at a SafePoint.

At compiler SafePoints, any GetByStatus that needs to be persisted is stored in
DFG::Plan::m_recordedStatuses. The Plan will visit the m_recordedStatuses in
Plan::checkLivenessAndVisitChildren().

At the end of compilation, Plan::m_recordedStatuses is transferred over to the owner
CodeBlock's DFG::CommonData in Plan::finalizeWithoutNotifyingCallback().
Plan::finalizeWithoutNotifyingCallback() will also barrier the owner CodeBlock at
its end.

Thereafter, CodeBlock::stronglyVisitStrongReferences() will visit the recordedStatuses.

ModuleNamespaceData::m_identifier
=================================
ModuleNamespaceData is only stored in a GetByStatus, and is therefore protected
similarly as the GetByIdVariant::m_identifier case above.

StructureStubInfo::m_getByIdSelfIdentifier
==========================================
StructureStubInfo::initGetByIdSelf() is called from inside tryCacheGetBy().
StructureStubInfo::initGetByIdSelf() will barrier the owner CodeBlock. The
CacheableIdentifier here is protected in the same way as the AccessCase::m_identifier
case above.

DesiredIdentifiers
==================
The compiler thread may also stash a CacheableIdentifier's uid in its
DesiredIdentifiers. Normally, the identifiers stashed in DesiredIdentifiers are
from identifiers that the CodeBlock already knows abut and manages (e.g. from
GetByIds). For uids from a cell-based CacheableIdentifier variable is passed to
a GetByVal, we need kep the cell alive in order to keep the uid alive. This is
achieved by freezing the cell with freezeStrong() in the op_get_by_val case in
the DFG BytecodeParser.

Reseting a StructureStubInfo while its IC code is still executing on the stack
==============================================================================
The concern is that IC code may call slow path / getter functions that may in turn:

  1. reset the IC, and
  2. run the GC.

This can be a problem if:

  1. there is a scenario where we return from the slow path / getter function and run IC code that uses the cell / uid from the CacheableIdentifier.

This is because the StructureStubInfo is what visits the that cell, which
in turn its uid alive. Once the StructureStubInfo is reset, it will no
longer be associated with any AccessCase or the m_getByIdSelfIdentifier.
As such they will not be visited, and the CacheableIdentifier may be collected
by the GC.

In practice, the generated IC code never uses the cell / uid after it calls
any slow path / getter function. I've verified this by auditing the code
generation in InlineAccess::generateSelfInAccess() and PolymorphicAccess::regenerate().
Hence, there's no issue with using a collected cell / uid.

  1. there is a scenario where a slow path / getter function makes use of the cell / uid from the CacheableIdentifier but does not protect it.

The only 2 slow path functions:

operationGetByValGeneric()
operationGetByValOptimize()

operationGetByValGeneric() does not use any CacheableIdentifier from the StructureStubInfo.

operationGetByValOptimize() modifies the StructureStubInfo in tryCacheGetBy()
under the protection of a GCSafeConcurrentJSLocker, and can reset the
StructureStubInfo. However, it does not use any CacheableIdentifier after
that.

Hence, there's also no GC issue here.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::AccessCase):
(JSC::AccessCase::create):
(JSC::AccessCase::fromStructureStubInfo):
(JSC::AccessCase::commit):
(JSC::AccessCase::canReplace const):
(JSC::AccessCase::dump const):
(JSC::AccessCase::visitAggregate const):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):

  • bytecode/AccessCase.h:

(JSC::AccessCase::uid const):
(JSC::AccessCase::identifier const):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::stronglyVisitStrongReferences):

  • bytecode/GetByIdVariant.cpp:

(JSC::GetByIdVariant::GetByIdVariant):
(JSC::GetByIdVariant::attemptToMerge):
(JSC::GetByIdVariant::visitAggregate):
(JSC::GetByIdVariant::dumpInContext const):

  • bytecode/GetByIdVariant.h:

(JSC::GetByIdVariant::identifier const):
(JSC::GetByIdVariant::overlaps):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeFromLLInt):
(JSC::GetByStatus::computeFor):
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByStatus::visitAggregate):
(JSC::GetByStatus::singleIdentifier const):

  • bytecode/GetByStatus.h:
  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::GetterSetterAccessCase):
(JSC::GetterSetterAccessCase::create):

  • bytecode/GetterSetterAccessCase.h:
  • bytecode/InstanceOfAccessCase.cpp:

(JSC::InstanceOfAccessCase::InstanceOfAccessCase):

  • bytecode/IntrinsicGetterAccessCase.cpp:

(JSC::IntrinsicGetterAccessCase::IntrinsicGetterAccessCase):
(JSC::IntrinsicGetterAccessCase::create):

  • bytecode/IntrinsicGetterAccessCase.h:
  • bytecode/ModuleNamespaceAccessCase.cpp:

(JSC::ModuleNamespaceAccessCase::ModuleNamespaceAccessCase):
(JSC::ModuleNamespaceAccessCase::create):

  • bytecode/ModuleNamespaceAccessCase.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::visitAggregate):
(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:
  • bytecode/ProxyableAccessCase.cpp:

(JSC::ProxyableAccessCase::ProxyableAccessCase):
(JSC::ProxyableAccessCase::create):

  • bytecode/ProxyableAccessCase.h:
  • bytecode/RecordedStatuses.cpp:

(JSC::RecordedStatuses::visitAggregate):

  • bytecode/RecordedStatuses.h:
  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::visitAggregate):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::getByIdSelfIdentifier):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseGetById):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGDesiredIdentifiers.cpp:

(JSC::DFG::DesiredIdentifiers::ensure):
(JSC::DFG::DesiredIdentifiers::at const):
(JSC::DFG::DesiredIdentifiers::reallyAdd):
(JSC::DFG::DesiredIdentifiers::processCodeBlockIdentifiersIfNeeded): Deleted.

  • dfg/DFGDesiredIdentifiers.h:
  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalizeCommon):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::~Plan):
(JSC::DFG::Plan::checkLivenessAndVisitChildren):
(JSC::DFG::Plan::cancel):

  • dfg/DFGPlan.h:

(JSC::DFG::Plan::keepAliveIdentifier): Deleted.

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::removeAllReadyPlansForVM):
(JSC::DFG::Worklist::removeDeadPlans):
(JSC::DFG::Worklist::removeNonCompilingPlansForVM):
(JSC::DFG::Worklist::deleteCancelledPlansForVM): Deleted.

  • dfg/DFGWorklist.h:
  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::finalizeCommon):

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::tryCacheGetBy):
(JSC::repatchGetBy):
(JSC::tryCacheArrayGetByVal):
(JSC::tryCacheInstanceOf):

  • jit/Repatch.h:
  • runtime/CacheableIdentifier.cpp: Added.

(JSC::CacheableIdentifier::dump const):

  • runtime/CacheableIdentifier.h: Added.

(JSC::CacheableIdentifier::CacheableIdentifier):
(JSC::CacheableIdentifier::isUid const):
(JSC::CacheableIdentifier::isCell const):
(JSC::CacheableIdentifier::isSymbol const):
(JSC::CacheableIdentifier::operator bool const):

  • runtime/CacheableIdentifierInlines.h: Added.

(JSC::CacheableIdentifier::CacheableIdentifier):
(JSC::CacheableIdentifier::cell const):
(JSC::CacheableIdentifier::uid const):
(JSC::CacheableIdentifier::isCacheableIdentifierCell):
(JSC::CacheableIdentifier::isSymbolCell const):
(JSC::CacheableIdentifier::isStringCell const):
(JSC::CacheableIdentifier::setCellBits):
(JSC::CacheableIdentifier::setUidBits):
(JSC::CacheableIdentifier::visitAggregate const):
(JSC::CacheableIdentifier::operator== const):
(JSC::CacheableIdentifier::operator!= const):

  • runtime/ExceptionHelpers.cpp:

(JSC::functionCallBase):

  • runtime/JSString.h:

(JSC::JSString::getValueImpl const):

  • runtime/VM.cpp:

(JSC::VM::ensureWatchpointSetForImpureProperty):
(JSC::VM::addImpureProperty):
(JSC::VM::registerWatchpointForImpureProperty): Deleted.

  • runtime/VM.h:

Source/WebCore:

  • bindings/js/CommonVM.cpp:

(WebCore::addImpureProperty):

3:52 PM Changeset in webkit [254463] by Ross Kirsling
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for PlayStation and clang-cl.

clang for Windows (< v10.0.0) cannot destructure a const class. See also r249524.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

3:37 PM Changeset in webkit [254462] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Propogate UIEdgeInsets from WKWebView to WKSafeBrowsingWarning on iOS
https://bugs.webkit.org/show_bug.cgi?id=206201
<rdar://problem/57135847>

Reviewed by Tim Horton.

Manually verified this fixes the radar.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _computedObscuredInsetForSafeBrowsingWarning]):
(-[WKWebView safeAreaInsetsDidChange]):
(-[WKWebView _setObscuredInsets:]):

3:35 PM Changeset in webkit [254461] by cathiechen
  • 8 edits in trunk/LayoutTests/imported/w3c

Import the update of img-aspect-ratio.html.
https://bugs.webkit.org/show_bug.cgi?id=206160

Reviewed by Frédéric Wang

Use parseFloat() instead of parseInt() in img-aspect-ratio.html.
The resource location was changed to relative in bug 205678. To keep them consistent with others, restore them.

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/align.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/content-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-no-alt-replaced.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-replaced-box-while-loading.html:
  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html:
3:20 PM Changeset in webkit [254460] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Revert "Versioning."

This reverts revision 254459.

3:17 PM Changeset in webkit [254459] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

3:06 PM Changeset in webkit [254458] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Fix computeFloatVisibleRectInContainer to handle non-SVG object parent
https://bugs.webkit.org/show_bug.cgi?id=205282
Source/WebCore:

<rdar://problem/57975185>

Patch by Sunny He <sunny_he@apple.com> on 2020-01-13
Reviewed by Darin Adler.

Test: svg/dom/replaceChild-document-crash.html

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::computeFloatVisibleRectInContainer):

LayoutTests:

Patch by Sunny He <sunny_he@apple.com> on 2020-01-13
Reviewed by Darin Adler.

  • svg/dom/replaceChild-document-crash-expected.txt: Added.
  • svg/dom/replaceChild-document-crash.html: Added.
3:02 PM Changeset in webkit [254457] by Alan Coon
  • 1 copy in branches/safari-609.1.14-branch

New branch.

3:02 PM Changeset in webkit [254456] by Alan Coon
  • 1 delete in branches/safari-609.1.14-branch

Delete branch.

2:54 PM Changeset in webkit [254455] by Alan Coon
  • 1 copy in branches/safari-610.1.1-branch

New branch.

2:27 PM Changeset in webkit [254454] by eric.carlson@apple.com
  • 21 edits
    6 adds in trunk

Expose audio tracks for media files in the GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=206152
<rdar://problem/58513227>

Reviewed by youenn fablet.

Source/WebCore:

No new tests, un-skipped existing tests that pass because of this change.

  • platform/graphics/AudioTrackPrivate.h:
  • platform/graphics/TrackPrivateBase.h:

Source/WebKit:

  • GPUProcess/media/RemoteAudioTrackProxy.cpp: Added.

(WebKit::RemoteAudioTrackProxy::RemoteAudioTrackProxy):
(WebKit::RemoteAudioTrackProxy::configuration):
(WebKit::RemoteAudioTrackProxy::configurationChanged):
(WebKit::RemoteAudioTrackProxy::willRemove):
(WebKit::RemoteAudioTrackProxy::enabledChanged):
(WebKit::RemoteAudioTrackProxy::idChanged):
(WebKit::RemoteAudioTrackProxy::labelChanged):
(WebKit::RemoteAudioTrackProxy::languageChanged):

  • GPUProcess/media/RemoteAudioTrackProxy.h: Added.
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::setRate):
(WebKit::RemoteMediaPlayerManagerProxy::audioTrackSetEnabled):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidAddAudioTrack):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerDidRemoveAudioTrack):
(WebKit::RemoteMediaPlayerProxy::audioTrackSetEnabled):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/TrackPrivateRemoteConfiguration.h: Added.

(WebKit::TrackPrivateRemoteConfiguration::encode const):
(WebKit::TrackPrivateRemoteConfiguration::decode):

  • GPUProcess/media/TrackPrivateRemoteIdentifier.h: Added.
  • Scripts/webkit/messages.py:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp: Added.

(WebKit::AudioTrackPrivateRemote::AudioTrackPrivateRemote):
(WebKit::AudioTrackPrivateRemote::setEnabled):
(WebKit::AudioTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.h: Added.

(WebKit::AudioTrackPrivateRemote::create):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::addRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::removeRemoteAudioTrack):
(WebKit::MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::timeChanged):
(WebKit::RemoteMediaPlayerManager::durationChanged):
(WebKit::RemoteMediaPlayerManager::engineFailedToLoad):
(WebKit::RemoteMediaPlayerManager::characteristicChanged):
(WebKit::RemoteMediaPlayerManager::sizeChanged):
(WebKit::RemoteMediaPlayerManager::addRemoteAudioTrack):
(WebKit::RemoteMediaPlayerManager::removeRemoteAudioTrack):
(WebKit::RemoteMediaPlayerManager::remoteAudioTrackConfigurationChanged):
(WebKit::RemoteMediaPlayerManager::updateCachedState):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

LayoutTests:

  • gpu-process/TestExpectations:
2:26 PM Changeset in webkit [254453] by Alan Bujtas
  • 1 edit
    2 adds in trunk/LayoutTests

Add a simple trailing letter-spacing test case
https://bugs.webkit.org/show_bug.cgi?id=206185
<rdar://problem/58535841>

Reviewed by Antti Koivisto.

  • fast/text/trailing-letter-spacing-long-expected.html: Added.
  • fast/text/trailing-letter-spacing-long.html: Added.
1:49 PM Changeset in webkit [254452] by weinig@apple.com
  • 3 edits in trunk/Source/WTF

Platform.h is out of control Part 3: Move all ENABLE_* macros definitions in FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=206139

Reviewed by Anders Carlsson.

  • Moves all remaining ENABLE_* defines out of Platform.h and into FeatureDefines.h
  • Moves most, USE_UDIS86 and USE_ARM64_DISASSEMBLER are tangled up in the JIT definitions still, HAVE_* and USE_* defines out of FeatureDefines.h and into Platform.h
  • Where straigthforward, convert macro definitions into a canonical 3 line entry of the form:


#if !defined(MACRO_NAME) && (<CONDITIONS HERE>)
#define MACRO_NAME 1
#endif

There is rarely (if ever) a resone to undefine or define one of these platform related
macros to 0 as the usage macros (e.g. HAVE(...), ENABLE(...), etc.) handle undefined as 0.

  • Added a guard so that FeatureDefines.h can't be included directly, and must be included via Platform.h. This is necessary as it depends heavily on macros defined in Platform.h
  • Added numerous FIXMEs detailing follow up cleaning.
  • wtf/FeatureDefines.h:
  • wtf/Platform.h:
1:42 PM Changeset in webkit [254451] by Alan Coon
  • 3 edits
    4 adds in branches/safari-608.5.7.3-branch

Cherry-pick r254349. rdar://problem/58529694

ObjectAllocationSinkingPhase doesn't model pointers to allocations in control flow properly
https://bugs.webkit.org/show_bug.cgi?id=204738
<rdar://problem/57553238>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/allocation-sinking-must-model-allocation-pointers-properly-2.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-3.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-4.js: Added. (bool): (effects): (escape): (bar):
  • stress/allocation-sinking-must-model-allocation-pointers-properly.js: Added. (alwaysFalse): (sometimesZero): (assert): (v9):

Source/JavaScriptCore:

Allocation sinking phase conducts a points to analysis. It uses this
information for programs like:

`
1: NewObject
2: NewObject
3: PutByOffset(@2, @1, "x")
4: GetByOffset(@2, "x")
`

It solves the points to problem knowing @4 points to @1.

It tracks this data in the LocalHeap data structure. This is used to track
the heap across blocks, and it includes a merge function to handle control
flow merges. However, this merge function would not always merge the pointer
sets together. It sometimes would merge them together, since it had a fast
path check inside merge, which would just copy the contents of the block to be
merged with itself if it were this block's first time merging. This fast path happened
to hide the bug in general case merge code. If we didn't take this fast path,
we would just never transfer pointer sets from predecessor to successor. This
could lead to all kinds of issues, including using the incorrect phantom node
in IR instead of its materialized version. It could also lead to the phase not
sinking objects it is capable of sinking.

This patch makes it so that we merge together the pointer sets. We always add
new pointers to the set. So in pointer A->B, if the set has yet to see A, we
add it. If the set already contains pointer A->B, and we encounter a new
pointer A->C, or if we encounter a merge without any A->* pointer, we mark
the A pointer as top, marking it A->TOP. We do this to ensure that we fixpoint.
We're guaranteed that m_pointers is monotonically increasing (module liveness
pruning, which is a constant). And once something is TOP, it never becomes
anything else. (Instead of marking a pointer top, we used to just remove it
from the set, but this has issues, as it could lead to us ping-ponging in
our fixpoint analysis, add, remove, add, remove, etc.)

So the merge rules are:
{A->B} merge {A->B} => {A->B}
{A->B} merge {A->C} => {A->TOP}
{A->B} merge {A->TOP} => {A->TOP}
{A->B} merge {} => {A->TOP}

Thanks to Samuel Groß of Google Project Zero for identifying this bug.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:

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

1:37 PM Changeset in webkit [254450] by Alan Coon
  • 3 edits
    4 deletes in branches/safari-608.5.0.2-branch

Revert r254349. rdar://problem/58529691

This reverts commit r254445.

1:37 PM Changeset in webkit [254449] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Flaky Test: imported/w3c/web-platform-tests/svg/import/struct-dom-06-b-manual.svg
https://bugs.webkit.org/show_bug.cgi?id=204312

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:33 PM Changeset in webkit [254448] by aakash_jain@apple.com
  • 1 edit
    1 add in trunk/Tools

[EWS] Add unit tests for factories
https://bugs.webkit.org/show_bug.cgi?id=206159

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/factories_unittest.py: Added unit tests for factories.
1:28 PM Changeset in webkit [254447] by ysuzuki@apple.com
  • 9 edits
    2 deletes in trunk/Source/JavaScriptCore

[JSC] Put JSProxy in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=206187

Reviewed by Mark Lam.

  1. Put JSProxy in IsoSubspace.
  2. Make JSProxy non-destructible since derived class JSWindowProxy is having its own IsoSubspace with destructibility.
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::resetPrototype):
(JSC::JSGlobalObject::finishCreation):

  • runtime/JSNonDestructibleProxy.cpp: Removed.
  • runtime/JSNonDestructibleProxy.h: Removed.
  • runtime/JSProxy.h:

(JSC::JSProxy::subspaceFor):

  • runtime/JSStringIterator.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
12:21 PM Changeset in webkit [254446] by youenn@apple.com
  • 11 edits
    1 copy
    2 moves
    2 adds in trunk/Source/WebCore

Split AudioTrackPrivateMediaStreamCocoa to implement remote audio rendering
https://bugs.webkit.org/show_bug.cgi?id=206172

Reviewed by Eric Carlson.

Refactor code to allow in the future rendering of media stream audio tracks in a remote process.
For that purpose, split AudioTrackPrivateMediaStreamCocoa functionality in two parts.
The first part is moved back to AudioTrackPrivateMediaStream.
The second part is platform specific and is defined in terms of an interface AudioMediaStreamTrackRenderer
and an in process implementation named AudioMediaStreamTrackRendererCocoa.

Make TrackPrivateBase and MediaStreamTrackPrivate public LoggerHelper.
This allows making AudioMediaStreamTrackRenderer and AudioSampleDataSource to take a LoggerHelper instead of a derived instance.

No change of behavior.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/mac/AudioSampleDataSource.h:
  • platform/audio/mac/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::create):
(WebCore::AudioSampleDataSource::AudioSampleDataSource):

  • platform/graphics/TrackPrivateBase.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

  • platform/mediastream/AudioMediaStreamTrackRenderer.h: Added.

(WebCore::AudioMediaStreamTrackRenderer::setMuted):
(WebCore::AudioMediaStreamTrackRenderer::setVolume):
(WebCore::AudioMediaStreamTrackRenderer::volume const):
(WebCore::AudioMediaStreamTrackRenderer::isMuted const):

  • platform/mediastream/AudioTrackPrivateMediaStream.cpp: Added.

(WebCore::AudioTrackPrivateMediaStream::setLogger):
(WebCore::AudioTrackPrivateMediaStream::AudioTrackPrivateMediaStream):
(WebCore::AudioTrackPrivateMediaStream::~AudioTrackPrivateMediaStream):
(WebCore::AudioTrackPrivateMediaStream::clear):
(WebCore::AudioTrackPrivateMediaStream::playInternal):
(WebCore::AudioTrackPrivateMediaStream::play):
(WebCore::AudioTrackPrivateMediaStream::pause):
(WebCore::AudioTrackPrivateMediaStream::setVolume):
(WebCore::AudioTrackPrivateMediaStream::volume const):
(WebCore::AudioTrackPrivateMediaStream::audioSamplesAvailable):
(WebCore::AudioTrackPrivateMediaStream::trackMutedChanged):
(WebCore::AudioTrackPrivateMediaStream::trackEnabledChanged):
(WebCore::AudioTrackPrivateMediaStream::updateRendererMutedState):
(WebCore::AudioTrackPrivateMediaStream::trackEnded):

  • platform/mediastream/AudioTrackPrivateMediaStream.h:
  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: Added.

(WebCore::AudioMediaStreamTrackRendererCocoa::stop):
(WebCore::AudioMediaStreamTrackRendererCocoa::clear):
(WebCore::AudioMediaStreamTrackRendererCocoa::setPaused):
(WebCore::AudioMediaStreamTrackRendererCocoa::createAudioUnit):
(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):
(WebCore::AudioMediaStreamTrackRendererCocoa::render):
(WebCore::AudioMediaStreamTrackRendererCocoa::inputProc):

  • platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: Added.
  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h: Removed.
11:57 AM Changeset in webkit [254445] by Alan Coon
  • 3 edits
    4 adds in branches/safari-608.5.0.2-branch

Cherry-pick r254349. rdar://problem/58529691

ObjectAllocationSinkingPhase doesn't model pointers to allocations in control flow properly
https://bugs.webkit.org/show_bug.cgi?id=204738
<rdar://problem/57553238>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/allocation-sinking-must-model-allocation-pointers-properly-2.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-3.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-4.js: Added. (bool): (effects): (escape): (bar):
  • stress/allocation-sinking-must-model-allocation-pointers-properly.js: Added. (alwaysFalse): (sometimesZero): (assert): (v9):

Source/JavaScriptCore:

Allocation sinking phase conducts a points to analysis. It uses this
information for programs like:

`
1: NewObject
2: NewObject
3: PutByOffset(@2, @1, "x")
4: GetByOffset(@2, "x")
`

It solves the points to problem knowing @4 points to @1.

It tracks this data in the LocalHeap data structure. This is used to track
the heap across blocks, and it includes a merge function to handle control
flow merges. However, this merge function would not always merge the pointer
sets together. It sometimes would merge them together, since it had a fast
path check inside merge, which would just copy the contents of the block to be
merged with itself if it were this block's first time merging. This fast path happened
to hide the bug in general case merge code. If we didn't take this fast path,
we would just never transfer pointer sets from predecessor to successor. This
could lead to all kinds of issues, including using the incorrect phantom node
in IR instead of its materialized version. It could also lead to the phase not
sinking objects it is capable of sinking.

This patch makes it so that we merge together the pointer sets. We always add
new pointers to the set. So in pointer A->B, if the set has yet to see A, we
add it. If the set already contains pointer A->B, and we encounter a new
pointer A->C, or if we encounter a merge without any A->* pointer, we mark
the A pointer as top, marking it A->TOP. We do this to ensure that we fixpoint.
We're guaranteed that m_pointers is monotonically increasing (module liveness
pruning, which is a constant). And once something is TOP, it never becomes
anything else. (Instead of marking a pointer top, we used to just remove it
from the set, but this has issues, as it could lead to us ping-ponging in
our fixpoint analysis, add, remove, add, remove, etc.)

So the merge rules are:
{A->B} merge {A->B} => {A->B}
{A->B} merge {A->C} => {A->TOP}
{A->B} merge {A->TOP} => {A->TOP}
{A->B} merge {} => {A->TOP}

Thanks to Samuel Groß of Google Project Zero for identifying this bug.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:

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

11:51 AM Changeset in webkit [254444] by Alan Coon
  • 7 edits in branches/safari-608.5.7.3-branch/Source

Versioning.

11:48 AM Changeset in webkit [254443] by Alan Coon
  • 3 edits
    4 adds in branches/safari-608-branch

Cherry-pick r254349. rdar://problem/58529693

ObjectAllocationSinkingPhase doesn't model pointers to allocations in control flow properly
https://bugs.webkit.org/show_bug.cgi?id=204738
<rdar://problem/57553238>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/allocation-sinking-must-model-allocation-pointers-properly-2.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-3.js: Added. (assert): (v9):
  • stress/allocation-sinking-must-model-allocation-pointers-properly-4.js: Added. (bool): (effects): (escape): (bar):
  • stress/allocation-sinking-must-model-allocation-pointers-properly.js: Added. (alwaysFalse): (sometimesZero): (assert): (v9):

Source/JavaScriptCore:

Allocation sinking phase conducts a points to analysis. It uses this
information for programs like:

`
1: NewObject
2: NewObject
3: PutByOffset(@2, @1, "x")
4: GetByOffset(@2, "x")
`

It solves the points to problem knowing @4 points to @1.

It tracks this data in the LocalHeap data structure. This is used to track
the heap across blocks, and it includes a merge function to handle control
flow merges. However, this merge function would not always merge the pointer
sets together. It sometimes would merge them together, since it had a fast
path check inside merge, which would just copy the contents of the block to be
merged with itself if it were this block's first time merging. This fast path happened
to hide the bug in general case merge code. If we didn't take this fast path,
we would just never transfer pointer sets from predecessor to successor. This
could lead to all kinds of issues, including using the incorrect phantom node
in IR instead of its materialized version. It could also lead to the phase not
sinking objects it is capable of sinking.

This patch makes it so that we merge together the pointer sets. We always add
new pointers to the set. So in pointer A->B, if the set has yet to see A, we
add it. If the set already contains pointer A->B, and we encounter a new
pointer A->C, or if we encounter a merge without any A->* pointer, we mark
the A pointer as top, marking it A->TOP. We do this to ensure that we fixpoint.
We're guaranteed that m_pointers is monotonically increasing (module liveness
pruning, which is a constant). And once something is TOP, it never becomes
anything else. (Instead of marking a pointer top, we used to just remove it
from the set, but this has issues, as it could lead to us ping-ponging in
our fixpoint analysis, add, remove, add, remove, etc.)

So the merge rules are:
{A->B} merge {A->B} => {A->B}
{A->B} merge {A->C} => {A->TOP}
{A->B} merge {A->TOP} => {A->TOP}
{A->B} merge {} => {A->TOP}

Thanks to Samuel Groß of Google Project Zero for identifying this bug.

  • dfg/DFGObjectAllocationSinkingPhase.cpp:

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

11:42 AM Changeset in webkit [254442] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

11:32 AM Changeset in webkit [254441] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

Explain why we started skipping "insert-span-into-long-text-bug-28245.html" in debug.

11:26 AM Changeset in webkit [254440] by eric.carlson@apple.com
  • 2 edits in trunk/Tools

Don't softlink AVCapture classes on watchOS or tvOS
https://bugs.webkit.org/show_bug.cgi?id=205974
<rdar://problem/58427281>

Unreviewed test fix after r254257.

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

(TestWebKitAPI::TEST):

10:53 AM Changeset in webkit [254439] by jiewen_tan@apple.com
  • 24 edits
    5 adds in trunk

[WebAuthn] Support CTAP Client Pin
https://bugs.webkit.org/show_bug.cgi?id=191516
<rdar://problem/56558558>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by API tests.

  • Modules/webauthn/fido/DeviceRequestConverter.cpp:

(fido::encodeMakeCredenitalRequestAsCBOR):
(fido::encodeGetAssertionRequestAsCBOR):

  • Modules/webauthn/fido/Pin.cpp:

(fido::pin::RetriesResponse::parse):
(fido::pin::TokenResponse::parse):
(fido::pin::TokenRequest::tryCreate):
(fido::pin::encodeAsCBOR):

  • Modules/webauthn/fido/Pin.h:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • testing/MockWebAuthenticationConfiguration.h:

(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::encode const):
(WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode):

  • testing/MockWebAuthenticationConfiguration.idl:

Source/WebKit:

This patch implements authenticatorClientPIN from the spec:
https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#authenticatorClientPIN
Specifically, it implements section 5.5.1, 5.5.3, 5.5.4, 5.5.7, and 5.5.8.

Here is the flow how makeCredential/getAssertion works with a PIN in our implementation:

  1. Determine if the connected authenticator has a PIN;
  2. If yes, send the makeCredential/getAssertion request to the authenticator with an empty pinAuth

such that the authenticator will wink for user gestures. This step intends to confirm the authenticator
is the one the user wants to use. Otherwise, we don't know which authenticator to send the PIN
if multiple are connected;

  1. Once the user confirms the authetnicator, it will return either CTAP2_ERR_PIN_INVALID or

CTAP2_ERR_PIN_AUTH_INVALID. Some authenticators return CTAP2_ERR_PIN_AUTH_INVALID even though
it is not suggested by the spec;

  1. Get retries from the authenticator;
  2. Get key agreement from the authenticator;
  3. Ask the UI client for the PIN and at the meantime inform it the retries;
  4. Get pin token from the authenticator;
  5. Resend the makeCredential/getAssertion request with the desired pinAuth.

Besides implementating the above flow, this patch also fixes some bugs within the PIN commands encoder:

  1. pinAuth/pinProtocol are wrongly encoded for makeCredential/getAssertion;
  2. AES CBC should be called without any padding. Therefore, CryptoAlgorithmAES_CBC adds a no padding mode;
  3. The sharedSecret is the SHA256 digest of the ECDH key agreement instead of the raw key agreement.
  • UIProcess/API/APIWebAuthenticationPanelClient.h:

(API::WebAuthenticationPanelClient::requestPin const):

  • UIProcess/WebAuthentication/Authenticator.h:
  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:

(WebKit::AuthenticatorManager::requestPin):

  • UIProcess/WebAuthentication/AuthenticatorManager.h:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.h:
  • UIProcess/WebAuthentication/Cocoa/WebAuthenticationPanelClient.mm:

(WebKit::WebAuthenticationPanelClient::WebAuthenticationPanelClient):
(WebKit::WebAuthenticationPanelClient::requestPin const):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::feedReports):

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::CtapAuthenticator::makeCredential):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived):
(WebKit::CtapAuthenticator::getAssertion):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::getRetries):
(WebKit::CtapAuthenticator::continueGetKeyAgreementAfterGetRetries):
(WebKit::CtapAuthenticator::continueRequestPinAfterGetKeyAgreement):
(WebKit::CtapAuthenticator::continueGetPinTokenAfterRequestPin):
(WebKit::CtapAuthenticator::continueRequestAfterGetPinToken):
(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived const): Deleted.

  • UIProcess/WebAuthentication/fido/CtapAuthenticator.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/CtapPinTest.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/FidoTestData.h:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:requestPINWithRemainingRetries:completionHandler:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid-pin.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-key-agreement-error.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-pin-token-error.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin-get-retries-error.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-make-credential-hid-pin.html: Added.
10:34 AM Changeset in webkit [254438] by Alan Bujtas
  • 4 edits in trunk

[LFC][Integration] Turn off trailing letter-space trimming for the LineBreaker content
https://bugs.webkit.org/show_bug.cgi?id=206181
<rdar://problem/58532931>

Reviewed by Antti Koivisto.

Source/WebCore:

Do not mark trailing letter-spacing as trimmable in the "continuous content" we feed in to line breaking.
This causes different and unexpected line breaking behavior as we don't try to fit the letter-spacing after the last character.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::ContinuousContent::ContinuousContent):

LayoutTests:

  • platform/ios/css1/text_properties/letter_spacing-expected.txt: Undo the rebaselining.
9:52 AM Changeset in webkit [254437] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

[iOS] editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html times out
https://bugs.webkit.org/show_bug.cgi?id=206126
<rdar://problem/58060387>

Reviewed by Tim Horton.

This test is intended to verify that when ranged selection UI covers up most of the view, tapping the selection
will clear the selection instead of toggling the callout bar. However, there are a couple of issues that make
this test fail:

  • The long press that is intended to select text ends up under the "Sel" in select and above the "ect" that

wraps to the next line, which causes the word to not be selected. To fix this, I changed the tap location from
the center of the view to somewhere in the top half of the view, near the middle of "Sel".

  • The callout bar appears in the center of the screen with the "Look up" action in the middle, so tapping the

center of the view again causes a view controller to be presented when looking up the selected word ("Select").
We can avoid this by also moving the tap location away from the center of the view.

  • On iPad, the word "Select" isn't big enough to encompass most of the screen even at 250px, so the test fails.

We fix this by making the "Select" text much bigger (500px), and then make the body overflow: hidden so that
selecting the word on iPhone's smaller screen doesn't cause scrolling.

  • editing/selection/ios/clear-selection-after-tap-in-large-selected-non-editable-text.html:
9:39 AM Changeset in webkit [254436] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Remove 'com.apple.diagnosticd' from WebContent process sandbox
https://bugs.webkit.org/show_bug.cgi?id=206114
<rdar://problem/58496791>

Reviewed by Per Arne Vollan.

In Bug 205292 we began dynamically adding a sandbox extension for 'com.apple.diagnosticd' when needed.
We should remove the blanket permission from the sandbox.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
9:35 AM Changeset in webkit [254435] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Correct test expectations after r254428
https://bugs.webkit.org/show_bug.cgi?id=206164

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:19 AM Changeset in webkit [254434] by keith_miller@apple.com
  • 4 edits
    1 add in trunk

CheckNeutered needs to claim it reads JSType in clobberize.
https://bugs.webkit.org/show_bug.cgi?id=206136

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/check-neutered-clobberize-reads-jstype.js: Added.

(foo):

Source/JavaScriptCore:

CheckNeutered needs to read JSType otherwise it can get hoisted
past the TypedArray check guarding it.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

9:14 AM Changeset in webkit [254433] by Wenson Hsieh
  • 7 edits in trunk/Source/WebKit

[macCatalyst] UI process crashes on launch after r254101
https://bugs.webkit.org/show_bug.cgi?id=206156
<rdar://problem/58514942>

Reviewed by Brent Fulgham.

Fixes the crash by not soft-linking BackBoardServices in an attempt to invoke BKSDisplayBrightnessGetCurrent on
macCatalyst. Prior to r254101, this was only defined on iOS and not watchOS or tvOS; after this change, it
should be defined only on iOS, watchOS and tvOS.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::registerNotificationObservers):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:
9:06 AM Changeset in webkit [254432] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed gardening after r254409
https://bugs.webkit.org/show_bug.cgi?id=206150

  • platform/gtk/TestExpectations:
8:09 AM Changeset in webkit [254431] by Antti Koivisto
  • 4 edits in trunk

[LFC][Integration] editing/text-iterator/findString.html fails on iOS
https://bugs.webkit.org/show_bug.cgi?id=206164

Reviewed by Zalan Bujtas.

Source/WebCore:

  • rendering/line/LineLayoutTraversalDisplayRunPath.h:

(WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):

The test here was reversed.

LayoutTests:

  • platform/ios/TestExpectations:
8:02 AM Changeset in webkit [254430] by Antti Koivisto
  • 2 edits in trunk/LayoutTests

[iOS] Unreviewed test gardening after r254428.

  • platform/ios/css1/text_properties/letter_spacing-expected.txt:
7:04 AM Changeset in webkit [254429] by Alan Bujtas
  • 3 edits in trunk/LayoutTests

[Win] Unreviewed test gardening after r254421.

  • platform/win/css1/text_properties/text_indent-expected.txt:
  • platform/win/css2.1/t1601-c547-indent-01-d-expected.txt:
4:47 AM Changeset in webkit [254428] by Antti Koivisto
  • 16 edits in trunk

[LFC][Integration] Enable LFC integration
https://bugs.webkit.org/show_bug.cgi?id=206128

Reviewed by Zalan Bujtas.

Source/WebCore:

Enable the new line layout path.

  • page/RuntimeEnabledFeatures.h:

Source/WebKit:

  • Shared/WebPreferences.yaml:

LayoutTests:

Rebase for some progressions.

  • fast/dom/Range/getBoundingClientRect-expected.txt:
  • fast/dom/Range/getBoundingClientRect.html:

Update the test for new results. These match the complex line layout results (simple lines produce wrong results).

  • platform/ios/fast/text/whitespace/pre-break-word-expected.txt:
  • platform/ios/fast/text/word-break-expected.txt:
  • platform/mac/fast/text/hyphenate-limit-lines-expected.txt:
  • platform/mac/fast/text/whitespace/pre-break-word-expected.txt:
  • platform/mac/fast/text/word-break-expected.txt:

Line breaking and white-space progressions.

  • platform/ios/TestExpectations:

A subtest of editing/text-iterator/findString.html fails on iOS. This needs futher analysis.

  • platform/win/TestExpectations:

fast/dom/Range/getBoundingClientRect.html now fails on windows because LFC is not enabled there.

3:54 AM Changeset in webkit [254427] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] imported/blink/fast/shapes/crash-caused-by-dirtying-a-shape-while-computing-it-requires-a-long-filename-to-crash.html crashes on iOS
https://bugs.webkit.org/show_bug.cgi?id=206151

Reviewed by Zalan Bujtas.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

LFC doesn't expect line break boxes with float set (other layout systems just ignore it).

2:14 AM Changeset in webkit [254426] by Antti Koivisto
  • 7 edits in trunk/LayoutTests

[LFC][Integration] Ensure that simple line layout tests stays don't turn into LFC tests
https://bugs.webkit.org/show_bug.cgi?id=206153

Reviewed by Zalan Bujtas.

We have a handful of SLL tests that document non-standard behaviors. Keep these SLL only with LFC enabled.

  • fast/text/embed-at-end-of-pre-wrap-line-simple-lines-expected.html:
  • fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html:
  • fast/text/simple-line-layout-leading-whitespace-with-soft-hard-linebreak-expected.html:
  • fast/text/simple-line-layout-leading-whitespace-with-soft-hard-linebreak.html:
  • fast/text/whitespace/pre-wrap-long-word-simple-lines-expected.html:
  • fast/text/whitespace/pre-wrap-long-word-simple-lines.html:
2:11 AM Changeset in webkit [254425] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] fast/text/fast-run-width-vs-slow-run-width.html is failing
https://bugs.webkit.org/show_bug.cgi?id=206143

Reviewed by Zalan Bujtas.

The test is constructed so that the preferred width computation produces float value that maps exactly to LayoutUnit
(usually it gets ceiled up). This get converted back to float and the same input widths are substracted from
the total during inline layout. Due to nature of floating point arithmetic this ends up producing slightly
different result and the last word doesn't fit.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::tryWrappingInlineContent const):

When using floats, do an additional equality comparison that accepts values within scaled float epsilon as equal.

1:31 AM Changeset in webkit [254424] by Carlos Garcia Campos
  • 5 edits in trunk/Source

WebDriver: pressed virtual keys not correctly handled in action sequences
https://bugs.webkit.org/show_bug.cgi?id=205997

Reviewed by Brian Burg.

Source/WebDriver:

We are assuming that only one virtual key can be pressed and that a key up always releases the pressed virtual
key if any. We should keep a list of pressed keys and remove them from the list when key up happens for them.

Fixes: imported/w3c/webdriver/tests/perform_actions/key_modifiers.py::test_shift_modifier_generates_capital_letters[\ue008]

imported/w3c/webdriver/tests/perform_actions/key_modifiers.py::test_shift_modifier_generates_capital_letters[\ue050]

  • Session.cpp:

(WebDriver::Session::performActions):

  • Session.h:

Source/WebKit:

When modifiers are present we need to translate the keys that might be affected by the modifiers.

  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:

(WebKit::doKeyStrokeEvent):

1:27 AM Changeset in webkit [254423] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

Unreviewed. [GTK][WPE] Add missing autocleanup definition for WebKitInputMethodContext

I forgot to add it in r253749.

  • UIProcess/API/gtk/WebKitAutocleanups.h:
  • UIProcess/API/wpe/WebKitAutocleanups.h:

Jan 12, 2020:

11:33 PM Changeset in webkit [254422] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Remove CorePDF linkage in WebKit
https://bugs.webkit.org/show_bug.cgi?id=206103
<rdar://problem/58490563>

Reviewed by Wenson Hsieh.

  • Configurations/WebKit.xcconfig:
7:40 PM Changeset in webkit [254421] by Alan Bujtas
  • 7 edits in trunk

Text-indent with percentage value should resolve against the available width
https://bugs.webkit.org/show_bug.cgi?id=206155
<rdar://problem/58514882>

Reviewed by Antti Koivisto.

Source/WebCore:

https://www.w3.org/TR/css-text-3/#text-indent-property
"<percentage> Gives the amount of the indent as a percentage of the block container’s own logical width"

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::textIndentOffset const):

LayoutTests:

  • platform/mac/css1/text_properties/text_indent-expected.txt:
  • platform/mac/css2.1/t1601-c547-indent-01-d-expected.txt:
7:12 PM Changeset in webkit [254420] by ysuzuki@apple.com
  • 19 edits in trunk

[JSC] Use internal object field mechanism to implement JSStringIterator
https://bugs.webkit.org/show_bug.cgi?id=206144

Reviewed by Ross Kirsling.

JSTests:

  • stress/string-iterators.js:
  • stress/tailCallForwardArguments.js:

(putFuncToPrivateName.createBuiltin):
(createTailCallForwardingFuncWith):

Source/JavaScriptCore:

This patch uses internal object field mechanism to implement JSStringIterator,
and we also put JSStringIterator into IsoSubspace.

  • builtins/BuiltinNames.h:
  • builtins/StringIteratorPrototype.js:

(next):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsStringIterator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::stringIteratorInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getStringIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putStringIteratorInternalField):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::getInternalProperties):

  • runtime/JSCast.h:
  • runtime/JSStringIterator.cpp:

(JSC::JSStringIterator::finishCreation):
(JSC::JSStringIterator::clone):
(JSC::JSStringIterator::visitChildren):
(JSC::JSStringIterator::iteratedValue const): Deleted.

  • runtime/JSStringIterator.h:
  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncIterator):

  • runtime/VM.cpp:
  • runtime/VM.h:
7:10 PM Changeset in webkit [254419] by ysuzuki@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

[JSC] Remove IsDone from JSArrayIterator
https://bugs.webkit.org/show_bug.cgi?id=206140

Reviewed by Keith Miller.

We can store -1 in Index field to represent whether the iterator is closed.
While this patch does not change the allocation size of JSArrayIterator, this style can
shrink the size of JSStringIterator when we implement it in the same style.

We also rename iterationKindKeyValue to iterationKindEntries.

  • builtins/ArrayIteratorPrototype.js:

(globalPrivate.arrayIteratorNextHelper):

  • builtins/MapIteratorPrototype.js:

(globalPrivate.mapIteratorNext):

  • builtins/MapPrototype.js:

(entries):

  • builtins/SetIteratorPrototype.js:

(globalPrivate.setIteratorNext):

  • builtins/SetPrototype.js:

(entries):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::arrayIteratorInternalFieldIndex):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::cloneArrayIteratorObject):

  • runtime/JSArrayIterator.cpp:

(JSC::JSArrayIterator::finishCreation):

  • runtime/JSArrayIterator.h:
5:18 PM Changeset in webkit [254418] by ysuzuki@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

[JSC] Consistently use "var" in builtin JS
https://bugs.webkit.org/show_bug.cgi?id=206157

Reviewed by Mark Lam.

let / const requires additional bytecode to make it Empty initialized for now.
For builtin JS, we would like to keep it as efficient and compact as we can
so we should use var consistently.

  • builtins/ArrayPrototype.js:

(sort.stringComparator):
(sort.compactSparse):
(sort.compactSlow):
(sort.compact):
(sort.merge):
(sort.mergeSort):
(sort.bucketSort):
(sort.comparatorSort):
(sort.stringSort):
(sort):
(globalPrivate.concatSlowPath):
(concat):

  • builtins/FunctionPrototype.js:

(call):
(overriddenName.string_appeared_here.symbolHasInstance):

  • builtins/GlobalOperations.js:

(globalPrivate.copyDataProperties):
(globalPrivate.copyDataPropertiesNoExclusions):

  • builtins/IteratorHelpers.js:

(performIteration):

  • builtins/ModuleLoader.js:

(async loadModule):
(async loadAndEvaluateModule):
(async requestImportModule):
(dependencyKeysIfEvaluated):

  • builtins/ObjectConstructor.js:

(fromEntries):

  • builtins/PromisePrototype.js:

(finally):
(valueThunk):
(globalPrivate.getThenFinally):
(thrower):
(globalPrivate.getCatchFinally):
(const.valueThunk): Deleted.
(const.thrower): Deleted.

  • builtins/RegExpPrototype.js:

(globalPrivate.advanceStringIndex):
(globalPrivate.regExpExec):
(globalPrivate.hasObservableSideEffectsForRegExpMatch):
(globalPrivate.matchSlow):
(overriddenName.string_appeared_here.match):
(overriddenName.string_appeared_here.matchAll):
(getSubstitution):
(overriddenName.string_appeared_here.replace):
(overriddenName.string_appeared_here.search):
(globalPrivate.hasObservableSideEffectsForRegExpSplit):
(overriddenName.string_appeared_here.split):
(intrinsic.RegExpTestIntrinsic.test):

  • builtins/RegExpStringIteratorPrototype.js:

(next):

  • builtins/StringPrototype.js:

(match):
(matchAll):
(globalPrivate.hasObservableSideEffectsForStringReplace):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(globalPrivate.createHTML):

  • builtins/TypedArrayConstructor.js:

(of):
(from):

  • builtins/TypedArrayPrototype.js:

(globalPrivate.typedArraySpeciesConstructor):
(globalPrivate.typedArrayClampArgumentToStartOrEnd):
(fill):
(find):
(subarray):

4:21 PM Changeset in webkit [254417] by weinig@apple.com
  • 4 edits
    1 copy in trunk/Source/WTF

Platform.h is out of control Part 2: Split WTF_OS_* macro definitions out of Platform.h and into a new OS.h
https://bugs.webkit.org/show_bug.cgi?id=206138

Reviewed by Anders Carlsson.

As a another step towards cleaning up Platform.h, split out OS related
macros into their own file.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/OS.h: Copied from Source/WTF/wtf/Platform.h.
  • wtf/Platform.h:
2:42 PM Changeset in webkit [254416] by ysuzuki@apple.com
  • 6 edits in trunk/Source

[WebCore] Reorganize JSType in WebCore to offer more bits to JSC
https://bugs.webkit.org/show_bug.cgi?id=206141

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • runtime/JSType.h:

Source/WebCore:

This patch reorganize JSType a bit to offer more bits to JSC. Then JSC can use JSType for types easily.

  • bindings/js/JSDOMWrapper.h:
  • bindings/js/JSElementCustom.h:

(JSC::JSCastingHelpers::InheritsTraits<WebCore::JSElement>::inherits):

  • domjit/DOMJITHelpers.h:

(WebCore::DOMJIT::branchIfElement):
(WebCore::DOMJIT::branchIfNotElement):

1:30 PM Changeset in webkit [254415] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION(r185816): In the Hong Kong locale, navigator.language reports it's in the Taiwan locale
https://bugs.webkit.org/show_bug.cgi?id=200043

Make iOS bots green until they can be updated.

Unreviewed.

  • platform/ios/TestExpectations:
11:10 AM Changeset in webkit [254414] by Darin Adler
  • 5 edits in trunk/Source/WebCore

Remove unneeded MemoryIDBBackingStore::create
https://bugs.webkit.org/show_bug.cgi?id=205512

Reviewed by Youenn Fablet.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::createBackingStore): Call makeUnique
instead of MemoryIDBBackingStore::create.

  • Modules/indexeddb/server/MemoryCursor.cpp: Removed unneeded include

of MemoryIDBBackingStore.h.

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Fixed a comment

and replaced a global variable with a constant.
(WebCore::IDBServer::MemoryIDBBackingStore::create): Deleted.

  • Modules/indexeddb/server/MemoryIDBBackingStore.h: Made the class

final, made more of the member functions private, and moved a couple
function members out from in between the data members.

Jan 11, 2020:

11:44 PM Changeset in webkit [254413] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION(r185816): In the Hong Kong locale, navigator.language reports it's in the Taiwan locale
https://bugs.webkit.org/show_bug.cgi?id=200043

Unreviewed.

Fix build.

  • wtf/cocoa/LanguageCocoa.mm:

(WTF::canMinimizeLanguages):

11:16 PM Changeset in webkit [254412] by mmaxfield@apple.com
  • 22 edits in trunk

REGRESSION(r185816): In the Hong Kong locale, navigator.language reports it's in the Taiwan locale
https://bugs.webkit.org/show_bug.cgi?id=200043

Unreviewed.

Addressing additional review comments.

Source/WTF:

  • wtf/cocoa/LanguageCocoa.mm:

(WTF::canMinimizeLanguages):

LayoutTests:

  • fast/text/international/system-language/navigator-language/navigator-language-en-GB.html:
  • fast/text/international/system-language/navigator-language/navigator-language-en-US.html:
  • fast/text/international/system-language/navigator-language/navigator-language-en.html:
  • fast/text/international/system-language/navigator-language/navigator-language-es-419.html:
  • fast/text/international/system-language/navigator-language/navigator-language-es-ES.html:
  • fast/text/international/system-language/navigator-language/navigator-language-es-MX.html:
  • fast/text/international/system-language/navigator-language/navigator-language-es.html:
  • fast/text/international/system-language/navigator-language/navigator-language-fr-CA.html:
  • fast/text/international/system-language/navigator-language/navigator-language-fr.html:
  • fast/text/international/system-language/navigator-language/navigator-language-hi.html:
  • fast/text/international/system-language/navigator-language/navigator-language-ja.html:
  • fast/text/international/system-language/navigator-language/navigator-language-pt-BR.html:
  • fast/text/international/system-language/navigator-language/navigator-language-pt-PT.html:
  • fast/text/international/system-language/navigator-language/navigator-language-ru.html:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-HK.html:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-Hans.html:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-Hant-HK.html:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-Hant.html:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-TW.html:
10:57 PM Changeset in webkit [254411] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WTF

Fix internal Apple builds after r254389
https://bugs.webkit.org/show_bug.cgi?id=206135

Rubber stamped by Zalan Bujtas.

  • wtf/spi/cocoa/NSLocaleSPI.h:
8:21 PM Changeset in webkit [254410] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Introduce the concept of independent formatting context
https://bugs.webkit.org/show_bug.cgi?id=206137
<rdar://problem/58508015>

Reviewed by Sam Weinig.

At this point it is just about absolute positioned block level boxes since we don't support the "contain" property.
https://www.w3.org/TR/css-display-3/#independent-formatting-context

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesFormattingContext const):
(WebCore::Layout::Box::establishesIndependentFormattingContext const):

  • layout/layouttree/LayoutBox.h:
5:46 PM Changeset in webkit [254409] by achristensen@apple.com
  • 23 edits in trunk

Expose frame information on _WKResourceLoadInfo
https://bugs.webkit.org/show_bug.cgi?id=206104
<rdar://problem/57132290>

Reviewed by Dean Jackson.

Source/WebCore:

Covered by API tests.

  • page/FrameIdentifier.h:

(WebCore::frameIdentifierFromID): Deleted.

Source/WebKit:

  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::resourceLoadInfo):

  • Shared/API/Cocoa/_WKFrameHandle.h:
  • Shared/API/Cocoa/_WKFrameHandle.mm:

(-[_WKFrameHandle frameID]):
(-[_WKFrameHandle initWithCoder:]):
(-[_WKFrameHandle encodeWithCoder:]):
(-[_WKFrameHandle _frameID]): Deleted.

  • Shared/API/Cocoa/_WKFrameHandleInternal.h:
  • Shared/ResourceLoadInfo.h:

(WebKit::ResourceLoadInfo::encode const):
(WebKit::ResourceLoadInfo::decode):

  • UIProcess/API/APIResourceLoadInfo.h:
  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector showMainResourceForFrame:]):

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

(-[_WKResourceLoadInfo frame]):
(-[_WKResourceLoadInfo parentFrame]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _canChangeFrameLayout:]):
(-[WKWebView _printOperationWithPrintInfo:forFrame:]):

  • UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:

(-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::evaluateJavaScriptCallback):

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::addParametersFromFrame):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::installServiceWorker):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm:

(TEST):

5:25 PM Changeset in webkit [254408] by ysuzuki@apple.com
  • 8 edits in trunk

[WebCore] Fix crash in module loader due to change in fragment reservation
https://bugs.webkit.org/show_bug.cgi?id=206125

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url-expected.txt:

Source/WebCore:

At some point, CachedResource::url() starts returning URL without fragment.
However, this was invariant in ScriptModuleLoader, so one of WPT test is crashing.

We save source URL so that we preserve fragment information.
Still we need to have fragment information after the redirect to fix a bug filed in [1].

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

  • bindings/js/CachedModuleScriptLoader.cpp:

(WebCore::CachedModuleScriptLoader::load):

  • bindings/js/CachedModuleScriptLoader.h:
  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::notifyFinished):

LayoutTests:

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

[LFC] isOkToAccessDisplayBox should return false on formatting context root access.
https://bugs.webkit.org/show_bug.cgi?id=206123
<rdar://problem/58500267>

Reviewed by Antti Koivisto.

From now on any geometry access outside of the formatting context without a valid reason is considered an escape.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::geometryForBox const):

4:29 PM Changeset in webkit [254406] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Support image-set() standard syntax
https://bugs.webkit.org/show_bug.cgi?id=160934
<rdar://problem/27891501>

Patch by Noam Rosenthal <Noam Rosenthal> on 2020-01-11
Source/WebCore:

Reviewed by Simon Fraser.

Inside image-set, image URLs can use regular quotes, not necessarily with url().
See https://drafts.csswg.org/css-images-4/#image-set-notation

Test: fast/hidpi/image-set-as-background-quotes.html

  • css/parser/CSSPropertyParserHelpers.cpp:

Update CSS parser to allow raw strings as URLs inside image-set.

(WebCore::CSSPropertyParserHelpers::consumeUrlOrStringAsStringView):
(WebCore::CSSPropertyParserHelpers::consumeImageSet):

LayoutTests:

Reviewed by Dean Jackson.

  • fast/css/image-set-parsing-invalid.html:
  • fast/css/image-set-parsing.html:

Update parsing to include raw strings

  • fast/hidpi/image-set-as-background-quotes-expected.html: Added.
  • fast/hidpi/image-set-as-background-quotes.html: Added.

Added ref-test for image-set without url().

4:16 PM Changeset in webkit [254405] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] BlockFormattingContext::verticalPositionWithMargin should take VerticalConstraints
https://bugs.webkit.org/show_bug.cgi?id=206122
<rdar://problem/58500207>

Reviewed by Antti Koivisto.

This prevents verticalPositionWithMargin from reading geometry outside of the formatting context.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):

  • layout/blockformatting/BlockFormattingContext.h:
4:05 PM Changeset in webkit [254404] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][BFC] BlockFormattingContext::computeEstimatedVerticalPositionForAncestors should take ConstraintsPair<HorizontalConstraints>
https://bugs.webkit.org/show_bug.cgi?id=206121
<rdar://problem/58499492>

Reviewed by Antti Koivisto.

This prevents computeEstimatedVerticalPositionForAncestors from reading geometry outside of the formatting context.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot):
(WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear):

  • layout/blockformatting/BlockFormattingContext.h:
4:03 PM Changeset in webkit [254403] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Introduce BlockFormattingContext::ConstraintsPair
https://bugs.webkit.org/show_bug.cgi?id=206119
<rdar://problem/58498745>

Reviewed by Antti Koivisto.

This is in preparation for passing rootHorizontalConstraints all the way to BlockFormattingContext::computeEstimatedVerticalPosition().

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::ConstraintsPair<T>::ConstraintsPair):
(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot):
(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren):
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::computeStaticHorizontalPosition):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition):
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::ConstraintsPair::operator* const):
(WebCore::Layout::BlockFormattingContext::ConstraintsPair::root const):

3:47 PM Changeset in webkit [254402] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Visually collapse hanging pre-wrap content.
https://bugs.webkit.org/show_bug.cgi?id=206133
<rdar://problem/58505750>

Reviewed by Antti Koivisto.

This change is to comply with other rendering engines when it comes to visually collapsing hanging pre-wrap content.

https://www.w3.org/TR/css-text-3/#white-space-phase-2
"If white-space is set to pre-wrap, the UA must (unconditionally) hang this sequence, unless the sequence
is followed by a forced line break, in which case it must conditionally hang the sequence is instead.
It _may_ also visually collapse the character advance widths of any that would otherwise overflow."

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::visuallyCollapsePreWrapOverflowContent):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::adjustLogicalWidth):

10:07 AM Changeset in webkit [254401] by weinig@apple.com
  • 4 edits
    1 copy in trunk/Source/WTF

Platform.h is out of control Part 1: Split WTF_CPU_* macro definitions out of Platform.h and into a new CPU.h
https://bugs.webkit.org/show_bug.cgi?id=206124

Reviewed by Anders Carlsson.

As a step towards cleaning up Platform.h, split out CPU related
macros into their own file.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CPU.h: Copied from Source/WTF/wtf/Platform.h.
  • wtf/Platform.h:
9:42 AM Changeset in webkit [254400] by dino@apple.com
  • 9 edits in trunk

[WebGL] Clarify USE_OPENGL_ES_3
https://bugs.webkit.org/show_bug.cgi?id=206081
<rdar://problem/58486798>

Reviewed by Simon Fraser.

Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
and that the availability of OpenGL ES 3 is a separate query.

.:

  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

Source/WTF:

  • wtf/Platform.h:
9:31 AM Changeset in webkit [254399] by cathiechen
  • 13 edits
    2 deletes in trunk/LayoutTests

Import WPT test cases for 2dcontext/imagebitmap
https://bugs.webkit.org/show_bug.cgi?id=205908

Reviewed by Manuel Rego Casasnovas

LayoutTests/imported/w3c:

  • web-platform-tests/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/canvas-createImageBitmap-video-resize.html:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable.html:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html:
  • web-platform-tests/2dcontext/imagebitmap/no-coop-coep.https.window.html: Removed.
  • web-platform-tests/2dcontext/imagebitmap/no-coop-coep.https.window.js: Removed.
  • web-platform-tests/2dcontext/imagebitmap/w3c-import.log:

LayoutTests:

Update the expected files.

  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
9:02 AM Changeset in webkit [254398] by Antti Koivisto
  • 3 edits in trunk/LayoutTests

[LFC][Integration] fast/text/simple-lines-float.html should be about simple line layout only
https://bugs.webkit.org/show_bug.cgi?id=206129

Reviewed by Zalan Bujtas.

Explicitly disable LFC in this SLL feature test.

  • fast/text/simple-lines-float-expected.html:
  • fast/text/simple-lines-float.html:
6:57 AM Changeset in webkit [254397] by Kate Cheney
  • 11 edits in trunk

Add correct grandfathering functionality to the ITP database backend
https://bugs.webkit.org/show_bug.cgi?id=205844
<rdar://problem/58360450>

Reviewed by John Wilander.

Source/WebKit:

This patch adds functionality for grandfathering statistics upon
creation of a new ITP database file. The memory store relies on
the presence of the ITP plist to indicate whether the data should
be grandfathered. Since the database does not use a plist, this patch
adds a boolean variable to track whether the database file previously
existed or not to indicate when to grandfather.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:

The boolean variable m_isNewResourceLoadStatisticDatabaseFile is set
to true if the database file did not previously exist, indicating ITP
is being used for the first time and data should be grandfathered.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::populateMemoryStoreFromDisk):
This is where the grandfathering happens. The call to logTestingEvent
is for API testing purposes only.

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):
If a scheduleClearInMemoryAndPersistent is called, the plist is
deleted, and data will be grandfathered upon recreation. To mimic
this, the ITP database store is cleared and becomes "new" again, so
the boolean is set to true.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetIsITPDatabaseEnabled):
(WKPreferencesGetIsITPDatabaseEnabled):

  • UIProcess/API/C/WKPreferencesRef.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _isITPDatabaseEnabled]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

In order to properly run the grandfathering
API tests, the 'isITPDatabaseEnabled' boolean needs to be exposed from
Web Preferences.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

The API tests rely on the ITP database flag being set correctly. Since
being on-by-default, the ITP database flag does not show up in the
user defaults menu if enabled. This patch fixes this by first checking
to see if the value is in the defaults menu, otherwise returning the
default preferences value. This ensures the preferences value matches
the actual store being initialized.

Tools:

In order to test both the ITP database and memory stores, this patch
had to restructure the grandfathering API tests.

If the test is for the database backend (ends in *Database), it will
check if the default store matches. If so, it continues on with the
normal test. If not, it has to use an API call to reconstruct the
new store and ensure the grandfathering still happens. Vice versa for
the memory store tests.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(isITPDatabaseEnabled):
(TEST):

12:27 AM Changeset in webkit [254396] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress warnings in GCC, part 2
https://bugs.webkit.org/show_bug.cgi?id=202832

  • bytecode/ArithProfile.h:
12:18 AM Changeset in webkit [254395] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress warnings in GCC
https://bugs.webkit.org/show_bug.cgi?id=202832

  • bytecode/ArithProfile.h:
12:07 AM Changeset in webkit [254394] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed, fix RunLoopGeneric's RunLoop::cycle

  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::cycle):

Note: See TracTimeline for information about the timeline view.