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

Timeline



Dec 20, 2021:

11:19 PM Changeset in webkit [287299] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win] MSVC reports "DownloadBundleWin.cpp(87): error C2362: initialization of 'magic' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234504

Reviewed by Alex Christensen.

  • platform/network/win/DownloadBundleWin.cpp:

(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
Removed goto statements. Use std::unique_ptr for FILE*.

10:22 PM Changeset in webkit [287298] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

REGRESSION: [ iOS ] 5 TestWebKitAPI.WebpagePreferences.* api tests are flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=229094

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-20
Reviewed by Darin Adler.

The tests don't seem to time out any more. Let's try re-enabling them.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(TEST):

8:52 PM Changeset in webkit [287297] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win] MSVC reports "DumpRenderTree.cpp(633): error C2362: initialization of 'length' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234503

Reviewed by Don Olmstead.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(dumpHistoryItem): Removed goto statements. Use std::unique_ptr for SAFEARRAY.

7:09 PM Changeset in webkit [287296] by Wenson Hsieh
  • 5 edits
    2 adds in trunk/Source/WebKit

Add ModalContainerControlClassifier and use it to implement classifyModalContainerControls()
https://bugs.webkit.org/show_bug.cgi?id=234322

Reviewed by Devin Rousso.

Introduce and implement ModalContainerControlClassifier. This singleton uses the NaturalLanguage and CoreML
frameworks on Cocoa to classify strings as one of four modal container control types. See below for more
details.

  • SourcesCocoa.txt:
  • UIProcess/Cocoa/ModalContainerControlClassifier.h: Added.
  • UIProcess/Cocoa/ModalContainerControlClassifier.mm: Added.

(-[WKModalContainerClassifierBatch initWithRawInputs:]):
(-[WKModalContainerClassifierBatch count]):
(-[WKModalContainerClassifierBatch featuresAtIndex:]):
(-[WKModalContainerClassifierInput initWithTokenizer:rawInput:]):
(-[WKModalContainerClassifierInput featureNames]):
(-[WKModalContainerClassifierInput featureValueForName:]):

Add Objective-C objects that implement the MLBatchProvider and MLFeatureProvider protocols, respectively.
WKModalContainerClassifierBatch is essentially a wrapper around a list of WKModalContainerClassifierInput; each
WKModalContainerClassifierInput is initialized with a raw string, and uses NLTokenizer to filter out non-word
characters and tokenize the raw input into a single space-separated, lower case string (referred to as the
"canonical" input format).

(WebKit::ModalContainerControlClassifier::ModalContainerControlClassifier):
(WebKit::ModalContainerControlClassifier::sharedClassifier):

Return the singleton instance (this must be accessed on the main thread).

(WebKit::computePredictions):

Static helper method that takes a list of strings and an MLModel, and classifies each string using the model,
and the Objective-C helper classes above.

(WebKit::ModalContainerControlClassifier::classify):

This method exposes the primary functionality of the classifier, which is to take a list of raw strings
representing text in clickable controls, and asynchronously return a list of class labels representing the
predicted control type for each of the strings. Note that this method needs to be invoked on the main thread
(and will also invoke the completion handler on the main thread), but the process of loading the MLModel and
using it to predict input strings is done in a work queue ("com.apple.WebKit.ModalContainerControlClassifier").

(WebKit::ModalContainerControlClassifier::loadModelIfNeeded):

Load the MLModel from a predetermined bundle resource name; returns immediately if the model has
already been created. While this happens synchronously, this is always invoked on a background queue and never
blocks the main thread.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::classifyModalContainerControls):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::classifyModalContainerControls):

  • WebKit.xcodeproj/project.pbxproj:
6:30 PM Changeset in webkit [287295] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, garden GPU Process test expectations

  • gpu-process/TestExpectations:
6:25 PM Changeset in webkit [287294] by commit-queue@webkit.org
  • 55 edits in trunk/Source

[WebIDL] convertVariadicArguments() should return a FixedVector
https://bugs.webkit.org/show_bug.cgi?id=232639

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-20
Reviewed by Yusuke Suzuki.

Source/WebCore:

Since it's highly unlikely (CSSNumericArray is immutable) that we would need to
mutate variadic arguments before processing them or storing, and we know their size
upfront, it makes the most sense to save some memory by utilizing a FixedVector.

This patch reduces sizeof(ScheduledAction) by 8, enabling memory-neutral addition
of a field like m_incumbentGlobalObject.

No new tests, no behavior change.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::addTrack):

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

(WebCore::RTCPeerConnection::addTrack):

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

(WebCore::RTCRtpSender::setStreams):
(WebCore::RTCRtpSender::setMediaStreamIds):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/RTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addTrack):

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

(WebCore::LibWebRTCPeerConnectionBackend::addTrack):

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

(WebCore::LibWebRTCRtpSenderBackend::setMediaStreamIds):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • bindings/js/JSDOMConvertVariadic.h:

(WebCore::convertVariadicArguments):

  • bindings/js/ScheduledAction.cpp:

(WebCore::ScheduledAction::addArguments):

  • bindings/js/ScheduledAction.h:
  • css/typedom/CSSNumericValue.cpp:

(WebCore::CSSNumericValue::add):
(WebCore::CSSNumericValue::sub):
(WebCore::CSSNumericValue::mul):
(WebCore::CSSNumericValue::div):
(WebCore::CSSNumericValue::min):
(WebCore::CSSNumericValue::max):
(WebCore::CSSNumericValue::equals):
(WebCore::CSSNumericValue::toSum):

  • css/typedom/CSSNumericValue.h:
  • css/typedom/numeric/CSSMathMax.cpp:

(WebCore::CSSMathMax::create):
(WebCore::CSSMathMax::CSSMathMax):

  • css/typedom/numeric/CSSMathMax.h:
  • css/typedom/numeric/CSSMathMin.cpp:

(WebCore::CSSMathMin::create):
(WebCore::CSSMathMin::CSSMathMin):

  • css/typedom/numeric/CSSMathMin.h:
  • css/typedom/numeric/CSSMathProduct.cpp:

(WebCore::CSSMathProduct::create):
(WebCore::CSSMathProduct::CSSMathProduct):

  • css/typedom/numeric/CSSMathProduct.h:
  • css/typedom/numeric/CSSMathSum.cpp:

(WebCore::CSSMathSum::create):
(WebCore::CSSMathSum::CSSMathSum):

  • css/typedom/numeric/CSSMathSum.h:
  • css/typedom/numeric/CSSNumericArray.cpp:

(WebCore::CSSNumericArray::create):
(WebCore::CSSNumericArray::CSSNumericArray):

  • css/typedom/numeric/CSSNumericArray.h:
  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::append):
(WebCore::ContainerNode::prepend):
(WebCore::ContainerNode::replaceChildren):

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

(WebCore::Document::write):
(WebCore::Document::writeln):

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

(WebCore::DocumentTouch::createTouchList):

  • dom/DocumentTouch.h:
  • dom/Node.cpp:

(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):
(WebCore::Node::before):
(WebCore::Node::after):
(WebCore::Node::replaceWith):

  • dom/Node.h:
  • dom/TouchList.h:

(WebCore::TouchList::create):
(WebCore::TouchList::TouchList):

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::add):
(WebCore::DOMTokenList::remove):

  • html/DOMTokenList.h:
  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):

  • html/HTMLCanvasElement.h:
  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::getContext):

  • html/OffscreenCanvas.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):

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

(WebCore::DedicatedWorkerGlobalScope::importScripts):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::importScripts):

  • workers/WorkerGlobalScope.h:

Source/WebKit:

Add / remove tokens one by one because there is no way to retrieve
the size of va_list in advance so we could construct a FixedVector.

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

(webkit_dom_dom_token_list_add):
(webkit_dom_dom_token_list_remove):

Source/WTF:

Introduce std::initializer_list constructor for FixedVector and a WTF::map() overload.

  • wtf/FixedVector.h:

(WTF::FixedVector::FixedVector):
(WTF::map):

  • wtf/VectorTraits.h:
6:15 PM Changeset in webkit [287293] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

Introduce a fast path for replacing an attribute event listener
https://bugs.webkit.org/show_bug.cgi?id=234441

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-20
Reviewed by Chris Dumez.

This patch makes replacing attribute event listener (via EventHandler IDL attribute)
2.6x faster by avoiding creation of intermediate JSEventListener instance.

Reusing is safe even for JSErrorHandler listeners as they can be replaced only with
instances of the same class. Uninitialized JSLazyEventListener can also be "replaced"
if m_isInitialized if set, which makes it behave like a regular JSEventListener.
All this is caught by existing tests.

Additionaly, this change slightly (about 3% according to a microbenchmark) speeds up
lookup of attribute event listeners by removing virtual isAttribute() call and related
downcasts from the hot path. Also, inlines event handler's getters / setters,
and simplifies call forwarding.

Altogether, this patch improves Speedometer2/Inferno-TodoMVC score by 4%.

No new tests, no behavior change.

  • bindings/js/JSErrorHandler.h:

(WebCore::createJSErrorHandler): Deleted.

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::create):
(WebCore::JSEventListener::replaceJSFunctionForAttributeListener):
(WebCore::eventHandlerAttribute):
(WebCore::createEventListenerForEventHandlerAttribute): Deleted.
(WebCore::setEventHandlerAttribute): Deleted.
(WebCore::windowEventHandlerAttribute): Deleted.
(WebCore::setWindowEventHandlerAttribute): Deleted.

  • bindings/js/JSEventListener.h:

Although setWindowEventHandlerAttribute<JSErrorHandler> is currently unused, it's
templatized to accommodate a follow-up patch that will fix a web-compat issue.
This change carefully preserves current (slightly incorrect) onerror behavior.

While we don't care about performance of onerror, using templates improves uniformity
(aligns signatures of create() methods) and will simplify code generation in the follow-up.

(WebCore::setEventHandlerAttribute):
(WebCore::windowEventHandlerAttribute):
(WebCore::setWindowEventHandlerAttribute):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateAttributeSetterBodyDefinition):

  • bindings/scripts/test/JS/*: Updated.
  • dom/Document.cpp:

(WebCore::Document::setWindowAttributeEventListener):
(WebCore::Document::getWindowAttributeEventListener): Deleted.

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

(WebCore::EventTarget::setAttributeEventListener):
(WebCore::EventTarget::attributeEventListener):

  • dom/EventTarget.h:
5:31 PM Changeset in webkit [287292] by Simon Fraser
  • 12 edits in trunk/Tools

Make it possible to enable log channels in WebKitTestRunner and DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=234525

Reviewed by Wenson Hsieh.

Support a "--WebCoreLogging" argument to DumpRenderTree to enable the WebCore
log channels.

Support "--WebCoreLogging" and "--WebKitLogging" arguments to WebKitTestRunner to enable the WebCore
and WebKit log channels.

DRT requires the double dash format, so I chose to have both use double dashes
for consistency (although this is inconsistent with the single dash format used
by AppKit and UIKit apps).

  • DumpRenderTree/mac/DumpRenderTree.mm:

(initializeGlobalsFromCommandLineOptions):
(prepareConsistentTestingEnvironment):

  • WebKitTestRunner/Options.cpp:

(WTR::handleOptionLogChannels):
(WTR::OptionsHandler::OptionsHandler):

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

(WTR::TestController::initialize):

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

(WTR::TestController::cocoaPlatformInitialize):

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:

(WTR::TestController::platformInitialize):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformInitialize):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformInitialize):

  • WebKitTestRunner/win/TestControllerWin.cpp:

(WTR::TestController::platformInitialize):

  • WebKitTestRunner/wpe/TestControllerWPE.cpp:

(WTR::TestController::platformInitialize):

5:31 PM Changeset in webkit [287291] by Simon Fraser
  • 1 edit in trunk/Source/WebCore/ChangeLog

Remove EventHandler::scrollDistance()
https://bugs.webkit.org/show_bug.cgi?id=234494

Reviewed by Wenson Hsieh.

This function is unused.

  • page/EventHandler.cpp:

(WebCore::EventHandler::scrollDistance): Deleted.

  • page/EventHandler.h:
5:31 PM Changeset in webkit [287290] by Simon Fraser
  • 1 edit in trunk/Source/WebCore/ChangeLog

Minor cleanup in aisle EventHandler::handleWheelEventInAppropriateEnclosingBox()
https://bugs.webkit.org/show_bug.cgi?id=234493

Reviewed by Wenson Hsieh.

Remove a confusing RenderListBox special case, which simply existed because the loop
below didn't know how to get a ScrollableArea for a RenderListBox.

Also rename didScrollInScrollableArea() to scrollViaNonPlatformEvent() because
the past tense in the name was inaccurate.

  • page/EventHandler.cpp:

(WebCore::scrollViaNonPlatformEvent):
(WebCore::EventHandler::handleWheelEventInAppropriateEnclosingBox):
(WebCore::didScrollInScrollableArea): Deleted.

5:19 PM Changeset in webkit [287289] by Dewei Zhu
  • 3 edits
    2 adds in trunk/Tools

'run-benchmark' should launch browsers in a relative clean state.
https://bugs.webkit.org/show_bug.cgi?id=234107

Reviewed by Stephanie Lewis.

Add code to ensure Chrome and Firefox launches in a relative clean state.
Refactor browser drivers for macOS Chrome and Firefox to share more code.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:

Added '--no-first-run', '--no-default-browser-check', '--disable-extensions' flags.
(OSXChromeDriverBase):
(OSXChromeDriverBase.launch_url):
(OSXChromeDriverBase.launch_driver):
(OSXChromeDriverBase._create_chrome_options):
(OSXChromeDriverBase._window_size_arg):
(OSXChromeDriverBase._set_chrome_binary_location):
(OSXChromeDriver):
(OSXChromeDriver._set_chrome_binary_location):
(OSXChromeCanaryDriver._set_chrome_binary_location):
(OSXChromeDriver.launch_url): Deleted.
(OSXChromeDriver.launch_driver): Deleted.
(OSXChromeCanaryDriver.launch_url): Deleted.
(OSXChromeCanaryDriver.launch_driver): Deleted.
(create_args): Deleted.
(create_chrome_options): Deleted.
(create_window_size_arg): Deleted.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:

Added code to use profiles to suppress default browser check and privacy notice tab.
(OSXFirefoxDriverBase):
(OSXFirefoxDriverBase.init):
(OSXFirefoxDriverBase.prepare_env):
(OSXFirefoxDriverBase.restore_env):
(OSXFirefoxDriverBase.launch_url):
(OSXFirefoxDriverBase.launch_driver):
(OSXFirefoxDriverBase._setup_temporary_profile_directory):
(OSXFirefoxDriverBase._teardown_temporary_profile_directory):
(OSXFirefoxDriverBase._set_firefox_binary_location):
(OSXFirefoxDriver):
(OSXFirefoxDriver._set_firefox_binary_location):
(OSXFirefoxNightlyDriver):
(OSXFirefoxNightlyDriver._set_firefox_binary_location):
(OSXFirefoxDriver.launch_url): Deleted.
(OSXFirefoxDriver.launch_driver): Deleted.
(OSXFirefoxNightlyDriver.launch_url): Deleted.
(OSXFirefoxNightlyDriver.launch_driver): Deleted.
(create_args): Deleted.

  • Scripts/webkitpy/benchmark_runner/data/firefox_profile/user.js: Added user preferences

so that Firefox can be launched without checking default browser and privacy notice.

4:33 PM Changeset in webkit [287288] by Fujii Hironori
  • 16 edits
    2 copies
    3 adds in trunk/Source/WebKit

WC variant RemoteGraphicsContextGL::platformLayer() should be removed
https://bugs.webkit.org/show_bug.cgi?id=233756
<rdar://problem/86261919>

Reviewed by Kimmo Kinnunen.

WinCairo is using TextureMapperGCGLPlatformLayer as the WebGL
PlatformLayer at the moment, that is using only a single output
buffer. And, WinCairo doesn't transfer the WebGL output buffer
cross-process boundary even in GPU process mode. Based on these
assumptions, r285099 added platformLayer() method to
RemoteGraphicsContextGL to get a PlatformLayer and pass it to the
compositor in GPU process.

However, this is not appropriate. The output buffer identifier
should be transferred to web process by using the completion
handler of RemoteGraphicsContextGL::PrepareForDisplay message.
Then, the identifier will be passed back to GPU process.

Added WCContentBufferManager to manage the WebGL output buffer
identifiers. However, because TextureMapperGCGLPlatformLayer has
only a single output buffer, the maximum number of identifiers is
one for each PlatformLayer now.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::releaseWCLayerTreeHost):
(WebKit::GPUConnectionToWebProcess::findRemoteGraphicsContextGL): Deleted.

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLWin.cpp:

(WebKit::RemoteGraphicsContextGLWin::prepareForDisplay):
(WebKit::RemoteGraphicsContextGL::prepareForDisplay): Deleted.
(WebKit::RemoteGraphicsContextGL::platformLayer const): Deleted.

  • GPUProcess/graphics/wc/RemoteWCLayerTreeHost.cpp:

(WebKit::RemoteWCLayerTreeHost::RemoteWCLayerTreeHost):
(WebKit::RemoteWCLayerTreeHost::update):

  • GPUProcess/graphics/wc/RemoteWCLayerTreeHost.h:
  • GPUProcess/graphics/wc/WCContentBuffer.h: Added.
  • GPUProcess/graphics/wc/WCContentBufferManager.cpp: Added.

(WebKit::WCContentBufferManager::ProcessInfo::ProcessInfo):
(WebKit::WCContentBufferManager::ProcessInfo::acquireContentBufferIdentifier):
(WebKit::WCContentBufferManager::ProcessInfo::releaseContentBufferIdentifier):
(WebKit::WCContentBufferManager::ProcessInfo::removeContentBuffer):
(WebKit::WCContentBufferManager::singleton):
(WebKit::WCContentBufferManager::acquireContentBufferIdentifier):
(WebKit::WCContentBufferManager::releaseContentBufferIdentifier):
(WebKit::WCContentBufferManager::removeContentBuffer):
(WebKit::WCContentBufferManager::removeAllContentBuffersForProcess):

  • GPUProcess/graphics/wc/WCContentBufferManager.h: Added.
  • GPUProcess/graphics/wc/WCScene.cpp:

(WebKit::WCScene::WCScene):
(WebKit::WCScene::update):

  • GPUProcess/graphics/wc/WCScene.h:
  • PlatformWin.cmake:
  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(conditions_for_header):

  • Shared/wc/WCContentBufferIdentifier.h: Added.
  • WebProcess/GPU/graphics/wc/RemoteGraphicsContextGLProxyWC.cpp:
  • WebProcess/GPU/graphics/wc/WCPlatformLayerGCGL.h:

(WebKit::WCPlatformLayerGCGL::takeContentBufferIdentifiers):
(WebKit::WCPlatformLayerGCGL::addContentBufferIdentifier):
(WebKit::WCPlatformLayerGCGL::WCPlatformLayerGCGL): Deleted.
(WebKit::WCPlatformLayerGCGL::graphicsContextGLIdentifier): Deleted.

  • WebProcess/WebPage/wc/GraphicsLayerWC.cpp:

(WebKit::GraphicsLayerWC::setContentsNeedsDisplay):
(WebKit::GraphicsLayerWC::flushCompositingStateForThisLayerOnly):

  • WebProcess/WebPage/wc/WCUpateInfo.h:

(WebKit::WCLayerUpateInfo::encode const):
(WebKit::WCLayerUpateInfo::decode):

4:33 PM Changeset in webkit [287287] by Alan Bujtas
  • 7 edits
    1 copy
    1 add in trunk/Source/WebCore

[LFC][IFC] Decouple LineBox and InlineDisplay:Line construction
https://bugs.webkit.org/show_bug.cgi?id=234519

Reviewed by Antti Koivisto.

Layout::LineBox has logical geometry while InlineDisplay::Line is all physical.
This is also in preparation for supporting RTL lines.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/formattingContexts/inline/InlineLevelBox.h:
  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::build):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.h:
  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: Added.

(WebCore::Layout::InlineDisplayLineBuilder::InlineDisplayLineBuilder):
(WebCore::Layout::InlineDisplayLineBuilder::build):

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h: Copied from Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h.

(WebCore::Layout::InlineDisplayLineBuilder::formattingContext const):
(WebCore::Layout::InlineDisplayLineBuilder::root const):
(WebCore::Layout::InlineDisplayLineBuilder::layoutState const):

4:24 PM Changeset in webkit [287286] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Don't include SVGImageForContainers in allCachedSVGImages
https://bugs.webkit.org/show_bug.cgi?id=234364

Patch by Matt Woodrow <Matt Woodrow> on 2021-12-20
Reviewed by Dean Jackson.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::image const):
(WebCore::CachedImage::hasSVGImage const):
(WebCore::CachedImage::image): Deleted.

  • loader/cache/CachedImage.h:
4:22 PM Changeset in webkit [287285] by Robert Jenner
  • 2 edits in branches/safari-612-branch/Tools

Fix for Cherry-pick r283599. rdar://problem/83897435
https://bugs.webkit.org/show_bug.cgi?id=231246

Unreviewed test gardening.

Adding an '#endif' that got left off the cherry pick for disabling an api-test for iOS.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
4:08 PM Changeset in webkit [287284] by Robert Jenner
  • 2 edits in branches/safari-612-branch/Tools

Cherry-pick r283599. rdar://problem/83897435

[ iOS15 ] TestWebKitAPI.ResourceLoadStatistics.DataTaskIdentifierCollision is a constant crash
https://bugs.webkit.org/show_bug.cgi?id=231246

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-05
Reviewed by Chris Dumez.

For a reason that is mysterious to me, this test was timing out on iOS
in the call to synchronouslyLoadHTMLString unless I added "addToWindow:NO"
to the TestWKWebView initialization.

For a reason that is also mysterious to me, the test was crashing when closing
because of something in the autoreleasepool, but using Vector<String> instead of
RetainPtr<NSArray<NSString *>> in DataTaskIdentifierCollisionDelegate makes that
stop crashing.

I've looked quite closely and don't see why this fixes it, but I verified that it does.

While I was at it, I migrated from TCPServer to HTTPServer to be more robust against timeouts,
because the TCPServer destructor waits forever for threads to join, and if not everything is
perfect it will make the tests time out, which isn't great. HTTPServer does everything on the
main thread with callbacks instead.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (-[DataTaskIdentifierCollisionDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): (-[DataTaskIdentifierCollisionDelegate waitForMessages:]): (waitUntilTwoServersConnected): (TEST):

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

3:25 PM Changeset in webkit [287283] by Robert Jenner
  • 2 edits in branches/safari-612-branch/Tools

Fix for Cherry-pick r284133.
https://bugs.webkit.org/show_bug.cgi?id=231700

Unreviewed test gardening.

Remove unintedned "<<<<<<< HEAD" entries in file from cherry pick that could break the build.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

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

[GLIB] Update test expectations for some fast/box-shadow tests.
https://bugs.webkit.org/show_bug.cgi?id=234530

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-20

  • platform/glib/TestExpectations:
3:01 PM Changeset in webkit [287281] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Adopt ChromeClient::classifyModalContainerControls() in ModalContainerObserver
https://bugs.webkit.org/show_bug.cgi?id=234323

Reviewed by Devin Rousso.

Hook into the new chrome client method introduced in bug #234320 in ModalContainerObserver, by propagating the
identified strings through the client layer for classification, and then using the predicted class labels to
fulfill the document loader's ModalContainerObservationPolicy.

  • page/ModalContainerObserver.cpp:

(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):
(WebCore::ModalContainerObserver::collectClickableElementsTimerFired):

Use the predicted class labels to find a suitable element on which we should dispatch a simulated click.

  • page/ModalContainerObserver.h:
2:55 PM Changeset in webkit [287280] by Robert Jenner
  • 8 edits in branches/safari-612-branch/Tools

Cherry-pick r284133. rdar://problem/84224737

Disable failing API tests
https://bugs.webkit.org/show_bug.cgi?id=231700

Unreviewed test gardening.

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDoesNotLogDuringInitialization.mm:
  • TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm:

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

2:14 PM Changeset in webkit [287279] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit

Add some missing API availability macros around some WebXR SPI
https://bugs.webkit.org/show_bug.cgi?id=234521

Reviewed by Tim Horton.

Add some missing API availability macros around some WebXR-related SPI that was introduced in r286318.
Also remove a few unnecessary PLATFORM(COCOA) compile-time guards, and add a missing #import to fix the
non-unified build.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/PlatformXRCoordinator.mm:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):

2:11 PM Changeset in webkit [287278] by J Pascoe
  • 2 edits in trunk/Tools

[WebAuthn] Add option to change requestWebAuthenticationNoGesture delegate for api tests.
https://bugs.webkit.org/show_bug.cgi?id=234444
rdar://86644642

Reviewed by Brent Fulgham.

These test a lack of user gesture in local authenticator. Recently we made a change to
change user gesture behavior, causing these tests to call out to an agent that cannot be called
from TWAPI. To restore test behavior, we add an option to change the return value of the
requestWebAuthenticationNoGesture delegate in tests.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelUIDelegate _webView:requestWebAuthenticationNoGestureForOrigin:completionHandler:]):
(TestWebKitAPI::WebCore::reset):
(TestWebKitAPI::TEST):

2:09 PM Changeset in webkit [287277] by J Pascoe
  • 2 edits in trunk/Tools

[WebAuthn] Only run WebAuthn test process on platform it is used
https://bugs.webkit.org/show_bug.cgi?id=234445
rdar://86646638

Reviewed by Brent Fulgham.

Add PLATFORM(IOS) macro around webauthn process test.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
2:04 PM Changeset in webkit [287276] by achristensen@apple.com
  • 8 edits in trunk

Prevent test functionality in AdAttributionDaemon when not running tests
https://bugs.webkit.org/show_bug.cgi?id=231258
Source/WebKit:

<rdar://84168088>

Reviewed by Brady Eidson.

adattributiond already has a private entitlement check to make sure that only the network process has permission to connect to it.
This makes it so that the network process can't manipulate state only intended to be manipulated for tests when told to do so by
an application misusing SPI.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::allowsPrivateClickMeasurementTestFunctionality const):
(WebKit::NetworkProcess::setPrivateClickMeasurementOverrideTimerForTesting):
(WebKit::NetworkProcess::simulateResourceLoadStatisticsSessionRestart):
(WebKit::NetworkProcess::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::NetworkProcess::setPrivateClickMeasurementEphemeralMeasurementForTesting):
(WebKit::NetworkProcess::setPrivateClickMeasurementTokenPublicKeyURLForTesting):
(WebKit::NetworkProcess::setPrivateClickMeasurementTokenSignatureURLForTesting):
(WebKit::NetworkProcess::setPrivateClickMeasurementAttributionReportURLsForTesting):
(WebKit::NetworkProcess::markPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::NetworkProcess::setPCMFraudPreventionValuesForTesting):
(WebKit::NetworkProcess::setPrivateClickMeasurementAppBundleIDForTesting):

  • NetworkProcess/NetworkProcess.h:

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
  • WebKitTestRunner/Configurations/WebKitTestRunner.entitlements:
1:58 PM Changeset in webkit [287275] by achristensen@apple.com
  • 4 edits in trunk

[ Monterey ] TestWebKitAPI.WebSocket.PageWithAttributedBundleIdentifierDestroyed (API-test) is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=233224

Reviewed by Darin Adler.

Source/WebKit:

Using NSURLSession._attributedBundleIdentifier requires the com.apple.private.network.socket-delegate entitlement,
which can't be signed into the network process with the public SDK.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::addWebPageNetworkParameters):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm:

(TestWebKitAPI::TEST):

1:36 PM Changeset in webkit [287274] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Minor cleanup in AuthenticationServicesCoreSPI.h
https://bugs.webkit.org/show_bug.cgi?id=234514

Reviewed by Devin Rousso.

When using the Apple internal SDK, directly import <AuthenticationServicesCore/ASCWebKitSPISupport.h> instead of
relying on forward declarations (or, in this case, relying on a previous unified source to import the header
through WebKitAdditions).

Additionally leave a FIXME to clean up the rest of this file by importing the private headers directly when
building with the internal SDK (and falling back to forward declarations in non-internal builds).

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
1:02 PM Changeset in webkit [287273] by Wenson Hsieh
  • 3 edits
    4 adds in trunk/Source/WebCore/PAL

Add PAL soft linking headers for CoreML and NaturalLanguage frameworks
https://bugs.webkit.org/show_bug.cgi?id=234489

Reviewed by Devin Rousso.

Add CoreMLSoftLink.h and NaturalLanguageSoftLink.h; to be used in an upcoming patch that will add support for
classifying text inside controls in "modal containers". See rdar://77073735 for more details.

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/CoreMLSoftLink.h: Added.
  • pal/cocoa/CoreMLSoftLink.mm: Added.
  • pal/cocoa/NaturalLanguageSoftLink.h: Added.
  • pal/cocoa/NaturalLanguageSoftLink.mm: Added.
12:19 PM Changeset in webkit [287272] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy/win

[Win] MSVC reports "COMPropertyBag.h(233): error C2385: ambiguous access of 'IUnknown'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234498

Reviewed by Don Olmstead.

Source\WebKitLegacy\win\COMPropertyBag.h(233): error C2385: ambiguous access of 'IUnknown'

This problem has been reported in the following ticket, and it has a workaround.
<https://developercommunity.visualstudio.com/t/error-c2385-ambiguous-access-of-iunknown-referring/230955>

  • COMPropertyBag.h:

(HashType>::LoadObject): Added the global namespace prefix '::' to
IUnknown for the workaround.

12:17 PM Changeset in webkit [287271] by Alan Bujtas
  • 3 edits
    2 moves in trunk/Source/WebCore

[LFC][IFC] Move display builder files under /display directory
https://bugs.webkit.org/show_bug.cgi?id=234517

Reviewed by Antti Koivisto.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp: Renamed from Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp.
  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h: Renamed from Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.h.
12:12 PM Changeset in webkit [287270] by Patrick Griffis
  • 8 edits
    2 deletes in trunk

CSP: Always use UTF-8 encoded content when checking hashes
https://bugs.webkit.org/show_bug.cgi?id=234159

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations as passing.

  • web-platform-tests/content-security-policy/script-src/hash-always-converted-to-utf-8/utf-8-lone-surrogate-expected.txt:
  • web-platform-tests/content-security-policy/script-src/scripthash-unicode-normalization.sub-expected.txt:

Source/WebCore:

As per the spec: https://www.w3.org/TR/CSP3/#match-element-to-source-list

Regardless of the encoding of the document, source will be converted to UTF-8

before applying any hashing algorithms.

StrictConversionReplacingUnpairedSurrogatesWithFFFD matches Chromiums behavior.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::findHashOfContentInPolicies const):

LayoutTests:

Remove normalization tests that are counter to WPT's CSP normalization tests.

  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests.html:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-unicode-normalization-expected.txt: Removed.
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-unicode-normalization.html: Removed.
11:58 AM Changeset in webkit [287269] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy/win

[Win] MSVC reports "COMVariantSetter.h(133): error C2760: syntax error: unexpected token 'identifier', expected ';'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234501

Reviewed by Don Olmstead.

Source\WebKitLegacy\win\COMVariantSetter.h(133): error C2760: syntax error: unexpected token 'identifier', expected ';'
Source\WebKitLegacy\win\COMVariantSetter.h(140): note: see reference to class template instantiation 'COMVariantSetter<WTF::Vector<T,0,WTF::CrashOnOverflow,16,WTF::VectorMalloc>>' being compiled

COMVariant should be used after defined.

  • COMVariantSetter.h:

(COMVariantSetter<Vector<T>>): Moved after the COMVariant
definition.

11:54 AM Changeset in webkit [287268] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win] MSVC reports "DragImageCairoWin.cpp(142): error C2362: initialization of 'cr' is skipped by 'goto exit'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234505

Reviewed by Don Olmstead.

  • platform/win/DragImageCairoWin.cpp:

(WebCore::scaleDragImage):
Reimplemented without goto statements.

11:03 AM Changeset in webkit [287267] by ntim@apple.com
  • 3 edits in trunk/Tools

Stop assuming WPT is a reftest based on existence of -ref.html file
https://bugs.webkit.org/show_bug.cgi?id=234510

Reviewed by Sam Sneddon & Darin Adler.

Only the presence of <link rel="match">/<link rel="mismatch"> indicates a test is a reftest. The script
should not assume that the existence of a similarly named file with a -ref.html suffix means that the
original test file is reftest.

Here's how upstream WPT detects reftests:
https://github.com/web-platform-tests/wpt/blob/22f29564bb82b407aeaf6507c8efffdbd51b9974/tools/manifest/sourcefile.py#L1065

  • Scripts/webkitpy/w3c/test_parser.py:

(TestParser.analyze_test):
(TestParser.fuzzy_metadata):
(TestParser.is_reference_filename):
(TestParser.potential_ref_filename): Deleted.
(TestParser.is_wpt_reftest): Deleted.

  • Scripts/webkitpy/w3c/test_parser_unittest.py:
11:02 AM Changeset in webkit [287266] by ntim@apple.com
  • 10 edits
    62 adds in trunk/LayoutTests

Re-import the-dialog-element WPT
https://bugs.webkit.org/show_bug.cgi?id=234479

Reviewed by Dean Jackson.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/6259400ce70fd41d25bcf5db624a04db854f304e

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/backdrop-receives-element-events.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/closed-dialog-does-not-block-mouse-events-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/closed-dialog-does-not-block-mouse-events.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-canceling-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-canceling.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-event-async-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-event-async.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-event-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-event.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-disconnected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-2-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-2.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-show-modal-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-show-modal-inert-crash.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-show-modal.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-focus-in-frames-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-focus-in-frames.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-inlines-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-inlines.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-uneditable-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-uneditable.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unselectable-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unselectable.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inertness-with-modal-dialogs-and-iframes-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inertness-with-modal-dialogs-and-iframes.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-ancestor-is-inert-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-ancestor-is-inert.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-blocks-mouse-events-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-blocks-mouse-events.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-scroll-height-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-scroll-height.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/multiple-centered-dialogs-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/multiple-centered-dialogs.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/non-modal-dialog-does-not-block-mouse-events-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/non-modal-dialog-does-not-block-mouse-events.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/non-modal-dialog-layout-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/non-modal-dialog-layout.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/dialog.css:

(.pseudodialog):

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/inert-focus-in-frames-frame1.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/inert-focus-in-frames-frame2.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/w3c-import.log:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/showmodal-in-shadow-crash.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/showmodal-shadow-sibling-frame-crash.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/simulated-click-inert-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/simulated-click-inert.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/submit-dialog-close-event-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/submit-dialog-close-event.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/synthetic-click-inert-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/synthetic-click-inert.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-mask.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-position-relative-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-position-relative.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-position-static-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-position-static.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-position-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-position.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/closed-dialog-does-not-block-mouse-events-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-inlines-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-label-focus-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-ancestor-is-inert-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-blocks-mouse-events-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/non-modal-dialog-does-not-block-mouse-events-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/simulated-click-inert-expected.txt: Added.
9:57 AM Changeset in webkit [287265] by Fujii Hironori
  • 3 edits in trunk/Source/WTF

MSVC reports "wtf/RetainPtr.h(196): error C3861: 'CFAutorelease': identifier not found " with /permissive- on Windows
https://bugs.webkit.org/show_bug.cgi?id=202842

Reviewed by Darin Adler.

r287200 fixed the problem, but not a right fix.

  • wtf/PlatformHave.h: Defined a new macro HAVE_CFAUTORELEASE for PLATFORM(COCOA).
  • wtf/RetainPtr.h: Use HAVE(CFAUTORELEASE) instead of PLATFORM(COCOA).
9:45 AM Changeset in webkit [287264] by Lauro Moura
  • 3 edits in trunk/Tools

[webkitcorepy] Require cryptography while on Linux with Py3
https://bugs.webkit.org/show_bug.cgi?id=234499

Reviewed by Philippe Normand.

cryptography is required by secretstorage.util. When not installed,
the import fails and the keyring backend initialization fails silently,
just removing the SecretService keyring backend from the list of
viable backends. This can happen when running the scripts from a fresh
virtualenv, for example.

  • Scripts/libraries/webkitcorepy/setup.py:
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py:
8:56 AM Changeset in webkit [287263] by svillar@igalia.com
  • 4 edits in trunk

[css-flexbox] Pre-layout orthogonal children to compute the preferred logical width
https://bugs.webkit.org/show_bug.cgi?id=234300

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/intrinsic-width-orthogonal-writing-mode-expected.txt: Replaced

FAIL by PASS expectations for 2 subtests that are passing now.

Source/WebCore:

In order to properly compute the flex container intrinsic width we must layout the orthogonal
children so that we could use the children's block sizes (which are in the flex container
inline axis).

The very same solution was adopted long time ago by the RenderGrid code.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths const): prelayout orthogonal children.

8:23 AM Changeset in webkit [287262] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fixes dead code in compareIcons()
https://bugs.webkit.org/show_bug.cgi?id=234234

Patch by Karl Dubost <karl+github@la-grange.net> on 2021-12-20
Reviewed by Youenn Fablet.

  • html/LinkIconCollector.cpp:

(WebCore::compareIcons):

8:04 AM Changeset in webkit [287261] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Improve UserMediaPermissionRequestManagerProxy logging
https://bugs.webkit.org/show_bug.cgi?id=234508

Reviewed by Eric Carlson.

Make sure the log identifier is correct and log whether there are cameras and/or microphones exposed.
No observable change of behavior.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList):

8:01 AM Changeset in webkit [287260] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Adjust the atomic/generic inline level boxes with marginLeft in RTL
https://bugs.webkit.org/show_bug.cgi?id=234502

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

7:11 AM Changeset in webkit [287259] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] InlineDisplay::Line has physical geometry
https://bugs.webkit.org/show_bug.cgi?id=234490

Reviewed by Antti Koivisto.

Remove the term "logical" from function names and variables.

  • layout/formattingContexts/block/BlockFormattingGeometry.cpp:

(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentHeightAndMargin const):

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::usedContentHeight const):
(WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):

  • layout/formattingContexts/inline/display/InlineDisplayLine.h:

(WebCore::InlineDisplay::Line::lineBoxRect const):
(WebCore::InlineDisplay::Line::contentLeft const):
(WebCore::InlineDisplay::Line::contentWidth const):
(WebCore::InlineDisplay::Line::moveVertically):
(WebCore::InlineDisplay::Line::Line):
(WebCore::InlineDisplay::Line::lineBoxLogicalRect const): Deleted.
(WebCore::InlineDisplay::Line::contentLogicalLeft const): Deleted.
(WebCore::InlineDisplay::Line::contentLogicalWidth const): Deleted.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::lineOverflowWidth):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

4:38 AM Changeset in webkit [287258] by youenn@apple.com
  • 6 edits
    3 adds in trunk

Update RTCRtpScriptTransformer key frame API according latest spec proposal
https://bugs.webkit.org/show_bug.cgi?id=234429

Reviewed by Eric Carlson.

Source/WebCore:

Update implementation according https://github.com/w3c/webrtc-encoded-transform/pull/125.
This means adding a specific method to send a FIR, a specific method to generate a key frame on sender side.
This also means improving the error handling and the promise resolution timing.
RID support is not yet available until we can properly pipe that information down to encoders.

Test: http/wpt/webrtc/audiovideo-script-transform.html

  • Modules/mediastream/RTCRtpScriptTransformer.cpp:
  • Modules/mediastream/RTCRtpScriptTransformer.h:
  • Modules/mediastream/RTCRtpScriptTransformer.idl:

LayoutTests:

  • http/wpt/webrtc/audio-video-transform.js: Added.
  • http/wpt/webrtc/audiovideo-script-transform-expected.txt: Added.
  • http/wpt/webrtc/audiovideo-script-transform.html: Added.
  • http/wpt/webrtc/context-transform.js:
2:55 AM Changeset in webkit [287257] by ntim@apple.com
  • 2 edits in trunk/Tools

Fix Tools/Scripts/webkitpy/w3c/test_importer.py
https://bugs.webkit.org/show_bug.cgi?id=234480

Reviewed by Manuel Rego Casasnovas.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.find_importable_tests):

2:40 AM Changeset in webkit [287256] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.34.3

WebKitGTK 2.34.3

2:39 AM Changeset in webkit [287255] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.34.3 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.34.3.
1:20 AM Changeset in webkit [287254] by Lauro Moura
  • 2 edits in trunk/Tools

REGRESSION(r286936) [GLIB] WebsiteData configuration API test is failing with non-created localstorage dir
https://bugs.webkit.org/show_bug.cgi?id=234497

Reviewed by Adrian Perez de Castro.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:

(testWebsiteDataConfiguration): Ensure localStorage is created before
trying to query it.

Dec 19, 2021:

9:03 PM Changeset in webkit [287253] by beidson@apple.com
  • 20 edits
    6 copies in trunk/Source

Stub out NotificationEvent and related
https://bugs.webkit.org/show_bug.cgi?id=234420

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Disabled for now, no behavior change)

This patch adds stubs for NotificationEvent and the related classes/functions that use it.

Enabling just the stubs throws LayoutTests into a chaotic state that is not useful to manage with
test expectations files. So this also puts the related changes behind a disabled-by-default runtime switch.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/notifications/Notification.h:
  • Modules/notifications/Notification.idl:
  • Modules/notifications/NotificationDirection.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • Modules/notifications/NotificationEvent.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.

(WebCore::NotificationEvent::~NotificationEvent):

  • Modules/notifications/NotificationEvent.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • Modules/notifications/NotificationEvent.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • Modules/notifications/NotificationOptions.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • Modules/notifications/NotificationOptions.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/EventNames.h:
  • dom/EventNames.in:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setNotificationEventEnabled):
(WebCore::RuntimeEnabledFeatures::notificationEventEnabled const):

  • workers/service/ServiceWorkerGlobalScope.idl:
  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::showNotification):
(WebCore::ServiceWorkerRegistration::getNotifications):

  • workers/service/ServiceWorkerRegistration.h:
  • workers/service/ServiceWorkerRegistration.idl:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
  • wtf/PlatformEnable.h:
7:37 PM Changeset in webkit [287252] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Minor cleanup in aisle EventHandler::handleWheelEventInAppropriateEnclosingBox()
https://bugs.webkit.org/show_bug.cgi?id=234493

Reviewed by Wenson Hsieh.

Remove a confusing RenderListBox special case, which simply existed because the loop
below didn't know how to get a ScrollableArea for a RenderListBox.

Also rename didScrollInScrollableArea() to scrollViaNonPlatformEvent() because
the past tense in the name was inaccurate.

  • page/EventHandler.cpp:

(WebCore::scrollViaNonPlatformEvent):
(WebCore::EventHandler::handleWheelEventInAppropriateEnclosingBox):
(WebCore::didScrollInScrollableArea): Deleted.

7:22 PM Changeset in webkit [287251] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Remove EventHandler::scrollDistance()
https://bugs.webkit.org/show_bug.cgi?id=234494

Reviewed by Wenson Hsieh.

This function is unused.

  • page/EventHandler.cpp:

(WebCore::EventHandler::scrollDistance): Deleted.

  • page/EventHandler.h:
5:12 PM Changeset in webkit [287250] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Use character names instead of hex codes in FontCascade.h
https://bugs.webkit.org/show_bug.cgi?id=234451

Reviewed by Dean Jackson.

Saying something like "c == zeroWidthNonJoiner" is much more clear than "c == 0x200c".

No new tests because there is no behavior change.

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::treatAsSpace):
(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript):

4:03 PM Changeset in webkit [287249] by Jean-Yves Avenard
  • 3 edits in trunk/Source/WebCore

Don't pack audio samples with discontinuity together
https://bugs.webkit.org/show_bug.cgi?id=234458
rdar://86659914

Reviewed by Eric Carlson.

Some webm content may have a data gap between frames. Normally audio frames
are packed in 2s block. When we pack the samples with discontinuities, those
discontinuities would all be accumulated at the 2s boundary which makes them
much more audible.
The CMSampleBufferCreateReady API should allow us to pack samples with
discontinuities as we can give a vector of CMSampleTimingInfo with the
exact information for all packets.
However, this data appears to be ignored and the discontinuities is still
heard at the 2s boundary.
So we no longer pack samples with discontinuities so that the frame
timestamps will be more accurate and no audible artefacts are heard on
small gaps.

Manually tested and verified manually. This is getting around an issue
in CoreMedia that inserts very audible artifacts when there's a gap between
samples.

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::AudioTrackData::resetCompleted):
(WebCore::SourceBufferParserWebM::AudioTrackData::consumeFrameData):
(WebCore::SourceBufferParserWebM::AudioTrackData::createSampleBuffer):

  • platform/graphics/cocoa/SourceBufferParserWebM.h:
3:55 PM Changeset in webkit [287248] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add support for RTL text-indent
https://bugs.webkit.org/show_bug.cgi?id=234461

Reviewed by Antti Koivisto.

See https://drafts.csswg.org/css-text/#text-indent-property

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::build):

12:43 PM Changeset in webkit [287247] by Wenson Hsieh
  • 19 edits
    1 add in trunk/Source

Add client layer plumbing for classifying modal container controls
https://bugs.webkit.org/show_bug.cgi?id=234320

Reviewed by Dean Jackson.

Source/WebCore:

Add a chrome client method to asynchronously classify text inside modal container controls as one of { Neutral,
Positive, Negative or Other }. While currently unimplemented, the next patch will add support for a singleton
ModalContainerControlClassifier in WebKit2, and use it to implement this client hook.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::classifyModalContainerControls):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/ModalContainerControlType.h: Added.

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::classifyModalContainerControls):

Add a method stub with a comment for now. The next patch in the sequence will implement this method hook on
Cocoa platforms.

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

(WebKit::WebChromeClient::requestCookieConsent):

Drive-by fix: remove an unnecessary WebCore:: prefix.

(WebKit::WebChromeClient::classifyModalContainerControls):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

See WebCore/ChangeLog for more details.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::classifyModalContainerControls):

Source/WebKitLegacy/win:

See WebCore/ChangeLog for more details.

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::classifyModalContainerControls):

  • WebCoreSupport/WebChromeClient.h:
12:34 PM Changeset in webkit [287246] by ysuzuki@apple.com
  • 98 edits in trunk/Source/bmalloc

[libpas] Add macros to disable bmalloc core so that libpas can be enabled on 64-bit watchOS
https://bugs.webkit.org/show_bug.cgi?id=234481

Reviewed by David Kilzer.

This patch re-enables libpas for watchOS by disabling compilation of bmalloc core when libpas
is enabled.

Also we found that size of libbmalloc.a is misleading: it is just collection of object
files, thus it includes a lot of duplicate inline functions, which is deduped when linking
it to JavaScriptCore.framework. Thus, that size does not directly reflect the final size of
JavaScriptCore.framework.

Before and after this patch, we see 2.4MB size reduction in total.

  1. JavaScriptCore.framework increases by 363KB.

Before: 32452544 JavaScriptCore.framework/JavaScriptCore
After: 32825088 JavaScriptCore.framework/JavaScriptCore

Most part of libbmalloc.a archive file is just many duplicate inline functions, which is deduped
in JavaScriptCore.framework (archive file v.s. framework). After deduping and after removing bmalloc
core in this patch, it only increases 363KB. Removing bmalloc core code is contributing to 70KB reduction.

  1. WebCore.framework decreases by 2.75MB

Before: 72591584 WebCore.framework/WebCore
After: 69702240 WebCore.framework/WebCore

We can get 2.75MB size reduction if we enable libpas on WebCore. This is because how IsoHeap is
implemented in bmalloc v.s. libpas. In bmalloc, we use extensive amount of distinct template-based
IsoHeap code, which bloats code size. Plus, it uses very long function name strings to fix per-process
singleton linking issue happening for C++ template. Compared to that, libpas is just using very small
C structure and functions that can be much smaller than the bmalloc's IsoHeap's code which even duplicate
slow path code. As a result, switching to libpas offers 2.75MB size deduction.

  • bmalloc/Algorithm.h:
  • bmalloc/AllIsoHeaps.cpp:
  • bmalloc/AllIsoHeaps.h:
  • bmalloc/AllIsoHeapsInlines.h:
  • bmalloc/Allocator.cpp:
  • bmalloc/Allocator.h:
  • bmalloc/BInline.h:
  • bmalloc/BPlatform.h:
  • bmalloc/Bits.h:
  • bmalloc/BulkDecommit.h:
  • bmalloc/BumpAllocator.h:
  • bmalloc/BumpRange.h:
  • bmalloc/Cache.cpp:
  • bmalloc/Cache.h:
  • bmalloc/Chunk.h:
  • bmalloc/Deallocator.cpp:
  • bmalloc/Deallocator.h:
  • bmalloc/DeferredDecommit.h:
  • bmalloc/DeferredDecommitInlines.h:
  • bmalloc/DeferredTrigger.h:
  • bmalloc/DeferredTriggerInlines.h:
  • bmalloc/EligibilityResult.h:
  • bmalloc/EligibilityResultInlines.h:
  • bmalloc/Environment.h:
  • bmalloc/FixedVector.h:
  • bmalloc/FreeList.cpp:
  • bmalloc/FreeList.h:
  • bmalloc/FreeListInlines.h:
  • bmalloc/Heap.cpp:
  • bmalloc/Heap.h:
  • bmalloc/HeapConstants.cpp:
  • bmalloc/HeapConstants.h:
  • bmalloc/IsoAllocator.h:
  • bmalloc/IsoAllocatorInlines.h:
  • bmalloc/IsoConfig.h:
  • bmalloc/IsoDeallocator.h:
  • bmalloc/IsoDeallocatorInlines.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h:
  • bmalloc/IsoDirectoryPage.h:
  • bmalloc/IsoDirectoryPageInlines.h:
  • bmalloc/IsoHeapImpl.cpp:
  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:
  • bmalloc/IsoMallocFallback.h:
  • bmalloc/IsoPage.cpp:
  • bmalloc/IsoPage.h:
  • bmalloc/IsoPageInlines.h:
  • bmalloc/IsoPageTrigger.h:
  • bmalloc/IsoSharedConfig.h:
  • bmalloc/IsoSharedHeap.cpp:
  • bmalloc/IsoSharedHeap.h:
  • bmalloc/IsoSharedHeapInlines.h:
  • bmalloc/IsoSharedPage.cpp:
  • bmalloc/IsoSharedPage.h:
  • bmalloc/IsoSharedPageInlines.h:
  • bmalloc/IsoTLS.cpp:
  • bmalloc/IsoTLS.h:
  • bmalloc/IsoTLSAllocatorEntry.h:
  • bmalloc/IsoTLSAllocatorEntryInlines.h:
  • bmalloc/IsoTLSDeallocatorEntry.h:
  • bmalloc/IsoTLSDeallocatorEntryInlines.h:
  • bmalloc/IsoTLSEntry.cpp:
  • bmalloc/IsoTLSEntry.h:
  • bmalloc/IsoTLSEntryInlines.h:
  • bmalloc/IsoTLSInlines.h:
  • bmalloc/IsoTLSLayout.cpp:
  • bmalloc/IsoTLSLayout.h:
  • bmalloc/LargeMap.cpp:
  • bmalloc/LargeMap.h:
  • bmalloc/LargeRange.h:
  • bmalloc/LineMetadata.h:
  • bmalloc/List.h:
  • bmalloc/Map.h:
  • bmalloc/Object.h:
  • bmalloc/ObjectType.cpp:
  • bmalloc/ObjectType.h:
  • bmalloc/ObjectTypeTable.cpp:
  • bmalloc/ObjectTypeTable.h:
  • bmalloc/Packed.h:
  • bmalloc/PerHeapKind.h:
  • bmalloc/PerProcess.cpp:
  • bmalloc/PerProcess.h:
  • bmalloc/PerThread.h:
  • bmalloc/PhysicalPageMap.h:
  • bmalloc/Range.h:
  • bmalloc/Scavenger.cpp:
  • bmalloc/Scavenger.h:
  • bmalloc/Sizes.h:
  • bmalloc/SmallLine.h:
  • bmalloc/SmallPage.h:
  • bmalloc/StdLibExtras.h:
  • bmalloc/Syscall.h:
  • bmalloc/VMAllocate.h:
  • bmalloc/Vector.h:
  • bmalloc/Zone.cpp:
  • bmalloc/Zone.h:
12:24 PM Changeset in webkit [287245] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Add a basic heuristic for collecting and extracting text from controls in ModalContainerObserver
https://bugs.webkit.org/show_bug.cgi?id=234299

Reviewed by Dean Jackson.

Introduce a heuristic for extracting clickable controls from modal containers, that are unlikely to be links
(i.e. trigger navigation when clicked). See below for more details.

  • page/ModalContainerObserver.cpp:

(WebCore::ModalContainerObserver::ModalContainerObserver):
(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):

Once a modal container has been detected, schedule a short timer to traverse the modal container's subtree in
search for clickable controls. In a future patch, we may need to lengthen this delay or even introduce a
mechanism for restarting the timer periodically if no clickable controls are discovered in the modal container.

(WebCore::accessibilityRole):
(WebCore::isClickableControl):
(WebCore::removeParentOrChildElements):
(WebCore::removeElementsWithEmptyBounds):
(WebCore::textForControl):
(WebCore::ModalContainerObserver::scheduleClickableElementCollection):
(WebCore::ModalContainerObserver::collectClickableElementsTimerFired):
(WebCore::ModalContainerObserver::collectClickableElements):

This contains the main logic for collecting clickable elements inside modal containers. This heuristic consists
mostly of three phases:

  1. We initially scan the modal container subtree in search of any elements that seem like they could be

clickable buttons or links that don't trigger navigation, and build a list of classifiableControls.

  1. We then filter the list of classifiableControls by removing any elements in the list that either contain or

are contained by other elements (using a heuristic to decide whether to remove each parent or child); in this
filtering step, we additionally remove all elements that are effectively unclickable due to having an empty
client bounding rect.

  1. In the final phase, we iterate over all of the controls in the filtered list, and attempt to extract text for

each control (looking at attributes such as title and aria-label, alt text for images, and finally falling
back to outerText()). If this raw text description is not empty and also not too long (exceeding an
arbitrarily chosen threshold of 100 characters), we add it to the final list of controls and control text
descriptions to send to the client layer for classification.

(WebCore::ModalContainerObserver::shouldHide):

Augment this to return false in the case where we're inside the scope of m_collectingClickableElements. This
allows us to run heuristics over the modal container without an adjusted display: none; style on the container
element.

  • page/ModalContainerObserver.h:
11:44 AM Changeset in webkit [287244] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] text-indent is treated as a margin applied to the start edge of the line box.
https://bugs.webkit.org/show_bug.cgi?id=234460

Reviewed by Antti Koivisto.

See https://drafts.csswg.org/css-text/#text-indent-property
This is also in preparation for adjusting the display line geometry when the inline axis direction is rtl.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::initialConstraintsForLine const):

  • layout/formattingContexts/inline/InlineLineBuilder.h:
  • layout/formattingContexts/inline/InlineRect.h:

(WebCore::Layout::InlineRect::moveLeftBy):

10:52 AM Changeset in webkit [287243] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.34.3

WPE WebKit 2.34.3

10:52 AM Changeset in webkit [287242] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.3 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.34.3.
10:43 AM Changeset in webkit [287241] by Simon Fraser
  • 4 edits
    2 adds in trunk

Keyboard shortcut to scroll to top when already at the top of the page moves to the bottom
https://bugs.webkit.org/show_bug.cgi?id=234483
<rdar://86628260>

Reviewed by Dean Jackson.
Source/WebCore:

If the page was scrolled to the top and an "up" keyboard scroll happened,
ScrollAnimator::singleAxisScroll() would trigger an unclamped scroll with a negative delta,
which fed into ScrollAnimationSmooth::startAnimatedScrollToDestination() and would result in
an animation with a zero duration, which resulted in NaNs in animateScroll().

Fix by doing clamping in ScrollAnimator::singleAxisScroll() and protecting against
animations with zero delay in ScrollAnimationSmooth.

Test: fast/scrolling/keyboard-scrolling-home.html

  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::startAnimatedScrollToDestination):
(WebCore::ScrollAnimationSmooth::retargetActiveAnimation):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::singleAxisScroll):

LayoutTests:

  • fast/scrolling/keyboard-scrolling-home-expected.txt: Added.
  • fast/scrolling/keyboard-scrolling-home.html: Added.
4:58 AM Changeset in webkit [287240] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Fix pointer to blob data in BlobResourceHandle::readDataSync()
<https://webkit.org/b/234459>
<rdar://86026618>

Reviewed by Chris Dumez.

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::readDataSync):

2:03 AM Changeset in webkit [287239] by commit-queue@webkit.org
  • 10 edits in trunk

[GTK][WPE][VTT] tests media/track/track-webvtt-* fail on GTK and WPE
https://bugs.webkit.org/show_bug.cgi?id=234083

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-19
Reviewed by Eric Carlson.

Source/WebCore:

Remove ENABLE(AVF_CAPTIONS) from cross-platform call sites. This is needed only in the
AVFoundation player. The Adwaita media controls also now properly render
-webkit-media-text-track-display-backdrop as required for media/track tests and as done in
the Apple media controls.

  • Modules/mediacontrols/mediaControlsAdwaita.css:

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

  • html/HTMLMediaElement.cpp:
  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:
  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::outOfBandTrackSources):

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::notifyTrackModeChanged):

  • platform/graphics/PlatformTextTrack.h:

LayoutTests:

  • platform/glib/TestExpectations:
1:40 AM Changeset in webkit [287238] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Lazily allocate HistoricUsageData
https://bugs.webkit.org/show_bug.cgi?id=212878

Reviewed by Saam Barati.

This is only used when resource-overlay is enabled. We should allocate it lazily instead of putting this in DATA.
This also reduces binary size by 19KB.

  • page/cocoa/ResourceUsageOverlayCocoa.mm:

(WebCore::historicUsageData):

12:43 AM Changeset in webkit [287237] by jonlee@apple.com
  • 13 edits in trunk/LayoutTests

Garden tests that are passing iOS but marked failure.
https://bugs.webkit.org/show_bug.cgi?id=234464

Reviewed by Simon Fraser.

An attempt to garden the tests that are marked failing but are now passing.
These were cross-checked against bot history.

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wk2/TestExpectations:
12:33 AM Changeset in webkit [287236] by Ross Kirsling
  • 8 edits
    2 adds in trunk

[JSC] OpPow should have a "small int exponent" fast path at lower tiers
https://bugs.webkit.org/show_bug.cgi?id=234408

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/pow-double-int.js: Added.
  • microbenchmarks/pow-int-int.js: Added.

Source/JavaScriptCore:

DFG has an ArithPow fast path which just multiplies in a loop when the exponent is an int between 0 and 1000;
this can be done at lower tiers too.

Implementing this at LLInt gives the following speedup with JIT disabled:

Before After

pow-int-int 193.7180+-0.4897 100.3569+-1.9804 definitely 1.9303x faster
pow-double-int 194.0744+-0.7998 100.0346+-0.8655 definitely 1.9401x faster

<geometric> 193.8824+-0.4667 100.0964+-0.9922 definitely 1.9370x faster

Implementing this at Baseline gives similar results with DFG disabled:

Before After

pow-int-int 195.6251+-0.9577 99.9627+-0.3307 definitely 1.9570x faster
pow-double-int 196.1975+-0.9307 101.0056+-0.3124 definitely 1.9424x faster

<geometric> 195.8786+-0.5883 100.4767+-0.2333 definitely 1.9495x faster

Results are neutral otherwise.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_pow):
(JSC::JIT::emitSlow_op_pow):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
Note: See TracTimeline for information about the timeline view.