Timeline



May 30, 2021:

11:39 PM Changeset in webkit [278271] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

REGRESSION (r258118): SVG paths that contain a single move command incorrect client bounding rects
https://bugs.webkit.org/show_bug.cgi?id=226447
rdar://72112744

Reviewed by Alan Bujtas.

Source/WebCore:

r258118 introduced a fast path for computing the bounding rect of a WebCore::Path without having to
materialize a platform path object (e.g. CGPathRef on platforms that use CoreGraphics). To do this, we
introduce InlinePathData -- a variant capable of representing several types of simple Path objects without
allocating a platform path.

However, in the case where a Path only consists of a single moveTo command, this fast path for computing the
bounding rect currently returns the zero rect (an empty rect at the origin), rather than an empty rect at the
location we've moved to. This causes the offset of the bounding rect of an SVG path element that contains only a
single M drawing command to be incorrect.

Simply fix this by returning an empty rect that is offset by the moveTo location, rather than the origin.

Test: fast/svg/bounding-rect-for-path-with-only-move-command.html

  • platform/graphics/Path.cpp:

(WebCore::Path::boundingRectFromInlineData const):

LayoutTests:

Add a layout test to exercise the bug.

  • fast/svg/bounding-rect-for-path-with-only-move-command-expected.txt: Added.
  • fast/svg/bounding-rect-for-path-with-only-move-command.html: Added.
11:20 PM Changeset in webkit [278270] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Add logging to allow relating a HTMLMediaElement to a MediaStream
https://bugs.webkit.org/show_bug.cgi?id=226373

Reviewed by Eric Carlson.

Update logging to print the ID of the MediaStream being played by the HTMLMediaElement.

  • Modules/mediastream/MediaStream.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource):

9:22 PM Changeset in webkit [278269] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Use SortedArrayMap in parseColorContrastFunctionParameters
https://bugs.webkit.org/show_bug.cgi?id=226444

Reviewed by Darin Adler.

Use SortedArrayMap to remove some boilerplate and allow for a future where
this list gets big and the map can switch to a binary search automatically.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):

8:44 PM Changeset in webkit [278268] by weinig@apple.com
  • 8 edits in trunk

Remove support for no longer specific color(lab ...) syntax
https://bugs.webkit.org/show_bug.cgi?id=226439

Reviewed by Darin Adler.

Source/WebCore:

Remove support for parsing the color(lab ...) syntax.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters): Deleted.

LayoutTests:

Remove test cases for color(lab) (keeping one to ensure it doesn't
work) and update uses of color(lab ...) to use lab(...) instead.

  • fast/css/parsing-lab-colors-expected.txt:
  • fast/css/parsing-lab-colors.html:
  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
  • TestExpectations:
8:09 PM Changeset in webkit [278267] by Cameron McCormack
  • 5 edits in trunk/Source/WebCore

Fix some comment typos
https://bugs.webkit.org/show_bug.cgi?id=226443

Reviewed by Sam Weinig.

Trivial fixes for comment typos I noticed over the past couple of
months.

  • page/scrolling/ScrollingStateTree.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::drawPlatformImage):
(WebCore::GraphicsContext::drawPlatformPattern):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::hitTestList):

  • rendering/RenderLayer.h:
8:02 PM Changeset in webkit [278266] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Drop PendingActivity from ScriptProcessorNode
https://bugs.webkit.org/show_bug.cgi?id=226442

Reviewed by Darin Adler.

ScriptProcessorNode already has a virtualHasPendingActivity() implementation that keeps
the JS wrapper alive as long has the audio context is running and there is an "audioprocess"
event listener registered on the node. Therefore, there is no need for an additional
PendingActivity data member.

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::markNodeForDeletionIfNecessary):

  • Modules/webaudio/AudioNode.h:

(WebCore::AudioNode::didBecomeMarkedForDeletion): Deleted.

  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::didBecomeMarkedForDeletion): Deleted.

  • Modules/webaudio/ScriptProcessorNode.h:
7:57 PM Changeset in webkit [278265] by Darin Adler
  • 9 edits
    3 deletes in trunk/Source/WebKitLegacy

Remove some of the unneeded WebKitLegacy Windows-specific plug-in code
https://bugs.webkit.org/show_bug.cgi?id=226410

Reviewed by Chris Dumez.

Source/WebKitLegacy:

  • PlatformFTW.cmake: Removed all the code in the win/Plugins directory,

and EmbeddedWidget.h/cpp.

  • PlatformWin.cmake: Ditto.

Source/WebKitLegacy/win:

  • Plugins/PaintHooks.asm: Removed.
  • Plugins/PlatformModule.h: Removed.
  • Plugins/PluginDatabase.cpp: Removed.
  • Plugins/PluginDatabase.h: Removed.
  • Plugins/PluginDatabaseWin.cpp: Removed.
  • Plugins/PluginDebug.cpp: Removed.
  • Plugins/PluginDebug.h: Removed.
  • Plugins/PluginMainThreadScheduler.cpp: Removed.
  • Plugins/PluginMainThreadScheduler.h: Removed.
  • Plugins/PluginMessageThrottlerWin.cpp: Removed.
  • Plugins/PluginMessageThrottlerWin.h: Removed.
  • Plugins/PluginPackage.cpp: Removed.
  • Plugins/PluginPackage.h: Removed.
  • Plugins/PluginPackageWin.cpp: Removed.
  • Plugins/PluginQuirkSet.h: Removed.
  • Plugins/PluginStream.cpp: Removed.
  • Plugins/PluginStream.h: Removed.
  • Plugins/PluginView.cpp: Removed.
  • Plugins/PluginView.h: Removed.
  • Plugins/PluginViewWin.cpp: Removed.
  • Plugins/npapi.cpp: Removed.
  • WebCoreSupport/EmbeddedWidget.cpp: Removed.
  • WebCoreSupport/EmbeddedWidget.h: Removed.
  • WebCoreSupport/WebFrameLoaderClient.cpp: Removed includes of

PluginDatabase.h, PluginPackage.h, PluginView.h.
(WebFrameLoaderClient::WebFrameLoaderClient): Removed m_manualLoader and
m_hasSetnResponseToPlugin.
(WebFrameLoaderClient::setMainDocumentError): Removed all the code here,
which was only used for m_manualLoader.
(WebFrameLoaderClient::committedLoad): Removed code that runs only if
m_manualLoader is non-null.
(WebFrameLoaderClient::finishedLoading): Removed all the code here, which
was only used for m_manualLoader.
(WebFrameLoaderClient::objectContentType): Removed call to plug-in database
to figure out MIME type and select a plug-in to load.
(WebFrameLoaderClient::dispatchDidFailToStartPlugin const): Deleted.
(WebFrameLoaderClient::createPlugin): Return nullptr. No longer support
Netscape-style plug-ins, nor call the embeddedViewWithArguments function.
(WebFrameLoaderClient::redirectDataToPlugin): Removed all the code here.

  • WebCoreSupport/WebFrameLoaderClient.h: Removed dispatchDidFailToStartPlugin,

m_manualLoader, and m_hasSentResponseToPlugin.

  • WebCoreSupport/WebPluginInfoProvider.cpp: Removed include of PluginDatabase.h.

(WebPluginInfoProvider::refreshPlugins): Removed all the code here.
(WebPluginInfoProvider::pluginInfo): Ditto.
(WebPluginInfoProvider::webVisiblePluginInfo): Ditto.

  • WebFrame.cpp: Removed includes of PluginDatabase.h and PluginView.h.
  • WebView.cpp: Ditto.

(WebView::WebViewWndProc): Removed workaround specifically for the
Windows Media Player plug-in.
(WebView::addAdditionalPluginDirectory): Removed all the code here.

7:02 PM Changeset in webkit [278264] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Remove some dead code from BaseAudioContext / AudioContext
https://bugs.webkit.org/show_bug.cgi?id=226441

Reviewed by Sam Weinig.

  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::connect):

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
(WebCore::AudioScheduledSourceNode::finish):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::sourceNodeWillBeginPlayback):
(WebCore::BaseAudioContext::refSourceNode): Deleted.
(WebCore::BaseAudioContext::derefSourceNode): Deleted.
(WebCore::BaseAudioContext::incrementActiveSourceCount): Deleted.
(WebCore::BaseAudioContext::decrementActiveSourceCount): Deleted.

  • Modules/webaudio/BaseAudioContext.h:

(WebCore::BaseAudioContext::sampleRate const):
(WebCore::BaseAudioContext::activeSourceCount const): Deleted.
(WebCore::BaseAudioContext::incrementConnectionCount): Deleted.
(WebCore::BaseAudioContext::connectionCount const): Deleted.

5:57 PM Changeset in webkit [278263] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, tweak slightly incorrect assertion added in r278233.

The assertion was hitting flakily on the bots.

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::addTailProcessingNode):

5:52 PM Changeset in webkit [278262] by weinig@apple.com
  • 6 edits in trunk

Add additional target luminance keywords for color-contrast() added for https://github.com/w3c/csswg-drafts/issues/6311
https://bugs.webkit.org/show_bug.cgi?id=226438

Reviewed by Chris Dumez.

Source/WebCore:

Add newly spec'd target luminance keywords.

  • css/CSSValueKeywords.in:

Add AAA and AAA-large keywords.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):
Add target luminance mappings for "AAA" -> 7 and "AAA-large" -> 4.5

LayoutTests:

Update test and results for new AAA and AAA-large target luminance keywords.

  • fast/css/parsing-color-contrast-expected.txt:
  • fast/css/parsing-color-contrast.html:
5:29 PM Changeset in webkit [278261] by weinig@apple.com
  • 12 edits
    2 copies in trunk

Support calc() on components inside relative color syntax colors
https://bugs.webkit.org/show_bug.cgi?id=226272

Reviewed by Darin Adler.

Source/WebCore:

Added new and updated test cases to fast/css/parsing-relative-color-syntax.html.

Updates support for the CSS Color 5 "Relative Color Syntax" to support
both calc() on components and component permutations within the syntax.

This allows for things like:

background: lch(from var(--primary-color) 60% calc(c * 0.8) h);

or

background: lch(from rebeccapurple g b r);

To make this work, the calc() infrastructure now supports passing a CSSCalcSymbolTable
which allows the logic in the parser to lookup unknown identifiers when parsing a value.
The relative color syntax parsers can then build an appropriate CSSCalcSymbolTable filled
with the components of the origin color.

Since these calc() values are not serialized, this can all happen in the parser, but if
we to be able serialize them in the future, CSSCalcPrimitiveValueNode could be updated
to store the symbol name in addition to storing the value and type (or we could we could
add a new node for it).

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/calc/CSSCalcSymbolTable.cpp: Added.
  • css/calc/CSSCalcSymbolTable.h: Added.

Add CSSCalcSymbolTable which contains a mapping from CSSValueID to CSSUnitType/double pairs.

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseValue):
When trying to construct a value node, if the token is a identifier, use the new
symbol table to look up a type/value to use instead. Use a switch to make things
a bit more clear that differentiation is being done based on token type.

  • css/calc/CSSCalcExpressionNodeParser.h:

Add reference to a CSSCalcSymbolTable to the parser. The parser should only ever be used
on the stack, so this works well and allows us to avoid copying the table.

  • css/calc/CSSCalcValue.cpp:

(WebCore::CSSCalcValue::create):

  • css/calc/CSSCalcValue.h:

Pass the CSSCalcSymbolTable to the parser if one is provided. An overload was used
to avoid #including CSSCalcSymbolTable.h in the header just to add a default value.

  • css/makevalues.pl:

Give a concrete base of uint16_t to allow it to be forward declared and add DefaultHash
and HashTraits to allow it to be used with HashTable. These match the definition of
CSSPropertyID.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumePercentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngleRaw):
(WebCore::CSSPropertyParserHelpers::consumeAngleWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlphaOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeHueOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrIdent):
(WebCore::CSSPropertyParserHelpers::consumePercentOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrPercentOrIdentNormalizedForRelativeRGB):
(WebCore::CSSPropertyParserHelpers::parseRelativeRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::extractChannelValue): Deleted.
(WebCore::CSSPropertyParserHelpers::resolveRelativeColorChannel): Deleted.
Rework relative color syntax parsing to allow permutation of channel symbols
and use of the calc() symbol table support to allow passing in the channels.
This makes the relatative color syntax variants much closer to the normal
variants (with the exception of passing the symbol table) and a subsequent
change will attempt to merge them further.

LayoutTests:

Updated test and results for update support including calc()
and compoment permutation.

  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
3:46 PM Changeset in webkit [278260] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

[WebXR] Provide a way to bind and unbind IOSurfaces to ANGLE Pbuffers
https://bugs.webkit.org/show_bug.cgi?id=226423
<rdar://problem/78652783>

Reviewed by Sam Weinig.

WebXR on Cocoa platforms gets framebuffer texture targets via
IOSurfaces. Those must be attached to ANGLE Pbuffers, which are
then bound to GL textures. There is already some code in
GraphicsContextGL (and in the CoreVideo classes) to do this, but
this is an attempt to make a generic function that will handle all
cases.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::createPbufferAndAttachIOSurface):
(WebCore::GraphicsContextGLOpenGL::destroyPbufferAndDetachIOSurface):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
3:26 PM Changeset in webkit [278259] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

[WebXR] No need for opaqueTexture when USE(IOSURFACE_FOR_XR_LAYER_DATA)
https://bugs.webkit.org/show_bug.cgi?id=226405
<rdar://problem/78636950>

Reviewed by Tim Horton.

When USE(IOSURFACE_FOR_XR_LAYER_DATA) is true, we'll get our
textures via a different method - we'll create them based on an
IOSurface we receive. This means that when we're in a
USE(IOSURFACE_FOR_XR_LAYER_DATA) configuration, we don't need the
opaqueTexture property on FrameData.

  • platform/xr/PlatformXR.h: Put opaqueTexture in the #else clause.

(PlatformXR::Device::FrameData::LayerData::encode const):
(PlatformXR::Device::FrameData::LayerData::decode):

  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::frameTimerFired):

  • Modules/webxr/WebXROpaqueFramebuffer.cpp: Guard use of opaqueTexture.
2:36 PM Changeset in webkit [278258] by dino@apple.com
  • 5 edits in trunk/Source/WebKit

[WebXR] Send recommendedResolution using DeviceProxy
https://bugs.webkit.org/show_bug.cgi?id=226402
<rdar://problem/78635475>

Reviewed by Tim Horton.

Add a recommendedResolution field to DeviceInfo and send
it across processes using the XRDeviceProxy.

  • Shared/Cocoa/XRDeviceInfo.h:
  • Shared/Cocoa/XRDeviceInfo.mm:

(WebKit::XRDeviceInfo::encode const):
(WebKit::XRDeviceInfo::decode):

  • Shared/Cocoa/XRDeviceProxy.h:
  • Shared/Cocoa/XRDeviceProxy.mm:

(WebKit::XRDeviceProxy::XRDeviceProxy):

1:35 PM Changeset in webkit [278257] by Chris Dumez
  • 8 edits in trunk/Source

Drop UncheckedCondition / UncheckedLock
https://bugs.webkit.org/show_bug.cgi?id=226432

Reviewed by Darin Adler.

Source/JavaScriptCore:

Drop one remaining use of UncheckedLock in favor of Lock.

  • jit/JITSafepoint.cpp:
  • jit/JITWorklistThread.h:

Source/WTF:

Drop UncheckedCondition / UncheckedLock now that the whole codebase has been ported to
Condition / Lock, which support Clang thread safety analysis.

  • wtf/Condition.h:
  • wtf/Forward.h:
  • wtf/Lock.cpp:

(WTF::Lock::lockSlow):
(WTF::Lock::unlockSlow):
(WTF::Lock::unlockFairlySlow):
(WTF::Lock::safepointSlow):

  • wtf/Lock.h:

(WTF::assertIsHeld):
(WTF::WTF_ASSERTS_ACQUIRED_LOCK):

12:45 PM Changeset in webkit [278256] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] invalidateFramebuffer is not the same as clearing contents
https://bugs.webkit.org/show_bug.cgi?id=226422
<rdar://problem/78652351>

Reviewed by Sam Weinig.

The WebXR specification says that buffer contents must be cleared
before each frame. The code currently does glInvalidateFramebuffer
to wipe the attachments, which isn't the same thing (and produces
an error since it tries to invalidate attachments that don't exist).

Remove the call to invalidateFramebuffer for the moment since it
causes a glError. Add a FIXME to replace it with explicit calls
to glClear. I expect most content does this already, so it is unlikely
anything will break.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame): Remove the call to
invalidateFramebuffer.

12:41 PM Changeset in webkit [278255] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

[WebXR] Recommended framebuffer width incorrectly scaled
https://bugs.webkit.org/show_bug.cgi?id=226408
<rdar://problem/78638309>

Reviewed by Tim Horton.

When WebXRWebGLLayer creates the WebXROpaqueFramebuffer, it asks
the session for the recommended framebuffer size. It then
multiplies the width by 2 - I assume because there are two eyes.
However, the specification [1] says that it is a "best estimate of
the WebGL framebuffer resolution large enough to contain all of the
session’s XRViews". So it should be the session that makes account
for the multiple views, not the framebuffer.

Since this would almost certainly break existing content using the OpenXR
backend, I edited the implementation to include the 2x width scale.

  • Modules/webxr/WebXRWebGLLayer.cpp:

(WebCore::createOpaqueFramebuffer): Remove the "* 2".

  • platform/xr/openxr/PlatformXROpenXR.cpp: Add a "* 2" to not break content.
12:18 PM Changeset in webkit [278254] by Wenson Hsieh
  • 7 edits
    2 adds in trunk

[iOS] UI process crashes when deallocating WKWebView in a script message handler during an active touch event
https://bugs.webkit.org/show_bug.cgi?id=226426
rdar://75425319

Reviewed by Darin Adler.

Source/WebKit:

It's possible for the UI process to crash upon being notified that asynchronous, active touch events have been
handled in the web process via the async IPC replay block in WebPageProxy::handlePreventableTouchEvent(). This
happens if the client posts a message from the web process to UI process while handling an active touch event
and deallocates the WKWebView currently handling the touch event in the script message handler.

This is because the async replay block inside WebPageProxy::handlePreventableTouchEvent() strongly captures a
reference to the WebPageProxy, thus keeping it alive; however, the WebPageProxy's weak pointer to the page
client is nulled out, which causes WebPageProxy::pageClient() to crash with a null dereference.

To fix this, we weakly capture WebPageProxy instead and return early if it has already been destroyed by the
time we process the completion handler, and also add a null check for m_pageClient before attempting to call
into it. Note that it's unnecessary to call into doneDeferringTouch(Start|End) to unblock any deferred
gestures here, because the process of destroying the content view will call -cleanUpInteraction and remove all
deferring gestures from the view, regardless of whether they're still in Possible state.

Test: TouchEventTests.DestroyWebViewWhileHandlingTouchEnd

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handlePreventableTouchEvent):

Tools:

Add a new API test that exercises the crash.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/TouchEventTests.mm: Added.

(-[TouchEventScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(-[WKWebView touchEventGestureRecognizer]):
(TestWebKitAPI::updateSimulatedTouchEvent):
(TestWebKitAPI::simulatedTouchEvent):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/active-touch-events.html: Added.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView textInputContentView]):
(-[TestWKWebView textInputContentView]): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:
9:11 AM Changeset in webkit [278253] by Darin Adler
  • 2951 edits in trunk

Remove WTF::Optional synonym for std::optional, using that class template directly instead
https://bugs.webkit.org/show_bug.cgi?id=226433

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload): Use auto instead
of Optional<>. Also use * instead of value() and nest the definition of the local inside an if
statement in the case where it's an optional.

  • inspector/scripts/tests/expected/*: Regenerated these results.

Source/WebCore:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebCore/PAL:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebDriver:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebKit:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
  • Scripts/webkit/tests: Regenerated expected results, by running the command "python

Scripts/webkit/messages_unittest.py -r". (How am I supposed to know to do that?)

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h: Let the do-webcore-rename script rename

Optional<> to std::optional<>.

Source/WebKitLegacy/mac:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebKitLegacy/win:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WTF:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
  • wtf/Optional.h: Remove WTF::Optional.

Tools:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
4:43 AM Changeset in webkit [278252] by Jean-Yves Avenard
  • 2 edits in trunk/Tools

REGRESSION (r274460): [macOS] TestWebKitAPI.Fullscreen.WKViewDelegate is timing out
https://bugs.webkit.org/show_bug.cgi?id=223282
rdar://75495585

Reviewed by Darin Adler.

Remove WKViewDelegate test. This test specifically tests the old, C-API
delegate callback that’s not exposed as API and no one uses. This feature
is explicitly deprecated and no-one uses it.

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: Delete test
3:17 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)

May 29, 2021:

11:51 PM Changeset in webkit [278251] by Chris Dumez
  • 8 edits in trunk/Source

Stop using UncheckedLock in JSC::VMInspector
https://bugs.webkit.org/show_bug.cgi?id=226427

Reviewed by Mark Lam.

Source/JavaScriptCore:

Stop using UncheckedLock in JSC::VMInspector, as it is being phased out in favor
of Lock, which supports Clang thread safety analysis.

  • tools/HeapVerifier.cpp:

(JSC::HeapVerifier::checkIfRecorded):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::analyze):

  • tools/VMInspector.cpp:

(JSC::VMInspector::isValidExecutableMemory):
(JSC::VMInspector::codeBlockForMachinePC):
(JSC::VMInspector::lock): Deleted.

  • tools/VMInspector.h:

(JSC::VMInspector::WTF_RETURNS_LOCK):
(JSC::VMInspector::WTF_REQUIRES_LOCK):
(JSC::VMInspector::getLock): Deleted.
(JSC::VMInspector::iterate): Deleted.

Source/WTF:

Add Lock::tryLockWithTimeout(), similar to tryLock() but gives up after a
specified timeout. This used to be implemented in VMInspector but I think
Lock is a better place for it.

  • wtf/Lock.cpp:

(WTF::Lock::tryLockWithTimeout):

  • wtf/Lock.h:
11:13 PM Changeset in webkit [278250] by Ryan Haddad
  • 2 edits in trunk/Tools

[webkitpy] Add a delay between successive iOS simulator boots
https://bugs.webkit.org/show_bug.cgi?id=226376

Reviewed by Darin Adler.

In certain configurations, rapidly attempting to boot multiple
iOS simulators can cause them to fail to boot. Add a 10 second
delay to ensure that each one has a chance to initialize before
moving to the next one.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._boot_device):

10:35 PM Changeset in webkit [278249] by Chris Dumez
  • 6 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::ConcurrentJSLock
https://bugs.webkit.org/show_bug.cgi?id=226428

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::ConcurrentJSLock as it is being phased out in
favor of Lock, which supports Clang thread safety analysis.

  • runtime/ConcurrentJSLock.h:

(JSC::ConcurrentJSLockerBase::ConcurrentJSLockerBase):

  • runtime/Structure.cpp:

(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::materializePropertyTable):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::forEachPropertyConcurrently):

  • yarr/YarrInterpreter.cpp:
10:22 PM Changeset in webkit [278248] by Chris Dumez
  • 11 edits in trunk

Adopt clang thread safety annotations in WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=226431

Reviewed by Darin Adler.

Source/WebCore:

Update code base due to DataMutex API changes.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::performTaskAtMediaTime):
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcConstructed):
(webKitWebSrcGetProperty):
(webKitWebSrcSetContext):
(webKitWebSrcCreate):
(webKitWebSrcMakeRequest):
(webKitWebSrcStop):
(webKitWebSrcGetSize):
(webKitWebSrcIsSeekable):
(webKitWebSrcDoSeek):
(webKitWebSrcQuery):
(webKitWebSrcUnLock):
(webKitWebSrcUnLockStop):
(webKitWebSrcSetMediaPlayer):
(webKitSrcPassedCORSAccessCheck):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::loadFinished):
(webKitSrcWouldTaintOrigin):

  • platform/graphics/gstreamer/mse/MediaSourceTrackGStreamer.cpp:

(WebCore::MediaSourceTrackGStreamer::isReadyForMoreSamples):
(WebCore::MediaSourceTrackGStreamer::notifyWhenReadyForMoreSamples):
(WebCore::MediaSourceTrackGStreamer::enqueueObject):
(WebCore::MediaSourceTrackGStreamer::clearQueue):

  • platform/graphics/gstreamer/mse/MediaSourceTrackGStreamer.h:
  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcActivateMode):
(webKitMediaSrcPadLinked):
(webKitMediaSrcLoop):
(webKitMediaSrcStreamFlush):

Source/WTF:

Adopt clang thread safety annotations in WTF::DataMutex. This allows us to
stop using UncheckedCondition in a few places.

  • wtf/DataMutex.h:

(WTF::DataMutex::DataMutex):

Tools:

Update API test due to DataMutex API changes.

  • TestWebKitAPI/Tests/WTF/DataMutex.cpp:

(TestWebKitAPI::TEST):

9:39 PM Changeset in webkit [278247] by weinig@apple.com
  • 2 edits in trunk/Source/ThirdParty

Remove selective compilation of libwebrtc as TestWebKitAPI depends on it for boringssl, so it is always needed
https://bugs.webkit.org/show_bug.cgi?id=226430

Reviewed by Tim Horton.

r244568 made TestWebKitAPI require linking the built boringssl from
the libwebrtc, so it really can't be selectively compiled. Over time,
we have re-enabled essentially all the platforms, when the intent of
disabling it at all originally was to avoid double building it for
Mac Catalyst, which we retain.

  • Makefile:
5:51 PM Changeset in webkit [278246] by weinig@apple.com
  • 14 edits
    38 adds
    4 deletes in trunk

Split calc() related files into 1-class per file structure
https://bugs.webkit.org/show_bug.cgi?id=226421

Reviewed by Chris Dumez.

Source/WebCore:

It's bothered me for a while that the calc related classes (both in css/
and in platform/) were bundled all in two big files. This change splits
them all out into their own header and implementation files that match
their name, and puts them in new calc/ subdirectories (css/calc/... and
platform/calc/...). This should hopefully make the modifications I need
to make to calc() to support relative color syntax a little easier.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSCalculationValue.cpp: Removed.
  • css/CSSCalculationValue.h: Removed.
  • css/CSSGradientValue.cpp:
  • css/CSSPrimitiveValue.cpp:
  • css/CSSPrimitiveValueMappings.h:
  • css/CSSValue.cpp:
  • css/calc: Added.
  • css/calc/CSSCalcCategoryMapping.cpp: Added.

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::canonicalUnitTypeForCalculationCategory):
(WebCore::hasDoubleValue):

  • css/calc/CSSCalcCategoryMapping.h: Added.
  • css/calc/CSSCalcExpressionNode.cpp: Added.

(WebCore::operator<<):
(WebCore::prettyPrintNode):
(WebCore::prettyPrintNodes):

  • css/calc/CSSCalcExpressionNode.h: Added.

(WebCore::CSSCalcExpressionNode::equals const):
(WebCore::CSSCalcExpressionNode::category const):
(WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):

  • css/calc/CSSCalcExpressionNodeParser.cpp: Added.

(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::CSSCalcExpressionNodeParser::operatorValue):
(WebCore::checkDepthAndIndex):
(WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseCalcValue):
(WebCore::CSSCalcExpressionNodeParser::parseCalcProduct):
(WebCore::CSSCalcExpressionNodeParser::parseCalcSum):

  • css/calc/CSSCalcExpressionNodeParser.h: Added.

(WebCore::CSSCalcExpressionNodeParser::CSSCalcExpressionNodeParser):

  • css/calc/CSSCalcInvertNode.cpp: Added.

(WebCore::CSSCalcInvertNode::createCalcExpression const):
(WebCore::CSSCalcInvertNode::doubleValue const):
(WebCore::CSSCalcInvertNode::computeLengthPx const):
(WebCore::CSSCalcInvertNode::dump const):

  • css/calc/CSSCalcInvertNode.h: Added.
  • css/calc/CSSCalcNegateNode.cpp: Added.

(WebCore::CSSCalcNegateNode::createCalcExpression const):
(WebCore::CSSCalcNegateNode::dump const):

  • css/calc/CSSCalcNegateNode.h: Added.
  • css/calc/CSSCalcOperationNode.cpp: Added.

(WebCore::determineCategory):
(WebCore::categoryForInvert):
(WebCore::resolvedTypeForMinOrMaxOrClamp):
(WebCore::isSamePair):
(WebCore::sortingCategoryForType):
(WebCore::sortingCategory):
(WebCore::primitiveTypeForCombination):
(WebCore::conversionToAddValuesWithTypes):
(WebCore::functionFromOperator):
(WebCore::CSSCalcOperationNode::create):
(WebCore::CSSCalcOperationNode::createSum):
(WebCore::CSSCalcOperationNode::createProduct):
(WebCore::CSSCalcOperationNode::createMinOrMaxOrClamp):
(WebCore::CSSCalcOperationNode::hoistChildrenWithOperator):
(WebCore::CSSCalcOperationNode::canCombineAllChildren const):
(WebCore::CSSCalcOperationNode::combineChildren):
(WebCore::CSSCalcOperationNode::simplify):
(WebCore::CSSCalcOperationNode::simplifyRecursive):
(WebCore::CSSCalcOperationNode::simplifyNode):
(WebCore::CSSCalcOperationNode::primitiveType const):
(WebCore::CSSCalcOperationNode::createCalcExpression const):
(WebCore::CSSCalcOperationNode::doubleValue const):
(WebCore::CSSCalcOperationNode::computeLengthPx const):
(WebCore::CSSCalcOperationNode::collectDirectComputationalDependencies const):
(WebCore::CSSCalcOperationNode::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcOperationNode::buildCSSText):
(WebCore::functionPrefixForOperator):
(WebCore::CSSCalcOperationNode::buildCSSTextRecursive):
(WebCore::CSSCalcOperationNode::dump const):
(WebCore::CSSCalcOperationNode::equals const):
(WebCore::CSSCalcOperationNode::evaluateOperator):

  • css/calc/CSSCalcOperationNode.h: Added.
  • css/calc/CSSCalcPrimitiveValueNode.cpp: Added.

(WebCore::CSSCalcPrimitiveValueNode::create):
(WebCore::CSSCalcPrimitiveValueNode::customCSSText const):
(WebCore::CSSCalcPrimitiveValueNode::primitiveType const):
(WebCore::CSSCalcPrimitiveValueNode::CSSCalcPrimitiveValueNode):
(WebCore::CSSCalcPrimitiveValueNode::isNumericValue const):
(WebCore::CSSCalcPrimitiveValueNode::isNegative const):
(WebCore::CSSCalcPrimitiveValueNode::negate):
(WebCore::CSSCalcPrimitiveValueNode::invert):
(WebCore::CSSCalcPrimitiveValueNode::add):
(WebCore::CSSCalcPrimitiveValueNode::multiply):
(WebCore::CSSCalcPrimitiveValueNode::convertToUnitType):
(WebCore::CSSCalcPrimitiveValueNode::canonicalizeUnit):
(WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const):
(WebCore::CSSCalcPrimitiveValueNode::doubleValue const):
(WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const):
(WebCore::CSSCalcPrimitiveValueNode::collectDirectComputationalDependencies const):
(WebCore::CSSCalcPrimitiveValueNode::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcPrimitiveValueNode::isZero const):
(WebCore::CSSCalcPrimitiveValueNode::equals const):
(WebCore::CSSCalcPrimitiveValueNode::dump const):

  • css/calc/CSSCalcPrimitiveValueNode.h: Added.
  • css/calc/CSSCalcValue.cpp: Added.

(WebCore::createBlendHalf):
(WebCore::createCSS):
(WebCore::CSSCalcValue::CSSCalcValue):
(WebCore::CSSCalcValue::category const):
(WebCore::CSSCalcValue::primitiveType const):
(WebCore::CSSCalcValue::createCalculationValue const):
(WebCore::CSSCalcValue::setPermittedValueRange):
(WebCore::CSSCalcValue::collectDirectComputationalDependencies const):
(WebCore::CSSCalcValue::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcValue::customCSSText const):
(WebCore::CSSCalcValue::equals const):
(WebCore::CSSCalcValue::clampToPermittedRange const):
(WebCore::CSSCalcValue::doubleValue const):
(WebCore::CSSCalcValue::computeLengthPx const):
(WebCore::CSSCalcValue::isCalcFunction):
(WebCore::CSSCalcValue::dump const):
(WebCore::CSSCalcValue::create):
(WebCore::operator<<):

  • css/calc/CSSCalcValue.h: Added.
  • css/parser/CSSPropertyParserHelpers.cpp:
  • platform/CalculationValue.cpp: Removed.
  • platform/CalculationValue.h: Removed.
  • platform/Length.cpp:
  • platform/calc: Added.
  • platform/calc/CalcExpressionBlendLength.cpp: Added.

(WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
(WebCore::CalcExpressionBlendLength::evaluate const):
(WebCore::CalcExpressionBlendLength::operator== const):
(WebCore::CalcExpressionBlendLength::dump const):

  • platform/calc/CalcExpressionBlendLength.h: Added.

(WebCore::operator==):

  • platform/calc/CalcExpressionInversion.cpp: Added.

(WebCore::CalcExpressionInversion::evaluate const):
(WebCore::CalcExpressionInversion::dump const):
(WebCore::CalcExpressionInversion::operator== const):
(WebCore::operator==):

  • platform/calc/CalcExpressionInversion.h: Added.
  • platform/calc/CalcExpressionLength.cpp: Added.

(WebCore::CalcExpressionLength::evaluate const):
(WebCore::CalcExpressionLength::operator== const):
(WebCore::CalcExpressionLength::dump const):

  • platform/calc/CalcExpressionLength.h: Added.

(WebCore::CalcExpressionLength::CalcExpressionLength):
(WebCore::operator==):

  • platform/calc/CalcExpressionNegation.cpp: Added.

(WebCore::CalcExpressionNegation::evaluate const):
(WebCore::CalcExpressionNegation::operator== const):
(WebCore::CalcExpressionNegation::dump const):
(WebCore::operator==):

  • platform/calc/CalcExpressionNegation.h: Added.
  • platform/calc/CalcExpressionNode.cpp: Added.

(WebCore::operator<<):

  • platform/calc/CalcExpressionNode.h: Added.

(WebCore::CalcExpressionNode::type const):
(WebCore::CalcExpressionNode::CalcExpressionNode):

  • platform/calc/CalcExpressionNumber.cpp: Added.

(WebCore::CalcExpressionNumber::evaluate const):
(WebCore::CalcExpressionNumber::dump const):
(WebCore::CalcExpressionNumber::operator== const):

  • platform/calc/CalcExpressionNumber.h: Added.

(WebCore::CalcExpressionNumber::CalcExpressionNumber):
(WebCore::operator==):

  • platform/calc/CalcExpressionOperation.cpp: Added.

(WebCore::CalcExpressionOperation::evaluate const):
(WebCore::CalcExpressionOperation::operator== const):
(WebCore::operator==):
(WebCore::CalcExpressionOperation::dump const):

  • platform/calc/CalcExpressionOperation.h: Added.

(WebCore::CalcExpressionOperation::CalcExpressionOperation):

  • platform/calc/CalcOperator.cpp: Added.

(WebCore::operator<<):

  • platform/calc/CalcOperator.h: Added.
  • platform/calc/CalculationCategory.cpp: Added.

(WebCore::operator<<):

  • platform/calc/CalculationCategory.h: Added.
  • platform/calc/CalculationValue.cpp: Added.

(WebCore::CalculationValue::create):
(WebCore::CalculationValue::CalculationValue):
(WebCore::CalculationValue::evaluate const):
(WebCore::operator==):
(WebCore::operator<<):

  • platform/calc/CalculationValue.h: Added.

(WebCore::CalculationValue::shouldClampToNonNegative const):
(WebCore::CalculationValue::expression const):

  • style/StyleBuilderConverter.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/CalculationValue.cpp:

Update test to include additonal header now needed.

4:29 PM Changeset in webkit [278245] by Cameron McCormack
  • 14 edits in trunk

Rename Internals.mainThreadScrollingReasons to synchronousScrollingReasons
https://bugs.webkit.org/show_bug.cgi?id=226415

Reviewed by Simon Fraser.

Source/WebCore:

Brings the name into accordance with the term the C++ code uses.

  • testing/Internals.cpp:

(WebCore::Internals::synchronousScrollingReasons const):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • compositing/layer-creation/fixed-position-in-view-dynamic.html:
  • compositing/layer-creation/fixed-position-no-content-scroll-reason-expected.txt:
  • compositing/layer-creation/fixed-position-no-content-scroll-reason.html:
  • compositing/layer-creation/fixed-position-out-of-view-dynamic.html:
  • compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html:
  • compositing/layer-creation/no-compositing-for-fixed-position-under-transform.html:
  • tiled-drawing/scrolling/slow-scrolling-background-toggle.html:
  • tiled-drawing/scrolling/slow-scrolling-hidden-background-toggle.html:
  • tiled-drawing/scrolling/slow-scrolling.html:
3:08 PM Changeset in webkit [278244] by Darin Adler
  • 85 edits in trunk

Clients of optional should use has_value instead of relying on hasValue macro
https://bugs.webkit.org/show_bug.cgi?id=226395

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • bytecompiler/NodesCodegen.cpp:

(JSC::RegExpNode::emitBytecode): Don't use hasValue.

Source/WebCore:

In some files we are touching, moved from Optional to std::optional, but doing
that consistently in files we are not otherwise modifying is out of scope here.

In some places, use has_value instead of hasValue. In others, improved further
by not using has_value explicitly when it's clearer to do so. Wasn't 100%
consistent about that, but did aim to cover 100% of the hasValue call sites.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::create): Don't use hasValue.

  • Modules/webxr/WebXRFrame.cpp:

(WebCore::WebXRFrame::getViewerPose): Ditto.
(WebCore::WebXRFrame::getPose): Ditto.

  • Modules/webxr/WebXRGamepad.cpp:

(WebCore::WebXRGamepad::WebXRGamepad): Ditto.

  • Modules/webxr/WebXRInputSource.cpp:

(WebCore::WebXRInputSource::requiresInputSourceChange): Use has_value.

  • bindings/js/DOMPromiseProxy.h:

(WebCore::DOMPromiseProxy<IDLType>::isFulfilled const): Ditto.
(WebCore::DOMPromiseProxy<IDLUndefined>::isFulfilled const): Ditto.
(WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const): Ditto.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal): Ditto.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::addToFacesLookupTable): Removed unneeded double check
of optional value. !x and !x.has_value() check the same thing.
(WebCore::CSSFontFaceSet::remove): Ditto.
(WebCore::CSSFontFaceSet::fontFace): Simplified code with extra local variables
to use an idiom that does not use hasValue. Since using *, ->, or value() on an
optional already asserts, there is no need to explicitly assert in the caller.

  • css/CSSGradientValue.cpp:

(WebCore::GradientStop::isSpecified const): Use has_value.

  • css/CSSSegmentedFontFace.cpp:

(WebCore::CSSSegmentedFontFace::fontRanges): Removed unneeded calls to hasValue.

  • css/FontFace.cpp:

(WebCore::FontFace::family const): Use has_value.
(WebCore::FontFace::style const): Ditto.
(WebCore::FontFace::weight const): Ditto.
(WebCore::FontFace::stretch const): Ditto.
(WebCore::FontFace::unicodeRange const): Ditto.
(WebCore::FontFace::featureSettings const): Ditto.
(WebCore::FontFace::display const): Ditto.

  • css/parser/CSSSelectorParser.cpp:

(WebCore::consumeANPlusB): Ditto.

  • display/css/DisplayStyle.h: Ditto.
  • dom/DataTransferItemList.h: Ditto.
  • dom/Document.cpp:

(WebCore::Document::updateHighlightPositions): Ditto.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener): Ditto.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::hasPendingCorrection const): Ditto.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyInlineStyle): Don't call hasValue.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::captionDisplayMode): Ditto.

  • html/ImageBitmap.h: Ditto.
  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::setScreenSizeOverride): Use has_value.

  • layout/LayoutPhase.cpp:

(WebCore::Layout::PhaseScope::PhaseScope): Ditto.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): Ditto.

  • layout/formattingContexts/inline/InlineLine.h: Ditto.
  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::parseAccessControlMaxAge): Ditto.

  • page/EventHandler.cpp:

(WebCore::EventHandler::defaultWheelEventHandler): Ditto.

  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope): Ditto.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::closestSnapOffsetWithInfoAndAxis): Ditto.

  • platform/ScrollController.cpp:

(WebCore::ScrollController::adjustScrollDestination): Don't use hasValue.

  • platform/cocoa/SystemBattery.mm:

(WebCore::systemHasBattery): Use has_value.
(WebCore::systemHasAC): Use has_value.

  • platform/graphics/Gradient.h: Ditto.
  • platform/graphics/ImageSource.h: Ditto.
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::wouldTaintOrigin const): Changed idiom to not use hasValue.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(setGLContext): Do not use hasValue.

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::ElementFactories::hasElementForMediaType const): Ditto.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::performTaskAtMediaTime): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint): Ditto.

  • platform/graphics/gstreamer/eme/CDMProxyThunder.cpp:

(WebCore::CDMProxyThunder::getDecryptionSession const): Use has_value.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::ParsedResponseMessage::hasType const): Use has_value.
(WebCore::CDMInstanceSessionThunder::cdmInstanceThunder const): Use
a pointer for the erturn value instead of Optional<&>. This hasn't
compiled since we switched to std::optional so I suspect this code is
not compiled by EWS or the buildbot.

  • platform/graphics/gstreamer/eme/CDMThunder.h: Updated to match above.
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::parseDemuxerSrcPadCaps): Use value_or.
(WebCore::AppendPipeline::appsinkCapsChanged): Do not use has_value.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected): Ditto.

  • platform/graphics/transforms/TransformState.h: Use has_value.
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(WebCore::supportsPictureInPicture): Ditto.

  • platform/mac/NSScrollerImpDetails.mm:

(WebCore::ScrollerStyle::recommendedScrollerStyle): Ditto.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::isSystemPreview const): Ditto.

  • platform/xr/openxr/OpenXRInputSource.cpp:

(PlatformXR::OpenXRInputSource::getInputSource const): Ditto.

  • rendering/EventRegion.h: Ditto.
  • rendering/GridTrackSizingAlgorithm.h: Remove unnecessary assertion, since

the * operator already does the assertion.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::canComputePercentageFlexBasis): Use has_value.

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::setExplicitValue): Ditto.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::systemFocusRingColor): Ditto.

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded): Ditto.

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::createSVGTransformFromMatrix): Changed idiom to not
call hasValue.

  • svg/SVGTransform.h: Ditto.
  • testing/WebFakeXRDevice.cpp:

(WebCore::WebFakeXRDevice::setViews): Ditto.

Source/WebDriver:

  • socket/SessionHostSocket.cpp:

(WebDriver::SessionHost::isConnected const): Use has_value.

Source/WebKit:

  • Platform/IPC/ArgumentCoders.h: Use std::optional; there was no hasValue

in here and I edited it by mistake, but we want to do this eventually.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: Removed using namespace WebCore.

(IPC::ArgumentCoder<Ref<WebCore::Font>>::decodePlatformData): Use has_value.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getClientSDKVersion): Ditto.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::decodeImage): Changed idiom to not call hasValue.
(IPC::ArgumentCoder<Ref<Font>>::decode): Ditto.

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::finishParsing): Use has_value.
(WebKit::MediaFormatReader::copyProperty): Ditto.
(WebKit::MediaFormatReader::copyTrackArray): Ditto.

  • Shared/win/WebCoreArgumentCodersWin.cpp:

(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData): Do not call hasValue.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration encodeWithCoder:]): Changed idiom to not use hasValue.

  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::setState): Use has_value.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::AutomationCommandError::toProtocolString): Changed idiom to not use hasValue.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::determineDataOwner const): Use has_value.

  • UIProcess/Inspector/socket/RemoteInspectorClient.cpp:

(WebKit::RemoteInspectorClient::sendWebInspectorEvent): Changed idiom to not use hasValue.

  • UIProcess/glib/UserMediaPermissionRequestManagerProxyGLib.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::platformValidateUserMediaRequestConstraints): Ditto.

  • WebProcess/GPU/media/MediaSourcePrivateRemote.cpp:

(WebKit::MediaSourcePrivateRemote::addSourceBuffer): Use has_value.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters): Ditto.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::notifyPreferencesChanged): Changed idiom to not
call hasValue.

Source/WTF:

  • wtf/Hasher.h: Use has_value.
  • wtf/Optional.h: Remove hasValue macro. Not needed any more, but also a bit

dangerous because of how widespread the use of hasValue is for things other
than WTF::Optional.

Tools:

  • TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp: Use has_value.
  • TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp: Ditto.
  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp: Ditto.
  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(AudioRenderingWebViewTest::handleStart): Ditto.

  • WebKitTestRunner/GeolocationProviderMock.cpp:

(WTR::GeolocationProviderMock::setPosition): Ditto.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView canPerformAction:withSender:]): Ditto.

2:14 PM Changeset in webkit [278243] by Chris Dumez
  • 6 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::SamplingProfiler
https://bugs.webkit.org/show_bug.cgi?id=226414

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::SamplingProfiler as it is being phased out in favor of Lock,
which supports clang thread safety analysis.

  • heap/Heap.cpp:

(JSC::visitSamplingProfiler):

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::InspectorScriptProfilerAgent::startTracking):
(Inspector::InspectorScriptProfilerAgent::trackingComplete):
(Inspector::InspectorScriptProfilerAgent::stopSamplingWhenDisconnecting):

  • runtime/JSGlobalObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::createThreadIfNecessary):
(JSC::SamplingProfiler::timerLoop):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::startWithLock):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThreadWithLock):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::noticeJSLockAcquisition):
(JSC::SamplingProfiler::noticeVMEntry):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::releaseStackTraces):
(JSC::SamplingProfiler::stackTracesAsJSON):
(JSC::SamplingProfiler::reportTopFunctions):
(JSC::SamplingProfiler::reportTopBytecodes):

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::WTF_RETURNS_LOCK):
(JSC::SamplingProfiler::WTF_REQUIRES_LOCK):

2:09 PM Changeset in webkit [278242] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::dumpJITMemory()
https://bugs.webkit.org/show_bug.cgi?id=226413

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::dumpJITMemory() as it is being phased out in favor of Lock,
which supports Clang thread safety analysis.

  • jit/ExecutableAllocator.cpp:

(JSC::dumpJITMemory):

2:08 PM Changeset in webkit [278241] by Chris Dumez
  • 4 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::WasmCalleeRegistry
https://bugs.webkit.org/show_bug.cgi?id=226412

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::WasmCalleeRegistry, as it is being phased out in favor of
Lock, which supports Clang thread safety analysis.

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::recordJITFrame):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::takeSample):

  • wasm/WasmCalleeRegistry.h:

(JSC::Wasm::CalleeRegistry::WTF_RETURNS_LOCK):
(JSC::Wasm::CalleeRegistry::WTF_REQUIRES_LOCK):
(JSC::Wasm::CalleeRegistry::getLock): Deleted.
(JSC::Wasm::CalleeRegistry::isValidCallee): Deleted.

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):

9:59 AM Changeset in webkit [278240] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

VM::isTerminationException() should only be run on a non-null exception value.
https://bugs.webkit.org/show_bug.cgi?id=226417
rdar://78646170

Reviewed by Filip Pizlo.

  • jsc.cpp:

(runInteractive):

6:38 AM Changeset in webkit [278239] by Alan Bujtas
  • 9 edits
    2 adds in trunk

[LFC][TFC] Do not include vertical spacing when resolving percent height for table content
https://bugs.webkit.org/show_bug.cgi?id=226365

Source/WebCore:

Reviewed by Antti Koivisto.

<table style="height: 100px; border-spacing: 10px;"><tr><td style="height: 100%"></td></tr></table>
The <td>'s 100% height is resolved against 100px - (2 * 10px) -> 80px;

Test: fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::TableFormattingContext):

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::TableFormattingGeometry):
(WebCore::Layout::TableFormattingGeometry::computedCellBorder const):

  • layout/formattingContexts/table/TableFormattingGeometry.h:

(WebCore::Layout::TableFormattingGeometry::formattingContext const):

  • layout/formattingContexts/table/TableFormattingQuirks.cpp:

(WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

  • layout/formattingContexts/table/TableFormattingQuirks.h:

(WebCore::Layout::TableFormattingQuirks::formattingContext const):

LayoutTests:

Reviewed by Antti Koivisto.

  • TestExpectations: WebKit table layout don't resolve the height percent properly when border spacing is present.
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html: Added.
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html: Added.
5:12 AM Changeset in webkit [278238] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC] Transition containing block for loops to range loops
https://bugs.webkit.org/show_bug.cgi?id=226315

Reviewed by Antti Koivisto.

Add support for stayWithin.

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::mapTopLeftToFloatingStateRoot const):

  • layout/formattingContexts/FormattingGeometry.cpp:

(WebCore::Layout::FormattingGeometry::computedHeightValue const):

  • layout/formattingContexts/block/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isDescendantOf const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutContainingBlockChainIterator.h:

(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::begin):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::end):
(WebCore::Layout::LayoutContainingBlockChainIterator::LayoutContainingBlockChainIterator):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::LayoutContainingBlockChainIteratorAdapter):
(WebCore::Layout::containingBlockChain):

3:09 AM Changeset in webkit [278237] by Adrian Perez de Castro
  • 3 edits in trunk/Source/JavaScriptCore

Non-unified build fixes, late-ish May 2021 edition redux
https://bugs.webkit.org/show_bug.cgi?id=226401

Unreviewed non-unified build fixes.

  • jit/JITSizeStatistics.cpp: Add missing LinkBuffer.h header.
  • jit/JITSizeStatistics.h: Add missing CCallHelpers.h and wtf/text/WTFString.h headers;

remove unneeded CCallHelpers forward declaration.

May 28, 2021:

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

Punycode encode U+0BE6 when not in context of other Tamil characters
https://bugs.webkit.org/show_bug.cgi?id=226409
<rdar://78160926>

Reviewed by Tim Horton.

Source/WTF:

It has quite legitimate use, so we don't want to always punycode encode it,
but when used in the context of non-Tamil characters we want to punycode encode it.

  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::isLookalikeCharacterOfScriptType<USCRIPT_ARMENIAN>):
(WTF::URLHelpers::isLookalikeCharacterOfScriptType<USCRIPT_TAMIL>):
(WTF::URLHelpers::isOfScriptType):
(WTF::URLHelpers::isLookalikeSequence):
(WTF::URLHelpers::isLookalikeCharacter):
(WTF::URLHelpers::isArmenianLookalikeCharacter): Deleted.
(WTF::URLHelpers::isArmenianScriptCharacter): Deleted.
(WTF::URLHelpers::isArmenianLookalikeSequence): Deleted.

Tools:

  • TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):

10:27 PM Changeset in webkit [278235] by Wenson Hsieh
  • 8 edits
    2 adds in trunk

Web process terminates when attempting to log in on bankid.no
https://bugs.webkit.org/show_bug.cgi?id=226411
rdar://77419432

Reviewed by Chris Dumez.

Source/WebCore:

On bankid.no, we hit an erroneous MESSAGE_CHECK after decoding and applying an EndClipToDrawingCommands while
the display list replayer's m_maskImageBuffer is null. This may occur as a result of the following sequence of
events:

  1. We call into clipToDrawingCommands inside CanvasRenderingContext2DBase, while drawing text with either

a gradient or pattern fill style.

  1. A BeginClipToDrawingCommands item is decoded and handled in the GPU process; we create and store a new

mask image buffer on the display list replayer in the GPU process.

  1. When we decode the DrawGlyphs item while drawing into the mask buffer, we see that the resource identifier

corresponding to the font is missing from the resource cache in the GPU process, and subsequently go to
sleep while we wait for the resource to arrive.

  1. The web font data arrives in the GPU process, and we add it to the cache; this allows us to continue

processing the display list from where we paused replay in step (3).

  1. Eventually, we handle the EndClipToDrawingCommands item; however, since this is now happening underneath

a different GPU process wakeup message than in (2), our mask image buffer from (1) is missing. This not only
causes all of the prior drawing commands to target the canvas' image buffer rather than the mask image
buffer, but also causes us to hit a MESSAGE_CHECK and terminate the web process.

To fix this, we add some DisplayList::Replayer::Delegate method hooks to call out into the replayer client when
a mask image buffer has been created or cleared out; in the GPU process, we then use these client hooks to keep
track of the current mask image buffer that is the target of display list replayer.

If we go to sleep and then resume display list processing later for any reason, we then pass this mask image
buffer back to the display list replayer upon construction, and simply let the display list replayer paint into
the maks image buffer's context.

Test: fast/canvas/fill-gradient-text-with-web-font.html

  • platform/graphics/displaylists/DisplayListReplayer.cpp:

(WebCore::DisplayList::Replayer::Replayer):
(WebCore::DisplayList::Replayer::applyItem):

Call into the client hooks below.

  • platform/graphics/displaylists/DisplayListReplayer.h:

(WebCore::DisplayList::Replayer::Replayer):

When initializing a DisplayList::Replayer, make it possible to take in an initial mask image buffer as well.

(WebCore::DisplayList::Replayer::Delegate::didCreateMaskImageBuffer):
(WebCore::DisplayList::Replayer::Delegate::didResetMaskImageBuffer):

Add new replayer delegate hooks to inform the clients layer when the replayer's mask image buffer has been
created or cleared out. See WebKit ChangeLog for more information.

Source/WebKit:

See WebCore ChangeLog for more details.

  • GPUProcess/graphics/RemoteImageBuffer.h:

Implement the new display list replayer delegate hooks and plumb the calls over to the RemoteRenderingBackend.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::submit):

Keep track of m_currentMaskImageBuffer by implementing the methods below, and use this when initializing our
DisplayList::Replayer if needed.

(WebKit::RemoteRenderingBackend::didCreateMaskImageBuffer):
(WebKit::RemoteRenderingBackend::didResetMaskImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

LayoutTests:

Add a layout test that exercises the crash by first serializing a large number of display list items, and then
calling fillText with a web font and a gradient fillStyle.

  • fast/canvas/fill-gradient-text-with-web-font-expected.html: Added.
  • fast/canvas/fill-gradient-text-with-web-font.html: Added.
9:34 PM Changeset in webkit [278234] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

[JSC] Escape $ only when run with SSH
https://bugs.webkit.org/show_bug.cgi?id=226385

Reviewed by Alexey Proskuryakov.

  • Scripts/run-jsc-stress-tests:
6:28 PM Changeset in webkit [278233] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Regression: Raw AudioBufferSourceNode playback causes repeated crackling sound
https://bugs.webkit.org/show_bug.cgi?id=222098
<rdar://problem/74546471>

Reviewed by Darin Adler.

The issue was due to certain audio nodes (such as AudioBufferSourceNode) staying in the audio
graph after they were no longer needed. As a result, the audio graph was becoming larger and
larger and the audio performance should degrade due to us traversing this increasingly large
graph.

The audio nodes that had trouble getting removed from the graphs were tail processing nodes.
Those are nodes that may still produce output for a while after they no longer have any
inputs. PannerNode and DelayNode are example of such nodes.

When a Node is no longer useful (the node no longer has any connections, m_connectionRefCount
is 0), we call disableOutputsIfNecessary() on it to disable its outputs and avoid doing any
processing of these outputs since they no longer have an input. disableOutputsIfNecessary()
would normally call disableOutputs() (if not already disabled) but there was an exception
in the case where the node requires tail processing. For such nodes, you wouldn't want to
disable them until they've finished processing their tail.

The issue was that once those nodes had finished processing their tail, we wouldn't come
back to them and disable their outputs later on. As a result, we would process more and
more (silent) nodes and the audio performance would seriously deteriorate.

To address this, we now add the node to the context's list of tail processing nodes in
disableOutputsIfNecessary() if the node requires tail processing. After each rendering
quantum, we go through those tail processing nodes and check if they have finished
processing their tail. If they have, we go ahead and disable their outputs at this point
and remove them from the list.

This is modeled after what Blink is doing for tail processing nodes in:

I have verified that on the following demo, the performance no longer deteriorates after
a while:

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::enableOutputsIfNecessary):
(WebCore::AudioNode::disableOutputsIfNecessary):

  • Modules/webaudio/AudioNode.h:

(WebCore::AudioNode::isTailProcessing const):
(WebCore::AudioNode::setIsTailProcessing):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::uninitialize):
(WebCore::BaseAudioContext::handlePostRenderTasks):
(WebCore::BaseAudioContext::addTailProcessingNode):
(WebCore::BaseAudioContext::removeTailProcessingNode):
(WebCore::BaseAudioContext::updateTailProcessingNodes):
(WebCore::BaseAudioContext::disableOutputsForFinishedTailProcessingNodes):
(WebCore::BaseAudioContext::finishTailProcessing):

  • Modules/webaudio/BaseAudioContext.h:

(WebCore::BaseAudioContext::TailProcessingNode::TailProcessingNode):
(WebCore::BaseAudioContext::TailProcessingNode::~TailProcessingNode):
(WebCore::BaseAudioContext::TailProcessingNode::operator-> const):
(WebCore::BaseAudioContext::TailProcessingNode::operator== const):

6:05 PM Changeset in webkit [278232] by Chris Dumez
  • 9 edits in trunk

Stop using UncheckedLock in WTF::MetaAllocator
https://bugs.webkit.org/show_bug.cgi?id=226396

Reviewed by Darin Adler.

Stop using UncheckedLock in WTF::MetaAllocator, as it is being phased out in favor on Lock,
which supports Clang thread safety analysis.

Source/JavaScriptCore:

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::getLock const):

  • jit/ExecutableAllocator.h:

(JSC::ExecutableAllocatorBase::WTF_RETURNS_LOCK):

  • tools/VMInspector.cpp:

(JSC::VMInspector::isValidExecutableMemory):

Source/WTF:

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::release):
(WTF::MetaAllocator::MetaAllocator):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::currentStatistics):

  • wtf/MetaAllocator.h:
5:52 PM Changeset in webkit [278231] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

DelayDSPKernel::process() is slow
https://bugs.webkit.org/show_bug.cgi?id=226358

Reviewed by Darin Adler.

When I profiled the demo at https://jsfiddle.net/KrisJohnson/s5vL24o1/123/ (in the context of Bug 222098),
I noticed that 20% of the CPU time was spent under DelayDSPKernel::process().

To improve this, we now vectorize DelayDSPKernel::process() in the common case where there is no automation
and the delay time is constant.

The implementation is very similar to the one in Blink:

Some differences compared to the Blink implementation:

  • I did not vectorize the A-rate case for simplicity. It is not as common and it is more complicated. We may consider doing this in the future if really needed.
  • On Cocoa, we leveage Accelerate's vDSP_vintb() to do the interpolation instead of doing 2 separate operations.

This doesn't fix Bug 222098 but it does improve the situation quite a bit. I also see that the CPU time
spent under DelayDSPKernel::process() went from ~20% to 1.2% on this demo.

No new tests, no Web-facing behavior change, just a performance optimization.

  • Modules/webaudio/DelayDSPKernel.cpp:

(WebCore::copyToCircularBuffer):
(WebCore::DelayDSPKernel::DelayDSPKernel):
(WebCore::DelayDSPKernel::bufferLengthForDelay const):
(WebCore::DelayDSPKernel::process):
(WebCore::DelayDSPKernel::processARate):
(WebCore::DelayDSPKernel::processKRate):

  • Modules/webaudio/DelayDSPKernel.h:
  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::substract):
(WebCore::VectorMath::interpolate):

  • platform/audio/VectorMath.h:
5:18 PM Changeset in webkit [278230] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

[Cocoa] Prevent GPU Process from attempt to connect to the AppSSO service (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=226393
<rdar://problem/78614833>

Reviewed by Eric Carlson.

In Bug 224834 I modified WebKit to use avoid invoking AppSSO in CFNetwork calls, since we make those
decisions prior to beginning our network interactions. I missed a media call where this was being done.

This patch corrects that mistake.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::canonicalURL):

4:53 PM Changeset in webkit [278229] by Chris Dumez
  • 11 edits
    1 delete in trunk/Source

Stop using UncheckedLock in JSDOMGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=226281

Reviewed by Darin Adler.

Source/JavaScriptCore:

Drop JSC::lockDuringMarking() and its now empty header given that it does conditional
locking and it is not compatible with Clang thread safety analysis.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/UnlinkedCodeBlock.h:
  • heap/LockDuringMarking.h: Removed.

Source/WebCore:

Stop using UncheckedLock in JSDOMGlobalObject and use Lock instead of benefit from Clang thread
safety analysis. This is a step towards phasing out UncheckedLock and improving the thread
safety of our code.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::visitChildrenImpl):
(WebCore::JSDOMGlobalObject::clearDOMGuardedObjects):

  • bindings/js/JSDOMGlobalObject.h:

(WebCore::getDOMConstructor):

  • bindings/js/JSDOMGuardedObject.cpp:

(WebCore::DOMGuardedObject::DOMGuardedObject):
(WebCore::DOMGuardedObject::clear):
(WebCore::DOMGuardedObject::removeFromGlobalObject):

  • bindings/js/JSDOMGuardedObject.h:
  • bindings/js/JSDOMWrapperCache.cpp:

(WebCore::cacheDOMStructure):

3:52 PM Changeset in webkit [278228] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.0.9

Tag Safari-612.1.15.0.9.

2:53 PM Changeset in webkit [278227] by don.olmstead@sony.com
  • 4 edits in trunk/Source/WebKit

[Cocoa] HDR variants in HLS playlists not selected when screen is HDR
https://bugs.webkit.org/show_bug.cgi?id=226349
<rdar://76963977>

Unreviewed build fix after r278204.

Update the method signature of RemoteMediaPlayerProxy::prepareForPlayback for non-Cocoa
platforms.

  • GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):

  • GPUProcess/media/playstation/RemoteMediaPlayerProxyPlayStation.cpp:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):

  • GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):

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

Regression(r278179): m_serverLock is still held after WebIDBServer is destroyed
https://bugs.webkit.org/show_bug.cgi?id=226389

Reviewed by Chris Dumez.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::close):

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

Prevent resetting scroll position in unnecessary cases during page load
https://bugs.webkit.org/show_bug.cgi?id=226338
rdar://75334651

Patch by Matt Gilligan <matthew_gilligan@apple.com> on 2021-05-28
Reviewed by Simon Fraser.

Source/WebKit:

When WKWebView's scroll view has a refresh control and is rubber banding along the top
edge, don't cancel scrolling animations or reset contentOffset within valid range due to
the page load. This can cause flickering during dragging and can prevent the bounce
animation from finishing.

Test: ScrollViewInsetTests.PreserveContentOffsetForRefreshControl

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _didCommitLoadForMainFrame]):
Avoid calling -_stopScrollingAndZoomingAnimations when rubber banding for a refresh control
to prevent cancelling a bounce animation.

(-[WKWebView _restoreScrollAndZoomStateForTransaction:]):
(-[WKWebView _didCommitLayerTree:]):
Don't adjust content offset to be within valid range when rubber banding for a refresh
control, or the scroll position will be reset while dragging or bouncing.

(-[WKWebView _scrollViewIsRubberBandingForRefreshControl]):
Return whether _scrollView has a refresh control and is rubber banding along the top edge.

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]):
When the refresh control is dismissing, the scroll view will be rubber banding but not
dragging or bouncing. Treat a non-nil refreshControl as a hint that the scroll view might
be rubber banding.

Tools:

  • TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:

(TestWebKitAPI::TEST):

1:17 PM Changeset in webkit [278224] by rmorisset@apple.com
  • 3 edits
    1 add in trunk

Fix LikelyDenseUnsignedIntegerSet::clear()
https://bugs.webkit.org/show_bug.cgi?id=226388
JSTests:

rdar://78607433

Reviewed by Mark Lam.

  • stress/stack-allocation-regression.js: Added.

(foo):

Source/WTF:

Reviewed by Mark Lam.

There are two problems with it:
1) It calls BitVector::clearAll(), which does not free any memory.
Instead, it should call BitVector::~BitVector(), then do a placement new of a fresh BitVector (to get it back to its inline condition)
2) More problematically, it changes m_size before calling isBitVector() which relies crucially on the value of m_size.
So it is going to believe that it is in BitVector mode even when it is actually in HashSet mode.

  • wtf/LikelyDenseUnsignedIntegerSet.h:

(WTF::LikelyDenseUnsignedIntegerSet::clear):

1:13 PM Changeset in webkit [278223] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebKit

[Cocoa] Hang in WebM format reader when loading content from https://powerrangers.fandom.com/
https://bugs.webkit.org/show_bug.cgi?id=226128
<rdar://77645877>

Reviewed by Eric Carlson.

When creating a format reader, MediaToolbox will query for various properties including ones about
MetadataFormat and MetadataKeySpace. We don't support those properties, but we still block until
tracks are loaded before answering that we don't support them. Instead, just return early unless
the query is for the one property which we do support, Duration.

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::copyProperty):

1:08 PM Changeset in webkit [278222] by Jean-Yves Avenard
  • 5 edits
    2 adds in trunk

Add MediaSession.callActionHandler
https://bugs.webkit.org/show_bug.cgi?id=226077
rdar://77463304

Reviewed by Eric Carlson.

Source/WebCore:

Make it possible for JavaScript to be able to trigger a MediaSession action
handler so a MediaSession.coordinator polyfill such as one provided by an
external JS library will work.
Test: media/media-session/callActionHandler.html

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::callActionHandler):

  • Modules/mediasession/MediaSession.h:
  • Modules/mediasession/MediaSession.idl: Add method definition.

LayoutTests:

  • media/media-session/callActionHandler-expected.txt: Added.
  • media/media-session/callActionHandler.html: Added.
1:02 PM Changeset in webkit [278221] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[iOS] Adjust logic when determining whether to enable image extraction actions in the callout bar
https://bugs.webkit.org/show_bug.cgi?id=226387
rdar://76781788

Reviewed by Tim Horton and Devin Rousso.

Call into the superclass (which contains additional restrictions beyond our isContentEditable check on the
editor state), and additionally refactor this helper function to take a selector and return whether or not it is
one of the image extraction action selectors (as opposed to returning the selector itself).

See Radar for more details.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):

12:54 PM Changeset in webkit [278220] by Alan Coon
  • 8 edits in branches/safari-612.1.15.0-branch/Source

Versioning.

WebKit-7612.1.15.0.9

12:51 PM Changeset in webkit [278219] by Alan Bujtas
  • 5 edits
    2 adds in trunk

CrashOnOverflow in WebCore::RenderTable::cellBefore(WebCore::RenderTableCell const*)
https://bugs.webkit.org/show_bug.cgi?id=225949

Reviewed by Antti Koivisto.

Source/WebCore:

The table section maintains a grid of rows and columns. This grid is used to jump to cells directly during layout (as opposed to tree walking).
It needs to be re-populated on tree mutations e.g when a new row is added to the table.
RenderTableSection::willInsertTableRow assumes that rows and cells are inserted subsequently, after each other and
it's ok to ignore the grid invalidation on appends as the subsequent ::addCell() call takes care of the grid.
However in some continuation split cases, we re-parent complete rows under table sections which means no subsequent ::addCell() calls.

This patch addresses this case by using the same pattern we have for block continuation invalidation in RenderTreeBuilder::splitAnonymousBoxesAroundChild().

Test: fast/table/table-split-on-insert-with-section-crash.html

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::markBoxForRelayoutAfterSplit):
(WebCore::markBoxForRelayoutAfterSplit): Deleted.

  • rendering/updating/RenderTreeBuilder.h:
  • rendering/updating/RenderTreeBuilderInline.cpp:

(WebCore::RenderTreeBuilder::Inline::splitInlines):

LayoutTests:

  • fast/table/table-split-on-insert-with-section-crash-expected.txt: Added.
  • fast/table/table-split-on-insert-with-section-crash.html: Added.
12:40 PM Changeset in webkit [278218] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

[JSC] Fix run-jsc-stress-tests missing escape $
https://bugs.webkit.org/show_bug.cgi?id=226385

Reviewed by Alexey Proskuryakov.

  • Scripts/run-jsc-stress-tests:
11:54 AM Changeset in webkit [278217] by weinig@apple.com
  • 17 edits in trunk/Source

Add stub implementation of CA separated portal bits for GraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=226343

Reviewed by Simon Fraser.

Source/WebCore:

Plumbs isSeparatedPortal and isDescendentOfSeparatedPortal bits through GraphicsLayer.
Renames setSeparated to setIsSeparated for consistency.

Currently unused, but getting the bits in is big enough that its helpful
to land on its own.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::isIsSeparated const):
(WebCore::GraphicsLayer::setIsSeparated):
(WebCore::GraphicsLayer::isSeparatedPortal const):
(WebCore::GraphicsLayer::setIsSeparatedPortal):
(WebCore::GraphicsLayer::isDescendentOfSeparatedPortal const):
(WebCore::GraphicsLayer::setIsDescendentOfSeparatedPortal):
(WebCore::GraphicsLayer::isSeparated const): Deleted.
(WebCore::GraphicsLayer::setSeparated): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setIsSeparated):
(WebCore::GraphicsLayerCA::setIsSeparatedPortal):
(WebCore::GraphicsLayerCA::setIsDescendentOfSeparatedPortal):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateIsSeparated):
(WebCore::GraphicsLayerCA::updateIsSeparatedPortal):
(WebCore::GraphicsLayerCA::updateIsDescendentOfSeparatedPortal):
(WebCore::GraphicsLayerCA::setSeparated): Deleted.
(WebCore::GraphicsLayerCA::updateSeparated): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::setIsSeparated):
(WebCore::PlatformCALayerCocoa::isSeparatedPortal const):
(WebCore::PlatformCALayerCocoa::setIsSeparatedPortal):
(WebCore::PlatformCALayerCocoa::isDescendentOfSeparatedPortal const):
(WebCore::PlatformCALayerCocoa::setIsDescendentOfSeparatedPortal):
(WebCore::PlatformCALayerCocoa::setSeparated): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGeometry):

Source/WebKit:

Plumbs isSeparatedPortal and isDescendentOfSeparatedPortal bits through GraphicsLayer.
Renames setSeparated to setIsSeparated for consistency.

Currently unused, but getting the bits in is big enough that its helpful
to land on its own.

  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:

(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction): Deleted.
(WebKit::RemoteLayerTreeTransaction::~RemoteLayerTreeTransaction): Deleted.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::setIsSeparated):
(WebKit::PlatformCALayerRemote::isSeparatedPortal const):
(WebKit::PlatformCALayerRemote::setIsSeparatedPortal):
(WebKit::PlatformCALayerRemote::isDescendentOfSeparatedPortal const):
(WebKit::PlatformCALayerRemote::setIsDescendentOfSeparatedPortal):
(WebKit::PlatformCALayerRemote::setSeparated): Deleted.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:

Source/WTF:

  • wtf/PlatformHave.h: Add HAVE_CORE_ANIMATION_SEPARATED_PORTALS.
11:47 AM Changeset in webkit [278216] by Russell Epstein
  • 1 copy in tags/Safari-611.3.6.1.3

Tag Safari-611.3.6.1.3.

11:45 AM Changeset in webkit [278215] by Russell Epstein
  • 2 edits in branches/safari-611.3.6.1-branch/Source/WTF

Cherry-pick r278209. rdar://problem/78595584

Unreviewed build fix after r277881.

Deal with IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES potentially not being defined on
older OSes.

  • wtf/cocoa/FileSystemCocoa.mm: (WTF::FileSystemImpl::setAllowsMaterializingDatalessFiles): (WTF::FileSystemImpl::allowsMaterializingDatalessFiles):

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

11:45 AM Changeset in webkit [278214] by Russell Epstein
  • 2 edits in branches/safari-611.3.6.1-branch/Source/WTF

Cherry-pick r278208. rdar://problem/78595584

Unreviewed build fix after r277881.

Add missing header include.

  • wtf/cocoa/FileSystemCocoa.mm:

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

11:36 AM Changeset in webkit [278213] by sbarati@apple.com
  • 11 edits
    2 adds in trunk/Source/JavaScriptCore

Add the ability to dump statistics about cumulative counts and code sizes of Baseline JIT opcodes and DFG nodes
https://bugs.webkit.org/show_bug.cgi?id=226200

Reviewed by Robin Morisset.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • dfg/DFGSlowPathGenerator.h:

(JSC::DFG::SlowPathGenerator::currentNode const):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):

  • jit/JIT.cpp:

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

  • jit/JITSizeStatistics.cpp: Added.

(JSC::JITSizeStatistics::markStart):
(JSC::JITSizeStatistics::markEnd):
(JSC::JITSizeStatistics::dump const):

  • jit/JITSizeStatistics.h: Added.

(JSC::JITSizeStatistics::reset):

  • jsc.cpp:

(runJSC):

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

(JSC::VM::VM):

  • runtime/VM.h:
  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):

11:31 AM Changeset in webkit [278212] by Russell Epstein
  • 8 edits in branches/safari-611.3.6.1-branch/Source

Versioning.

WebKit-7611.3.6.1.3

11:13 AM Changeset in webkit [278211] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Don't sink arguments past the context of the inline call frame they were created in
https://bugs.webkit.org/show_bug.cgi?id=226363
<rdar://78392801>

Reviewed by Filip Pizlo.

JSTests:

  • stress/dont-sink-arguments-past-inline-call-frame.js: Added.

(foo):
(fooWrap):
(empty):
(bar):

Source/JavaScriptCore:

DFG OSR exit isn't set up to allow materializing phantom arguments objects
when the inline call frame is no longer present in the exit metadata. There
may be multiple reasons for this, but there's at least one I discovered:
We don't analyze any locals when reconstructing the variable event stream
if that local is past the extent of the inline call frame.

This patch makes it so we treat it as an escape if between the definition and
the last use of a sink candidate (either via an IR use or bytecode liveness)
there is an exit to a place in the graph where the inline call frame of the
definition is no longer present.

  • dfg/DFGVarargsForwardingPhase.cpp:
11:11 AM Changeset in webkit [278210] by stephan.szabo@sony.com
  • 14 edits in trunk/Source/JavaScriptCore

Regenerate builtins generator expectations after optional changes
https://bugs.webkit.org/show_bug.cgi?id=226381

Reviewed by Chris Dumez.

  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result:
  • Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result:
  • Scripts/tests/builtins/expected/WebCore-AnotherGuardedInternalBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result:
  • Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result:
10:59 AM Changeset in webkit [278209] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed build fix after r277881.

Deal with IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES potentially not being defined on
older OSes.

  • wtf/cocoa/FileSystemCocoa.mm:

(WTF::FileSystemImpl::setAllowsMaterializingDatalessFiles):
(WTF::FileSystemImpl::allowsMaterializingDatalessFiles):

10:47 AM Changeset in webkit [278208] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed build fix after r277881.

Add missing header include.

  • wtf/cocoa/FileSystemCocoa.mm:
10:23 AM Changeset in webkit [278207] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Buffer computations should use correct type
https://bugs.webkit.org/show_bug.cgi?id=226352
<rdar://problem/78116213>

Reviewed by Ryosuke Niwa.

The implementation of utf8Buffer holds the buffer size in an 'int', even though our buffer
APIs take size_t arguments. Let's make this consistent.

  • platform/SharedBuffer.cpp:

(WebCore::utf8Buffer):

9:58 AM Changeset in webkit [278206] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

The jsc shell should not continue executing after a termination has been received.
https://bugs.webkit.org/show_bug.cgi?id=226368
rdar://78013374

Reviewed by Saam Barati.

This patch makes the jsc shell forbid execution in all the places that it has
caught and seen a TerminationException.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):
(checkException):
(runWithOptions):
(runInteractive):

9:52 AM Changeset in webkit [278205] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur Wk1] imported/w3c/web-platform-tests/css/css-contain/contain-paint-ignored-cases-ruby-stacking-and-clipping-001.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226377

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
9:44 AM Changeset in webkit [278204] by jer.noble@apple.com
  • 8 edits in trunk/Source/WebKit

[Cocoa] HDR variants in HLS playlists not selected when screen is HDR
https://bugs.webkit.org/show_bug.cgi?id=226349
<rdar://76963977>

Reviewed by Eric Carlson.

An existing test, http/tests/media/hls/hls-hdr-switch.html, should have caught this regression,
but is not currently functional as it depends on PHP, which has been removed.

The preferredDynamicRangeMode needs to be piped over from WebContent -> GPU process.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setPreferredDynamicRangeMode):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):

  • Scripts/webkit/messages.py:

(headers_for_type):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):
(WebKit::MediaPlayerPrivateRemote::setPreferredDynamicRangeMode):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
9:43 AM Changeset in webkit [278203] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Return immediately when asked to paint an AVPlayer that hasn't reached HaveCurrentData
https://bugs.webkit.org/show_bug.cgi?id=226350
rdar://77910715

Reviewed by Jer Noble.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer): Return immediately
if readyState < HaveCurrentData.
(WebCore::MediaPlayerPrivateAVFoundationObjC::videoOutputHasAvailableFrame): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto.

9:39 AM Changeset in webkit [278202] by Devin Rousso
  • 8 edits in trunk

[Modern Media Controls] put the localized information for tracks first if the track is not in the user's preferred language
https://bugs.webkit.org/show_bug.cgi?id=226361
<rdar://problem/78497853>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/modern-media-controls/tracks-support/sorted-by-user-preferred-languages.html

This makes it clearer/easier for the user to understand what's going on when the track label
is not in the user's preferred language. For example, if a <video> has an "English" audio
track, it's not very helpful to show "English (英语)" for Chinese users instead of something
like "英语 (English)".

If the track has a label and either matches the user's preferred language or its label
already contains the localized language name, combine the track's label with a localized
description of the track if that description isn't already in the label. Otherwise, add
the localized language name first, then the description of the track, and finally the label.

Here are some examples if the user's preferred language is English:

  • <track kind="subtitles" srclang="en"> would show "English"
  • <track kind="subtitles" srclang="en" label="Foo"> would show "Foo"
  • <track kind="captions" srclang="en"> would show "English Captions"
  • <track kind="captions" srclang="en" label="Foo"> would show "Foo Captions"
  • <track kind="captions" srclang="en" label="Captions"> would show "Captions"
  • <track kind="subtitles" srclang="fr"> would show "French"
  • <track kind="subtitles" srclang="fr" label="Foo"> would show "French (Foo)"
  • <track kind="captions" srclang="fr"> would show "French Captions"
  • <track kind="captions" srclang="fr" label="Foo"> would show "French Captions (Foo)"
  • <track kind="captions" srclang="fr" label="Captions"> would show "French Captions"
  • page/CaptionUserPreferences.cpp:

(WebCore::trackDisplayName):

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::addTextTrackKindDisplayNameIfNeeded): Added.
(WebCore::addAudioTrackKindDisplayNameIfNeeded): Added.
(WebCore::addTrackKindDisplayNameIfNeeded): Added.
(WebCore::trackDisplayName):
(WebCore::CaptionUserPreferencesMediaAF::displayNameForTrack const):
(WebCore::textTrackCompare):
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
(WebCore::buildDisplayStringForTrackBase): Deleted.

  • platform/LocalizedStrings.h:
  • platform/LocalizedStrings.cpp:

(WebCore::trackNoLabelText): Added.
(WebCore::textTrackOffMenuItemText): Added.
(WebCore::textTrackAutomaticMenuItemText): Added.
(WebCore::addTrackLabelAsSuffix): Added.
(WebCore::textTrackKindClosedCaptionsDisplayName): Added.
(WebCore::addTextTrackKindClosedCaptionsSuffix): Added.
(WebCore::textTrackKindCaptionsDisplayName): Added.
(WebCore::addTextTrackKindCaptionsSuffix): Added.
(WebCore::textTrackKindDescriptionsDisplayName): Added.
(WebCore::addTextTrackKindDescriptionsSuffix): Added.
(WebCore::textTrackKindChaptersDisplayName): Added.
(WebCore::addTextTrackKindChaptersSuffix): Added.
(WebCore::textTrackKindMetadataDisplayName): Added.
(WebCore::addTextTrackKindMetadataSuffix): Added.
(WebCore::textTrackKindSDHDisplayName): Added.
(WebCore::addTextTrackKindSDHSuffix): Added.
(WebCore::textTrackKindEasyReaderDisplayName): Added.
(WebCore::addTextTrackKindEasyReaderSuffix): Added.
(WebCore::textTrackKindForcedDisplayName): Added.
(WebCore::addTextTrackKindForcedSuffix): Added.
(WebCore::audioTrackKindDescriptionsDisplayName): Added.
(WebCore::addAudioTrackKindDescriptionsSuffix): Added.
(WebCore::audioTrackKindCommentaryDisplayName): Added.
(WebCore::addAudioTrackKindCommentarySuffix): Added.
(WebCore::textTrackNoLabelText): Deleted.
(WebCore::audioTrackNoLabelText): Deleted.
(WebCore::captionsTextTrackKindDisplayName): Deleted.
(WebCore::captionsTextTrackWithoutLabelMenuItemText): Deleted.
(WebCore::descriptionsTextTrackKindDisplayName): Deleted.
(WebCore::descriptionsTextTrackWithoutLabelMenuItemText): Deleted.
(WebCore::chaptersTextTrackKindDisplayName): Deleted.
(WebCore::chaptersTextTrackWithoutLabelMenuItemText): Deleted.
(WebCore::metadataTextTrackKindDisplayName): Deleted.
(WebCore::metadataTextTrackWithoutLabelMenuItemText): Deleted.
(WebCore::textTrackCountryAndLanguageMenuItemText): Deleted.
(WebCore::textTrackLanguageMenuItemText): Deleted.
(WebCore::closedCaptionKindTrackDisplayName): Deleted.
(WebCore::closedCaptionTrackMenuItemText): Deleted.
(WebCore::sdhTrackKindDisplayName): Deleted.
(WebCore::sdhTrackMenuItemText): Deleted.
(WebCore::easyReaderKindDisplayName): Deleted.
(WebCore::easyReaderTrackMenuItemText): Deleted.
(WebCore::forcedTrackKindDisplayName): Deleted.
(WebCore::forcedTrackMenuItemText): Deleted.
(WebCore::audioDescriptionTrackSuffixText): Deleted.

  • en.lproj/Localizable.strings:

Clean up localized string functions related to media controls.

LayoutTests:

  • media/modern-media-controls/tracks-support/sorted-by-user-preferred-languages-expected.txt:
9:26 AM Changeset in webkit [278201] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

Unreviewed, reverting r278196.
https://bugs.webkit.org/show_bug.cgi?id=226379

Causes asserts in layoutformattingcontext

Reverted changeset:

"[LFC] Transition containing block for loops to range loops"
https://bugs.webkit.org/show_bug.cgi?id=226315
https://trac.webkit.org/changeset/278196

9:24 AM Changeset in webkit [278200] by commit-queue@webkit.org
  • 9 edits
    2 deletes in trunk

Unreviewed, reverting r278199.
https://bugs.webkit.org/show_bug.cgi?id=226378

Causes asserts in layoutformattingcontext

Reverted changeset:

"[LFC][TFC] Do not include vertical spacing when resolving
percent height for table content"
https://bugs.webkit.org/show_bug.cgi?id=226365
https://trac.webkit.org/changeset/278199

8:59 AM Changeset in webkit [278199] by Alan Bujtas
  • 9 edits
    2 adds in trunk

[LFC][TFC] Do not include vertical spacing when resolving percent height for table content
https://bugs.webkit.org/show_bug.cgi?id=226365

Source/WebCore:

Reviewed by Antti Koivisto.

<table style="height: 100px; border-spacing: 10px;"><tr><td style="height: 100%"></td></tr></table>
The <td>'s 100% height is resolved against 100px - (2 * 10px) -> 80px;

Test: fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::TableFormattingContext):

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::TableFormattingGeometry):
(WebCore::Layout::TableFormattingGeometry::computedCellBorder const):

  • layout/formattingContexts/table/TableFormattingGeometry.h:

(WebCore::Layout::TableFormattingGeometry::formattingContext const):

  • layout/formattingContexts/table/TableFormattingQuirks.cpp:

(WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

  • layout/formattingContexts/table/TableFormattingQuirks.h:

(WebCore::Layout::TableFormattingQuirks::formattingContext const):

LayoutTests:

Reviewed by Antti Koivisto.

  • TestExpectations: WebKit table layout don't resolve the height percent properly when border spacing is present.
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html: Added.
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html: Added.
8:56 AM Changeset in webkit [278198] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[WPE] Correctly compute wheel event phase for 2D axis events
https://bugs.webkit.org/show_bug.cgi?id=226370

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-05-28
Reviewed by Adrian Perez de Castro.

2D-capable wpe_input_axis_event objects don't have usable axis and delta
values set on the base struct, but keep all that information on the more
detailed wpe_input_axis_2d_event struct.

For such events, the correct phase then has to be special-cased,
otherwise the default determination marks both axes as inactive and only
PhaseEnded events are dispatched into the engine.

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::m_backend):

8:50 AM Changeset in webkit [278197] by eric.carlson@apple.com
  • 5 edits
    2 adds in trunk

[GPUP] [Video/Audio/Text]TrackPrivateRemote.h should use startTimeVariance
https://bugs.webkit.org/show_bug.cgi?id=226355
rdar://77326202

Reviewed by Jer Noble.

Source/WebKit:

Test: http/tests/media/hls/hls-webvtt-seek-backwards.html

  • WebProcess/GPU/media/AudioTrackPrivateRemote.h: Use configuration.startTimeVariance.
  • WebProcess/GPU/media/TextTrackPrivateRemote.h: Ditto.
  • WebProcess/GPU/media/VideoTrackPrivateRemote.h: Ditto.

LayoutTests:

  • http/tests/media/hls/hls-webvtt-seek-backwards-expected.txt: Added.
  • http/tests/media/hls/hls-webvtt-seek-backwards.html: Added.
7:20 AM Changeset in webkit [278196] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC] Transition containing block for loops to range loops
https://bugs.webkit.org/show_bug.cgi?id=226315

Reviewed by Antti Koivisto.

Add support for stayWithin.

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::mapTopLeftToFloatingStateRoot const):

  • layout/formattingContexts/FormattingGeometry.cpp:

(WebCore::Layout::FormattingGeometry::computedHeightValue const):

  • layout/formattingContexts/block/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isDescendantOf const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutContainingBlockChainIterator.h:

(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::begin):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::end):
(WebCore::Layout::LayoutContainingBlockChainIterator::LayoutContainingBlockChainIterator):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::LayoutContainingBlockChainIteratorAdapter):
(WebCore::Layout::containingBlockChain):

6:23 AM Changeset in webkit [278195] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

[SOUP] Implement NetworkDataTask::setPriority
https://bugs.webkit.org/show_bug.cgi?id=226371

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-05-28
Reviewed by Adrian Perez de Castro.

To update the soup message priority. In HTTP/2 soup can send a priority frame to prioritize the associated
stream.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::setPriority):

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
5:59 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
4:35 AM Changeset in webkit [278194] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Webkit doesn't calculate padding-top/-bottom in % correctly when parent has padding
https://bugs.webkit.org/show_bug.cgi?id=221202

Patch by Rob Buis <rbuis@igalia.com> on 2021-05-28
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Add test for this.

  • web-platform-tests/css/css-position/position-absolute-padding-percentage-expected.txt: Added.
  • web-platform-tests/css/css-position/position-absolute-padding-percentage.html: Added.

Source/WebCore:

Absolute positioned elements should resolve %-ge padding against containing block padding-edge:
https://drafts.csswg.org/css-position-3/#absolute-positioning-containing-block

Test: imported/w3c/web-platform-tests/css/css-position/position-absolute-padding-percentage.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::containingBlockLogicalWidthForContent const):

1:59 AM Changeset in webkit [278193] by Martin Robinson
  • 8 edits
    2 adds in trunk

More readily layout when scroll-snap properties change
https://bugs.webkit.org/show_bug.cgi?id=225950

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-change-expected.txt: Updated expectation

for newly passing test.

Source/WebCore:

Do a layout when scroll-snap properties change instead of trying
to update scroll positions without a layout.

Test: css3/scroll-snap/scroll-snap-style-change-crash.html

  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::styleDidChange): Remove code dealing with scrollports
as this is now handled by the RenderStyle diff. Now trigger a layout for scrollports
when the scrolled children change their snap properties.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::enclosingScrollableContainerForSnapping const): Made this return a non-const.

  • rendering/RenderObject.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresLayout const): Added code to handle scrollport specific
properties.

LayoutTests:

  • css3/scroll-snap/scroll-snap-style-change-crash-expected.txt: Added.
  • css3/scroll-snap/scroll-snap-style-change-crash.html: Added.
12:15 AM Changeset in webkit [278192] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

ANGLE Metal translator should always collect variables
https://bugs.webkit.org/show_bug.cgi?id=226261

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-05-28
Reviewed by Dean Jackson.

Always collect the variables when translating GLSL to Metal.
This way tests that invoke translation without SH_VARIABLES still
work.

  • src/compiler/translator/TranslatorMetalDirect.cpp:

(sh::TranslatorMetalDirect::translateImpl):

  • src/compiler/translator/TranslatorMetalDirect.h:

May 27, 2021:

10:26 PM Changeset in webkit [278191] by Wenson Hsieh
  • 7 edits in trunk/Source/WebKit

[GPU Process] Add debug logging around some shared display list codepaths
https://bugs.webkit.org/show_bug.cgi?id=226356

Reviewed by Simon Fraser.

Add logging around the shared display list processing logic between the web and GPU processes. This is the basic
set of log messages I've used in the past to triage crashes and hangs while optimizing MotionMark performance,
and should be sufficient for some basic debugging around display list code around RemoteRenderingBackend(Proxy).

  • GPUProcess/graphics/RemoteImageBuffer.h:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):

Log when wakeup messages are sent by the web process and received by the GPU process.

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • Platform/Logging.h:
  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::waitForDidFlushWithTimeout):

Log when synchronous flushes are performed, as well as whether they time out.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::sendWakeupMessage):
(WebKit::RemoteRenderingBackendProxy::createItemBuffer):

Log whenever new display list shared memory is created, and also when display lists are reused (additionally
logging the remaining capacity on reused display lists).

10:10 PM Changeset in webkit [278190] by Wenson Hsieh
  • 23 edits
    3 adds in trunk/Source

[macOS] Show context menu when clicking on data detection results in image overlays
https://bugs.webkit.org/show_bug.cgi?id=226274
rdar://75504956

Reviewed by Tim Horton and Aditya Keerthi.

Source/WebCore:

Add a client hook to allow ImageOverlayController to call out into the WebKit client layer when a data detector
button (with a corresponding DDScannerResult) is clicked. See WebKit ChangeLog for more details.

  • WebCore.xcodeproj/project.pbxproj:
  • page/ChromeClient.h:

(WebCore::ChromeClient::handleClickForDataDetectionResult):

  • page/cocoa/DataDetectorElementInfo.h: Added.

Introduce a struct that wraps a data detection result and the accompanying element bounding rect, mainly so that
we have a C++ struct we can plumb through the client layers (rather than directly passing Objective-C objects
around).

  • page/mac/ImageOverlayControllerMac.mm:

(WebCore::ImageOverlayController::handleDataDetectorAction):

Source/WebCore/PAL:

Add declarations for some SPI on RVItem and RVPresenter. See WebKit for more information about where these are
used.

  • pal/spi/cocoa/RevealSPI.h:

Source/WebKit:

Implement a WebKit2 client hook to handle a click over a data detection result by using the Reveal framework to
collect and present a context menu. See below for more details.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<DataDetectorElementInfo>::encode):
(IPC::ArgumentCoder<DataDetectorElementInfo>::decode):

  • Shared/WebCoreArgumentCoders.h:

Add encoding and decoding support for DataDetectorElementInfo.

  • SourcesCocoa.txt:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::handleClickForDataDetectionResult):

  • UIProcess/Cocoa/WebViewImpl.h:

(WebKit::WebViewImpl::view const):

Add a helper method to grab the view (either a WKView or WKWebView) from a WebViewImpl.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::handleClickForDataDetectionResult):

Create and present a new WKRevealItemPresenter using the DDScannerResult.

(WebKit::WebViewImpl::didFinishPresentation):

  • UIProcess/PageClient.h:

(WebKit::PageClient::handleClickForDataDetectionResult):

Add more plumbing through the UI process to handle clicking on a data detection result.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::handleClickForDataDetectionResult):

  • UIProcess/mac/WKRevealItemPresenter.h: Added.
  • UIProcess/mac/WKRevealItemPresenter.mm: Added.

Add a helper class that takes an RVItem and is capable of presenting a context menu for the item, on behalf of
WebViewImpl. For the time being, this is only used on macOS (and thus, directly holds a WeakPtr to a
WebViewImpl). However, we may want to use this in the future for Mac Catalyst as well, in which case we should
make this work via a generic WKRevealItemPresenterDelegate protocol instead.

(-[WKRevealItemPresenter initWithWebViewImpl:item:frame:menuLocation:]):
(-[WKRevealItemPresenter showContextMenu]):
(-[WKRevealItemPresenter _callDidFinishPresentationIfNeeded]):

Call out to the WebViewImpl to reset its current reveal item presenter after we've finished presentation. This
happens either after we've dismissed the context menu (if no item is highlighted), or after we've finished
highlighting the item.

(-[WKRevealItemPresenter revealContext:rectsForItem:]):
(-[WKRevealItemPresenter revealContext:shouldUseDefaultHighlightForItem:]):
(-[WKRevealItemPresenter revealContext:startHighlightingItem:]):
(-[WKRevealItemPresenter revealContext:stopHighlightingItem:]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::handleClickForDataDetectionResult):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::handleClickForDataDetectionResult):

  • WebProcess/WebPage/WebPage.h:
10:02 PM Changeset in webkit [278189] by Devin Rousso
  • 4 edits in trunk

Sampled Page Top Color: allow snapshotting of elements with CSS animations/transitions if they're paused
https://bugs.webkit.org/show_bug.cgi?id=226313
<rdar://problem/78534076>

Reviewed by Tim Horton.

Source/WebCore:

The primary concern of sampling elements with CSS animations/transitions is that it
introduces some indeterminism in when the sampling happens vs how far progressed the CSS
animation/transition is. As an example, sampling from a page with an inline <style> that
applies a CSS animation to fade in the CSS background-color from white to black is
more likely to get a color closer to black than if that same CSS was in an external
uncached resource. This wouldn't make for a great experience, so r277044 made it so that any
CSS animations/transitions caused the sampling logic to bail, regardless of the state of the
CSS animation/transition. This is only really an issue for CSS animations/transitions that
are actively running, however, not ones that have yet to run or have already finished. It's
still possible that two loads of the same page could result in different colors (or bails)
depending on how quickly the CSS animation/transition runs or (if the CSS is in an external
resource) how long the containing resource takes to load, but with this patch it's now a
binary state (sample or bail) instead of an indeterminate range of possible sampled colors.

Tests: SampledPageTopColor.HitTestBeforeCSSTransition

SampledPageTopColor.HitTestDuringCSSTransition
SampledPageTopColor.HitTestAfterCSSTransition
SampledPageTopColor.HitTestBeforeCSSAnimation
SampledPageTopColor.HitTestDuringCSSAnimation
SampledPageTopColor.HitTestAfterCSSAnimation

  • page/PageColorSampler.cpp:

(WebCore::isValidSampleLocation):
Use Styleable instead of RenderStyle to get more information about active CSS animations/transitions.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm:

(waitForSampledPageTopColorToChange): Added.
(waitForSampledPageTopColorToChangeForHTML):
(TEST.SampledPageTopColor.HitTestBeforeCSSTransition): Added.
(TEST.SampledPageTopColor.HitTestDuringCSSTransition): Added.
(TEST.SampledPageTopColor.HitTestAfterCSSTransition): Added.
(TEST.SampledPageTopColor.HitTestBeforeCSSAnimation): Added.
(TEST.SampledPageTopColor.HitTestDuringCSSAnimation): Added.
(TEST.SampledPageTopColor.HitTestAfterCSSAnimation): Added.
(TEST.SampledPageTopColor.HitTestCSSAnimation): Deleted.

9:16 PM Changeset in webkit [278188] by Said Abou-Hallawa
  • 6 edits
    2 adds in trunk

Values of keySplines control points must all be in the range 0 to 1
https://bugs.webkit.org/show_bug.cgi?id=226336

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/svg/animations/keysplines-x-limits-expected.txt:
  • web-platform-tests/svg/animations/keysplines-y-limits-expected.txt: Added.
  • web-platform-tests/svg/animations/keysplines-y-limits.html: Added.

Source/WebCore:

W3C specs:

https://svgwg.org/specs/animations/#KeySplinesAttribute

MDN documenation:

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/keySplines

Test: imported/w3c/web-platform-tests/svg/animations/keysplines-y-limits.html

  • svg/SVGAnimationElement.cpp:

(WebCore::parseKeySplines):

Source/WTF:

  • wtf/MathExtras.h:

(isInRange):
There are a least couple of implementations of this function in WebCore.
The next step is to remove the redundant code in WebCore and use this one.

7:26 PM Changeset in webkit [278187] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitcorey] Gracefully handle CNTRL-C in TaskPool
https://bugs.webkit.org/show_bug.cgi?id=226238
<rdar://problem/78472148>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:

(_BiDirectionalQueue.close): Tear-down queue objects while suppressing any logging.
(_Process.handler): Both SIGTERM and SIGINT signals should stop worker processes.
(_Process.main): Add SIGINT handler, explicitly close queue.
(TaskPool.init): Defer worker and queue construction to context manager so that we
do not have an instantiated but invalid queue if pipes are broken by children processes.
(TaskPool.enter): Construct worker processes.
(TaskPool.do): Only catch Queue.Empty exception.
(TaskPool.exit): Explicitly close queue, reset workers and queue.

7:08 PM Changeset in webkit [278186] by rmorisset@apple.com
  • 8 edits
    1 add in trunk/Source

AirAllocateStackByGraphColoring should use the optimized interference graphs from AirAllocateRegistersByGraphColoring
https://bugs.webkit.org/show_bug.cgi?id=226258

Reviewed by Phil Pizlo.

Source/JavaScriptCore:

The main change in this patch is that AirAllocateStackByGraphColoring is now using the optimized datastructures in wtf/InterferenceGraph.h.
This required templating most of it over the interference graph used (Small/Large/Huge), but I tried keeping some common parts out of the templated class to minimize the impact on compile times and binary size.

A consequence of that change is that coalescableMoves and remappedStackSlots now store indices instead of direct pointers to StackSlots, resulting in a memory reduction of about 3x as well.

Another consequence is that I had to slightly alter the way that coalescing works: instead of carefully removing the interference edges of the killed slot, we simply use mayClear() which is not guaranteed to remove anything.
I believe that this is sound, because every subsequent access to m_interference checks whether a slot has been coalesced first, so dropping these edges is purely a memory saving, but has no logical effect.

The new code was tested in a few ways:

  • running on JetStream2 with asan
  • running on JetStream2 with TEST_OPTIMIZED_INTERFERENCE_GRAPH
  • running on JetStream2 and logging the frame sizes at the end of this phase, and comparing to the results of doing the same on ToT (same average frame size)

The two functions where this code had the largest memory footprint in JetStream2 were both in tsf-wasm.
One has 751 stack slots, and had an interference graph of 2.1MB and a coalescableMoves vector of 440kB
The other has 673 stack slots, and had an interference graph of 1.9MB and a coalescableMoves vector of 421kB.
With this patch, they respectively use 79kB+146kB and 67kB+140kB
The effect on the rest of JetStream2 is less likely to matter as few functions used more than a few dozens of kB in this phase, but in percentages are just as huge.

More importantly (and the reason I wrote this patch in the first place), I checked mruby-wasm.aotoki.dev which with a few other pages forced us to lower Options::maximumTmpsForGraphColoring because of jetsams.
It has two massive functions that reach this phase if I increase Options::maximumTmpsForGraphColoring:

  • about 6k stack slots -> 215MB + 6MB (interference graph + coalescableMoves)
  • about 9k stack slots -> 395MB + 4MB

After this patch, they respectively use 4.5MB+2MB and 9MB+1.5MB, or roughly a 40x improvement.
Combined with the recent improvements to the register allocator, I hope to be able to increase Options::maximumTmpsForGraphColoring soon (in a different patch for easier bisection if either cause a perf regression).
This would be helpful, since its lowering cratered our performance on some other wasm application by 8x.

In terms of compile times, this patch lowered the time spent in AllocateStackByGraphColoring over the course of a run of JetStream2 from roughly 350ms to roughly 270ms.
This is almost certainly negligible, but at least it guarantees that it did not regress.

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:
  • b3/air/AirAllocateStackByGraphColoring.cpp:

(JSC::B3::Air::allocateStackByGraphColoring):

Source/WTF:

I moved the interference graphs datastructures from AirAllocateRegistersByGraphColoring to their own wtf/InterferenceGraph.h file.
There are three of them:

  • SmallInterferenceGraph, best for n < 400
  • LargeInterferenceGraph, for n < 216
  • HugeInterferenceGraph, for n up to 232

I also added "Iterable" versions of them, that have an operator[] method whose result you can iterate on to get all the indices which interfere with a given index.
SmallIterableInterferenceGraph is the same as the non-iterable version, but the Large and Huge versions are a bit slower than their counterparts and use 2x memory.

All of these were tested by running JetStream2 with the TEST_OPTIMIZED_INTERFERENCE_GRAPH set to 1.
This flag makes the optimized datastructures run in parallel with a reference implementation, and their results are checked for equality on every method call.
There is one small difference allowed: iteration is not guaranteed to go through elements in the same order.

I also added a clear() method to LikelyDenseUnsignedIntegerSet, and added the NotNull flag to its various uses of placement new.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/HashSet.h:

(WTF::W>::memoryUse const):

  • wtf/InterferenceGraph.h: Added.

(WTF::InterferenceBitVector::contains):
(WTF::InterferenceBitVector::addAndReturnIsNewEntry):
(WTF::InterferenceBitVector::add):
(WTF::InterferenceBitVector::clear):
(WTF::InterferenceBitVector::mayClear):
(WTF::InterferenceBitVector::setMaxIndex):
(WTF::InterferenceBitVector::forEach):
(WTF::InterferenceBitVector::size const):
(WTF::InterferenceBitVector::memoryUse const):
(WTF::InterferenceBitVector::dumpMemoryUseInKB const):
(WTF::InterferenceBitVector::Iterable::iterator::operator++):
(WTF::InterferenceBitVector::Iterable::iterator::operator* const):
(WTF::InterferenceBitVector::Iterable::iterator::operator== const):
(WTF::InterferenceBitVector::Iterable::iterator::operator!= const):
(WTF::InterferenceBitVector::Iterable::begin const):
(WTF::InterferenceBitVector::Iterable::end const):
(WTF::InterferenceBitVector::operator[] const):
(WTF::InterferenceBitVector::index const):
(WTF::InterferenceVector::contains):
(WTF::InterferenceVector::addAndReturnIsNewEntry):
(WTF::InterferenceVector::add):
(WTF::InterferenceVector::clear):
(WTF::InterferenceVector::mayClear):
(WTF::InterferenceVector::setMaxIndex):
(WTF::InterferenceVector::forEach):
(WTF::InterferenceVector::size const):
(WTF::InterferenceVector::memoryUse const):
(WTF::InterferenceVector::dumpMemoryUseInKB const):
(WTF::InterferenceVector::Iterable::begin const):
(WTF::InterferenceVector::Iterable::end const):
(WTF::InterferenceVector::operator[] const):
(WTF::UndirectedEdgesDuplicatingAdapter::contains):
(WTF::UndirectedEdgesDuplicatingAdapter::addAndReturnIsNewEntry):
(WTF::UndirectedEdgesDuplicatingAdapter::add):
(WTF::UndirectedEdgesDuplicatingAdapter::clear):
(WTF::UndirectedEdgesDuplicatingAdapter::mayClear):
(WTF::UndirectedEdgesDuplicatingAdapter::setMaxIndex):
(WTF::UndirectedEdgesDuplicatingAdapter::forEach):
(WTF::UndirectedEdgesDuplicatingAdapter::size const):
(WTF::UndirectedEdgesDuplicatingAdapter::memoryUse const):
(WTF::UndirectedEdgesDuplicatingAdapter::dumpMemoryUseInKB const):
(WTF::UndirectedEdgesDuplicatingAdapter::operator[] const):
(WTF::UndirectedEdgesDedupAdapter::contains):
(WTF::UndirectedEdgesDedupAdapter::addAndReturnIsNewEntry):
(WTF::UndirectedEdgesDedupAdapter::add):
(WTF::UndirectedEdgesDedupAdapter::clear):
(WTF::UndirectedEdgesDedupAdapter::mayClear):
(WTF::UndirectedEdgesDedupAdapter::setMaxIndex):
(WTF::UndirectedEdgesDedupAdapter::forEach):
(WTF::UndirectedEdgesDedupAdapter::size const):
(WTF::UndirectedEdgesDedupAdapter::memoryUse const):
(WTF::UndirectedEdgesDedupAdapter::dumpMemoryUseInKB const):
(WTF::InterferenceHashSet::contains):
(WTF::InterferenceHashSet::addAndReturnIsNewEntry):
(WTF::InterferenceHashSet::add):
(WTF::InterferenceHashSet::clear):
(WTF::InterferenceHashSet::setMaxIndex):
(WTF::InterferenceHashSet::forEach):
(WTF::InterferenceHashSet::size const):
(WTF::InterferenceHashSet::memoryUse const):
(WTF::InterferenceHashSet::dumpMemoryUseInKB const):
(WTF::InstrumentedInterferenceGraph::contains):
(WTF::InstrumentedInterferenceGraph::addAndReturnIsNewEntry):
(WTF::InstrumentedInterferenceGraph::add):
(WTF::InstrumentedInterferenceGraph::clear):
(WTF::InstrumentedInterferenceGraph::mayClear):
(WTF::InstrumentedInterferenceGraph::setMaxIndex):
(WTF::InstrumentedInterferenceGraph::forEach):
(WTF::InstrumentedInterferenceGraph::size const):
(WTF::InstrumentedInterferenceGraph::memoryUse const):
(WTF::InstrumentedInterferenceGraph::dumpMemoryUseInKB const):
(WTF::InstrumentedIterableInterferenceGraph::Iterable::Iterable):
(WTF::InstrumentedIterableInterferenceGraph::Iterable::begin const):
(WTF::InstrumentedIterableInterferenceGraph::Iterable::end const):
(WTF::InstrumentedIterableInterferenceGraph::operator[] const):

  • wtf/LikelyDenseUnsignedIntegerSet.h:

(WTF::LikelyDenseUnsignedIntegerSet::LikelyDenseUnsignedIntegerSet):
(WTF::LikelyDenseUnsignedIntegerSet::clear):
(WTF::LikelyDenseUnsignedIntegerSet::add):
(WTF::LikelyDenseUnsignedIntegerSet::estimateHashSetSize):
(WTF::LikelyDenseUnsignedIntegerSet::transitionToHashSet):
(WTF::LikelyDenseUnsignedIntegerSet::transitionToBitVector):

6:26 PM Changeset in webkit [278185] by Darin Adler
  • 1470 edits in trunk

Next step toward using std::optional directly instead of through WTF::Optional typedef
https://bugs.webkit.org/show_bug.cgi?id=226280

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • <many files>: Accept the renaming done by do-webcore-rename.
  • yarr/YarrSyntaxChecker.cpp: Since the style checker complained about this file,

tweaked style to make it happy after the renaming done by do-webcore-rename, and
also hand-updated Optional to std::optional as long as we were touching it.

Source/WebCore:

  • <many files>: Accept the renaming done by do-webcore-rename.
  • Modules/webauthn/fido/DeviceRequestConverter.h: Since style checker complained

about the names of some arguments, fixed them, and also hand-updated Optional to
std::optional as long as we were touching it.

  • loader/EmptyClients.cpp: Since style checker complained about the mix of

WEBCORE_EXPORT and inlined functions, moved them out of line, and
also hand-updated Optional to std::optional as long as we were touching it.
Also removed is<EmptyFrameLoaderClient>().

  • loader/EmptyFrameLoaderClient.h: Ditto.

Source/WebCore/PAL:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebDriver:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebKit:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebKitLegacy:

  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::diskUsageForOrigin): Accept the renaming done by do-webcore-rename.

Source/WebKitLegacy/mac:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebKitLegacy/win:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WTF:

  • <many files>: Accept the renaming done by do-webcore-rename.
  • wtf/Optional.h: Remove WTF::nullopt_t and WTF::makeOptional.
  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::mapHostName): Convert from nullopt to std::nullopt.

Tools:

  • Scripts/do-webcore-rename: Use script to rename valueOr, WTF::nullopt, WTF::nullopt_t,

WTF::Optional, WTF::makeOptional, and makeOptional. Other renamings can't necessarily
be done by the script and so will be done in later passes.

  • <many files>: Accept the renaming done by do-webcore-rename.
6:07 PM Changeset in webkit [278184] by Jonathan Bedard
  • 3 edits in trunk/Tools

[webkitpy] Use existing signal handler when printing stacktrace
https://bugs.webkit.org/show_bug.cgi?id=226236
<rdar://problem/78471882>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/common/interrupt_debugging.py:

(log_stack_trace_on_signal): Use the same implementation for SIGTERM and SIGINT signals, call existing
handler after logging stack trace.
(log_stack_trace_on_term): Deleted.
(log_stack_trace_on_ctrl_c): Deleted.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(main): Use the new log_stack_trace_on_signal function.

5:40 PM Changeset in webkit [278183] by Devin Rousso
  • 7 edits in trunk/Source/WebKit

[iOS] contextmenu hints don't follow scrolling inside <iframe>
https://bugs.webkit.org/show_bug.cgi?id=226055

Reviewed by Tim Horton.

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

(-[WKContentView _didScroll]):
(-[WKContentView _removeContainerForContextMenuHintPreviews]):
(-[WKContentView _updateFrameOfContainerForContextMenuHintPreviewsIfNeeded]): Added.
(-[WKContentView _updateTargetedPreviewScrollViewUsingContainerScrollingNodeID:]): Added.
(-[WKContentView _createTargetedContextMenuHintPreviewForFocusedElement]): Added.
(-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]): Added.
(-[WKContentView overridePositionTrackingViewForTargetedPreviewIfNecessary:containerScrollingNodeID:]): Deleted.
Save the UIScrollView containing the target of the contextmenu. Whenever any view is
scrolled, adjust the frame of the _contextMenuHintContainerView so that the contextmenu
hint moves by the amount of scrolling that's happened since the contextmenu hint was shown.

  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID const):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollView const): Added.
ScrollingTreeFrameScrollingNodeRemoteIOS also has a corresponding UIScrollView.

  • Platform/spi/ios/UIKitSPI.h:

Remove declaration for no-longer-used SPI.

4:29 PM Changeset in webkit [278182] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[MacOS Wk1] imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226360

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:07 PM Changeset in webkit [278181] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Silence reports about 'com.apple.runningboard'
https://bugs.webkit.org/show_bug.cgi?id=226357
<rdar://problem/76144219>

Reviewed by Per Arne Vollan.

We blocked access to 'com.apple.runningboard' from the WebContent process in Bug 209933 (about a year ago). Since
then, the only telemetry we have received has been for a benign Accessibility call that fails closed in way that
does not impact the features of the Accessibility Framework used inside the WebContent process.

We should silence this report to avoid spending time symbolicating and generating traces.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
4:03 PM Changeset in webkit [278180] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

[Hardening] Use a RELEASE_ASSERT for SharedBufferDataView constructor
https://bugs.webkit.org/show_bug.cgi?id=226346
<rdar://problem/78115298>

Reviewed by Ryosuke Niwa.

We have a DEBUG assert in the constructor for SharedBufferDataView. Debug test show that we don't hit this during normal
operation, and it's not a hot code path. We should make it a RELEASE_ASSERT.

  • platform/SharedBuffer.cpp:

(WebCore::SharedBufferDataView::SharedBufferDataView):

2:55 PM Changeset in webkit [278179] by sihui_liu@apple.com
  • 9 edits in trunk/Source

Abandon pending tasks on background thread when WebIDBServer is closed
https://bugs.webkit.org/show_bug.cgi?id=226295

Reviewed by Chris Dumez.

Source/WebCore:

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Disable threading check as we may

abort transactions on the main thread.
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):

Source/WebKit:

When WebIDBServer is closed, it means there is no open connection to client, so we don't need to handle pending
tasks. We can ditch them by killing the CrossThreadQueue. For ongoing task, it can be blocked on quota check, so
let's just stop database activities on the main thread to make sure database lock is released.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::close):

  • NetworkProcess/IndexedDB/WebIDBServer.h:

Source/WTF:

Make the wait end with either a new message or queue being killed.

  • wtf/CrossThreadQueue.h:

(WTF::CrossThreadQueue<DataType>::waitForMessage):

  • wtf/CrossThreadTask.h:

(WTF::CrossThreadTask::operator bool const):

  • wtf/CrossThreadTaskHandler.cpp:

(WTF::CrossThreadTaskHandler::taskRunLoop):

2:35 PM Changeset in webkit [278178] by don.olmstead@sony.com
  • 6 edits in trunk

[CMake] Add check for timingsafe_bcmp
https://bugs.webkit.org/show_bug.cgi?id=226347

Reviewed by Chris Dumez.

.:

Adds a symbol check for timingsafe_bcmp and sets HAVE_TIMINGSAFE_BCMP accordingly in the
cmakeconfig.h.

  • Source/cmake/OptionsCommon.cmake:

Source/WTF:

Use HAVE(TIMINGSAFE_BCMP) in CryptographicUtilities code. Set its value in PlatformHave for
platforms not using CMake.

  • wtf/CryptographicUtilities.cpp:
  • wtf/CryptographicUtilities.h:
  • wtf/PlatformHave.h:
2:34 PM Changeset in webkit [278177] by commit-queue@webkit.org
  • 7 edits in trunk

Increase NumberToStringBuffer to account for negative number
https://bugs.webkit.org/show_bug.cgi?id=226014

Patch by Mikhail R. Gadelha <mikhail.ramalho@gmail.com> on 2021-05-27
Reviewed by Robin Morisset.

In r250389, NumberToStringBuffer length was increased from 96 to 123 because:

<21 digits> + decimal point + <100 digits> + null char = 123.

however,

a = -100000000000000000000
a.toFixed(100)

is a valid conversion and it is 124 chars long, because of the "-" sign.

So this patch increases the length of NumberToStringBuffer to 124 and adds new
test cases.

Source/WTF:

Reviewed by Ryosuke Niwa.

  • wtf/dtoa.h:

LayoutTests:

  • js/dom/number-tofixed-expected.txt:
  • js/dom/script-tests/number-tofixed.js:
  • js/kde/Number-expected.txt:
  • js/kde/script-tests/Number.js:
1:48 PM Changeset in webkit [278176] by achristensen@apple.com
  • 4 edits in trunk/Source

Revert r277344
https://bugs.webkit.org/show_bug.cgi?id=225602
<rdar://78411776>

Source/WebKit:

It caused more sandbox issues. We are going to see if we can just remove the connection killing, but first we revert the cause of problems.

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::terminateWithReason):

Source/WTF:

  • wtf/PlatformHave.h:
1:25 PM Changeset in webkit [278175] by Wenson Hsieh
  • 11 edits
    1 copy
    1 add in trunk/Source

Refactor some data detector code in WebCore::Frame
https://bugs.webkit.org/show_bug.cgi?id=226267

Reviewed by Andy Estes and Devin Rousso.

Source/WebCore:

In preparation for supporting data detection in image overlays, this patch refactors some existing data detector
logic inside (and adjacent to) Frame. See comments below for more details.

  • WebCore.xcodeproj/project.pbxproj:
  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::canPresentDataDetectorsUIForElement):

Use DataDetectionResultsStorage instead of grabbing the array of scanner results directly from Frame.

(WebCore::DataDetection::createElementForImageOverlay):

Add a helper method to create a data detector element for image overlays; this grabs a scanner result from the
given ImageExtractionDataDetectorInfo, adds it to the element's document's frame, and then sets the newly
created element's "x-apple-data-detectors-result" attribute to the new identifier value. The main reason we do
this is to avoid having HTMLElement directly handle DDScannerResult (and instead delegate out to platform-
specific helpers in DataDetection).

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

Use the new helper function above.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

Use DataDetectionResultsStorage instead of setting the array of scanner results directly on Frame.

  • page/Frame.cpp:

(WebCore::Frame::dataDetectionResults):

  • page/Frame.h:

We currently store a list of document-wide data detection results (Objective-C DDScannerResult objects)
directly on Frame. For image overlays, I need to store a map of identifiers to scanner results in a similar
fashion. Rather than add more Objective-C code on Frame, it's better to instead move this logic out into a
separate C++ class, DataDetectionResultsStorage, that wraps both the document-level array of DDScannerResults,
as well as the new map of ImageOverlayDataDetectionResultIdentifier => DDScannerResult specifically for data
detector results inside image overlays.

  • page/cocoa/DataDetectionResultsStorage.h: Copied from Source/WebCore/editing/cocoa/DataDetection.h.

(WebCore::DataDetectionResultsStorage::setDocumentLevelResults):
(WebCore::DataDetectionResultsStorage::documentLevelResults const):

Move the existing m_dataDetectionResults NSArray on Frame out into the storage helper class, as
m_documentLevelResults. As its name suggests, this array stores data detection results gathered by running
data detection over the entire document.

(WebCore::DataDetectionResultsStorage::imageOverlayDataDetectionResult):
(WebCore::DataDetectionResultsStorage::addImageOverlayDataDetectionResult):

Add a new map of ImageOverlayDataDetectionResultIdentifier to DDScannerResult for storing scanner results
specific to image overlay content. Using a separate data structure here prevents image overlay data detector
results from getting blown away when document-level data detection finishes and sets document-wide results on
the frame.

  • page/cocoa/ImageOverlayDataDetectionResultIdentifier.h: Added.

Add an identifier type that we can use to look up data detection results in image overlay elements in Frame's
data detection result storage.

Source/WebKit:

See WebCore/ChangeLog for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::removeDataDetectedLinks):
(WebKit::WebPage::detectDataInAllFrames):

Use DataDetectionResultsStorage instead of setting the array of scanner results directly on Frame.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::dataDetectorLinkPositionInformation):

1:06 PM Changeset in webkit [278174] by Fujii Hironori
  • 4 edits
    1 move
    2 deletes in trunk

[run-webkit-tests][Win] Strip PHP support from webserver
https://bugs.webkit.org/show_bug.cgi?id=226287

Reviewed by Jonathan Bedard.

Tools:

We don't have any PHP tests now.

  • Scripts/webkitpy/port/base.py:

(Port._apache_version):
(Port._apache_config_file_name_for_platform):
(Port._win_php_version): Deleted.

  • Scripts/webkitpy/port/port_testcase.py:

LayoutTests:

  • http/conf/libphp4.dll: Removed.
  • http/conf/win-httpd-2.4-php5.conf: Removed.
  • http/conf/win-httpd-2.4.conf: Renamed from LayoutTests/http/conf/win-httpd-2.4-php7.conf.
12:51 PM Changeset in webkit [278173] by commit-queue@webkit.org
  • 5 edits in trunk

[css-grid] Add discrete animation support for grid-template-columns|rows
https://bugs.webkit.org/show_bug.cgi?id=226174

LayoutTests/imported/w3c:

Patch by Ziran Sun <Ziran Sun> on 2021-05-27
Reviewed by Antoine Quint.

  • web-platform-tests/css/css-grid/animation/grid-template-columns-interpolation-expected.txt:
  • web-platform-tests/css/css-grid/animation/grid-template-rows-interpolation-expected.txt:

Source/WebCore:

For CSSGridTemplateTemplate|Row, the animation wrapper setter needs to check a few style
settings such as gridColumns|gridRows, gridAutoRepeatColumns|gridAutoRepeatRows etc. to be
inline with the style specified. So does the getter.

Patch by Ziran Sun <Ziran Sun> on 2021-05-27
Reviewed by Antoine Quint.

This change has improved the two exising animation related grid-template-* tests.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

12:14 PM Changeset in webkit [278172] by timothy_horton@apple.com
  • 7 edits
    3 adds in trunk

Introduce BifurcatedGraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=226318

Reviewed by Sam Weinig.

Source/WebCore:

New test: BifurcatedGraphicsContextTests.BasicBifurcatedContext

Introduce a GraphicsContext subclass that forwards painting
to two arbitrary child GraphicsContexts. This can be used, for example,
to paint into a bitmap and display list simultaneously.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/BifurcatedGraphicsContext.cpp: Added.

(WebCore::BifurcatedGraphicsContext::BifurcatedGraphicsContext):
(WebCore::BifurcatedGraphicsContext::~BifurcatedGraphicsContext):
(WebCore::BifurcatedGraphicsContext::hasPlatformContext const):
(WebCore::BifurcatedGraphicsContext::platformContext const):
(WebCore::BifurcatedGraphicsContext::save):
(WebCore::BifurcatedGraphicsContext::restore):
(WebCore::BifurcatedGraphicsContext::drawRect):
(WebCore::BifurcatedGraphicsContext::drawLine):
(WebCore::BifurcatedGraphicsContext::drawEllipse):
(WebCore::BifurcatedGraphicsContext::applyStrokePattern):
(WebCore::BifurcatedGraphicsContext::applyFillPattern):
(WebCore::BifurcatedGraphicsContext::drawPath):
(WebCore::BifurcatedGraphicsContext::fillPath):
(WebCore::BifurcatedGraphicsContext::strokePath):
(WebCore::BifurcatedGraphicsContext::beginTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::endTransparencyLayer):
(WebCore::BifurcatedGraphicsContext::applyDeviceScaleFactor):
(WebCore::BifurcatedGraphicsContext::fillRect):
(WebCore::BifurcatedGraphicsContext::fillRoundedRectImpl):
(WebCore::BifurcatedGraphicsContext::fillRectWithRoundedHole):
(WebCore::BifurcatedGraphicsContext::clearRect):
(WebCore::BifurcatedGraphicsContext::strokeRect):
(WebCore::BifurcatedGraphicsContext::fillEllipse):
(WebCore::BifurcatedGraphicsContext::strokeEllipse):
(WebCore::BifurcatedGraphicsContext::setIsCALayerContext):
(WebCore::BifurcatedGraphicsContext::isCALayerContext const):
(WebCore::BifurcatedGraphicsContext::setIsAcceleratedContext):
(WebCore::BifurcatedGraphicsContext::renderingMode const):
(WebCore::BifurcatedGraphicsContext::clip):
(WebCore::BifurcatedGraphicsContext::clipOut):
(WebCore::BifurcatedGraphicsContext::clipPath):
(WebCore::BifurcatedGraphicsContext::clipBounds const):
(WebCore::BifurcatedGraphicsContext::setLineCap):
(WebCore::BifurcatedGraphicsContext::setLineDash):
(WebCore::BifurcatedGraphicsContext::setLineJoin):
(WebCore::BifurcatedGraphicsContext::setMiterLimit):
(WebCore::BifurcatedGraphicsContext::drawNativeImage):
(WebCore::BifurcatedGraphicsContext::drawPattern):
(WebCore::BifurcatedGraphicsContext::scale):
(WebCore::BifurcatedGraphicsContext::rotate):
(WebCore::BifurcatedGraphicsContext::translate):
(WebCore::BifurcatedGraphicsContext::concatCTM):
(WebCore::BifurcatedGraphicsContext::setCTM):
(WebCore::BifurcatedGraphicsContext::getCTM const):
(WebCore::BifurcatedGraphicsContext::roundToDevicePixels):
(WebCore::BifurcatedGraphicsContext::drawFocusRing):
(WebCore::BifurcatedGraphicsContext::drawLinesForText):
(WebCore::BifurcatedGraphicsContext::drawDotsForDocumentMarker):
(WebCore::BifurcatedGraphicsContext::setURLForRect):
(WebCore::BifurcatedGraphicsContext::setDestinationForRect):
(WebCore::BifurcatedGraphicsContext::addDestinationAtPoint):
(WebCore::BifurcatedGraphicsContext::supportsInternalLinks const):
(WebCore::BifurcatedGraphicsContext::updateState):
(WebCore::BifurcatedGraphicsContext::deprecatedPrivateContext const):

  • platform/graphics/BifurcatedGraphicsContext.h: Added.

Source/WebKit:

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:

(WebKit::CGDisplayListImageBufferBackend::create):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp: Added.

(TestWebKitAPI::TEST):

11:45 AM Changeset in webkit [278171] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.33.1

WPE WebKit 2.33.1

11:45 AM Changeset in webkit [278170] by Adrian Perez de Castro
  • 4 edits in trunk

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

.:

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

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.33.1
10:56 AM Changeset in webkit [278169] by Peng Liu
  • 4 edits in trunk

Calling -[WKWebView _closeAllMediaPresentations] crashes
https://bugs.webkit.org/show_bug.cgi?id=226305

Reviewed by Chris Dumez.

Source/WebKit:

Provide an empty completion handler to fix a crash.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _closeAllMediaPresentations]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCloseAllMediaPresentations.mm:

(TEST):

10:54 AM Changeset in webkit [278168] by Devin Rousso
  • 7 edits in trunk

Use NSLocale SPI for comparing language identifiers instead of string comparison
https://bugs.webkit.org/show_bug.cgi?id=226252

Reviewed by Wenson Hsieh.

Source/WTF:

The existing indexOfBestMatchingLanguageInList logic uses (sub)string comparison of BCP47
language tags (e.g. looking for a '-' and comparing the substring before and after in the
input language and each item in the language list). While this does work for some languages,
it's really not the correct way to compare BCP47 language tags. Additionally, it basically
ignores the text after the first '-', unless there's an exact match with the input
language. This leads to "zh-CN" and "zh-HK" being considered a (not exact) match, which
isn't ideal.

  • wtf/Language.cpp:
  • wtf/cocoa/LanguageCocoa.mm:

(WTF::indexOfBestMatchingLanguageInList): Added.

  • wtf/spi/cocoa/NSLocaleSPI.h:

LayoutTests:

  • media/modern-media-controls/tracks-support/sorted-by-user-preferred-languages.html:
  • media/modern-media-controls/tracks-support/sorted-by-user-preferred-languages-expected.txt:
10:42 AM Changeset in webkit [278167] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Add animations to GraphicsLayer logging output
https://bugs.webkit.org/show_bug.cgi?id=226303

Reviewed by Tim Horton.

Log animations in GraphicsLayer, so that it shows up in the "Layers" log channel,
and in showGraphicsLayerTree() output.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::operator<<):
(WebCore::GraphicsLayerCA::dumpAnimations):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties const):

  • platform/graphics/ca/GraphicsLayerCA.h:
10:07 AM Changeset in webkit [278166] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Pass frame ref during navigationPolicyCompletionHandler
https://bugs.webkit.org/show_bug.cgi?id=226268
<rdar://problem/78512383>

Reviewed by Ryosuke Niwa.

Pass the active frame to the navigationPolicyCompletionHandler lambda as a Ref to
ensure it is kept alive during the policy check and subsequent steps.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

10:07 AM Changeset in webkit [278165] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

[GTK4] Navigation swipe snapshot always times out
https://bugs.webkit.org/show_bug.cgi?id=226332

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-05-27
Reviewed by Michael Catanzaro.

Enable ViewGestureGeometryCollector for GTK4 as well.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::close):
(WebKit::WebPage::mainFrameDidLayout):

  • WebProcess/WebPage/WebPage.h:
6:27 AM Changeset in webkit [278164] by Alan Bujtas
  • 4 edits
    2 adds in trunk

REGRESSION (r244434) Dispatch intrinsicContentsSizeChanged on the main frame only
https://bugs.webkit.org/show_bug.cgi?id=226311

Reviewed by Tim Horton.

Source/WebCore:

While the Mail version of the content autosizing runs on both the main frame and the subframe(s),
the content size reporting should only happen on the main frame. The client is only interested
in the enclosing size of the content (also the API to retrieve the information is per-WKWebView,
it doesn't expose this information on a frame-by-frame basis).

Test: fast/dynamic/mail-autosize-with-iframe.html

  • page/FrameView.cpp:

(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::enableFixedWidthAutoSizeMode):
(WebCore::FrameView::enableSizeToContentAutoSizeMode):
(WebCore::FrameView::enableAutoSizeMode):

LayoutTests:

  • fast/dynamic/mail-autosize-with-iframe-expected.txt: Added.
  • fast/dynamic/mail-autosize-with-iframe.html: Added.
6:26 AM Changeset in webkit [278163] by weinig@apple.com
  • 7 edits
    2 moves
    1 add
    4 deletes in trunk/Source/WebCore

Merge WorkerGlobalScope+Caches.idl and DOMWindow+Caches.idl into a single WindowOrWorkerGlobalScope+Caches.idl
https://bugs.webkit.org/show_bug.cgi?id=226271

Reviewed by Darin Adler.

Address FIXMEs in both WorkerGlobalScope+Caches.idl and DOMWindow+Caches.idl by
merging them into a single WindowOrWorkerGlobalScope+Caches.idl, matching the spec
langauge more closely.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/cache/DOMWindow+Caches.idl: Removed.
  • Modules/cache/DOMWindowCaches.cpp: Removed.
  • Modules/cache/DOMWindowCaches.h: Removed.
  • Modules/cache/WindowOrWorkerGlobalScope+Caches.idl: Added.
  • Modules/cache/WindowOrWorkerGlobalScopeCaches.cpp: Added.

(WebCore::DOMWindowCaches::supplementName):
(WebCore::WorkerGlobalScopeCaches::supplementName):
(WebCore::DOMWindowCaches::DOMWindowCaches):
(WebCore::DOMWindowCaches::from):
(WebCore::DOMWindowCaches::caches const):
(WebCore::WorkerGlobalScopeCaches::WorkerGlobalScopeCaches):
(WebCore::WorkerGlobalScopeCaches::from):
(WebCore::WorkerGlobalScopeCaches::caches const):
(WebCore::WindowOrWorkerGlobalScopeCaches::caches):

  • Modules/cache/WindowOrWorkerGlobalScopeCaches.h: Added.
  • Modules/cache/WorkerGlobalScope+Caches.idl: Removed.
  • Modules/cache/WorkerGlobalScopeCaches.cpp: Removed.
  • Modules/cache/WorkerGlobalScopeCaches.h: Removed.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
5:30 AM Changeset in webkit [278162] by Adrian Perez de Castro
  • 11 edits in trunk/Source

Non-unified build fixes, late May 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=226322

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • jit/JITPlan.cpp: Add missing HeapInlines.h and VMInlines.h headers.
  • jit/JITWorklist.cpp: Add missing HeapInlines.h and SlotVisitorInlines.h headers,

remove SlotVisitor.h which is now unneeded.

  • jit/JITWorklistThread.cpp: Add missing HeapInlines.h header.

Source/WebCore:

No new tests needed.

  • css/CSSGridIntegerRepeatValue.cpp: Add missing wtf/text/StringConcatenateNumbers.h

header.

  • css/CSSTimingFunctionValue.cpp: Ditto.
  • layout/formattingContexts/flex/FlexFormattingContext.h: Add missing FormattingQuirks.h

header, remove now unneeded FormattingContext.h header.

  • loader/PrivateClickMeasurement.cpp: Add missing wtf/text/StringConcatenateNumbers.h

header.

  • platform/graphics/cairo/GraphicsContextCairo.cpp: Add missing Gradient.h header.
  • platform/graphics/filters/FEMorphology.cpp: Add missing ColorTypes.h header.
5:22 AM Changeset in webkit [278161] by Wenson Hsieh
  • 7 edits in trunk/Source/WebKit

[GPU Process] Add validation when reading DisplayListSharedMemoryHeader::waitingStatus in DisplayListReaderHandle
https://bugs.webkit.org/show_bug.cgi?id=226306
rdar://78118900

Reviewed by Chris Dumez.

Store this waiting status (an enum class with three valid states) as a raw uint8_t in shared memory, rather
than an enum class. This allows us to verify that this value indicates a valid waiting status (using
isValidEnum) upon reading this flag in the GPU process, and perform a MESSAGE_CHECK in the case where it is
invalid.

  • GPUProcess/graphics/DisplayListReaderHandle.h:

(WebKit::DisplayListReaderHandle::startWaiting):
(WebKit::DisplayListReaderHandle::stopWaiting):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

  • Shared/SessionState.cpp:

(WebKit::PageState::decode):

  • Shared/SessionState.h:

Drive-by fix: remove a non-templated declaration of isValidEnum(). This is necessary in order to use
WTF::isValidEnum without the explicit WTF namespace prefix inside DisplayListReaderHandle, since WTF's
declaration of isValidEnum clashes with this declaration.

Instead of using this separate method for validating the enum, simply encode and decode the
shouldOpenExternalURLsPolicy enum using << and >> operators, respectively; this ensures that the decoded value
of shouldOpenExternalURLsPolicy is either valid, or the result will be WTF::nullopt if decoding fails or
results in an invalid enum.

  • Shared/SharedDisplayListHandle.h:
  • WebProcess/GPU/graphics/DisplayListWriterHandle.h:

(WebKit::DisplayListWriterHandle::tryToResume):

5:19 AM Changeset in webkit [278160] by Adrian Perez de Castro
  • 2 edits in trunk

Unreviewed. [WPE] Bump version numbers

  • Source/cmake/OptionsWPE.cmake:
4:49 AM Changeset in webkit [278159] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

[JSC] Implement high-level retry loop for run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=225803

Reviewed by Adrian Perez de Castro.

Now that we have information on which tests produced a result and
which tests were never heard of, introduce retry logic for the
incomplete tests. This should only modify the behavior when using
--gnu-parallel-runner.

The issue here is that the MIPS boards currently in use for JSC
testing routinely crash and, often enough, end up with filesystem
corruption and need to have their R/W storage reinitialized.

Work around this by re-executing the tests that we weren't able to get
a result for. When some tests failed to complete, go through the
process of remote initilization (copying over and unpacking the
bundle) from scratch, so that remotes that had their remoteDirectory
wiped will get back into play.

To make this more efficient, introduce in-band signaling to let
run-jsc-stress-tests know that a remote lost its state. In response,
we kill the GNU parallel process and re-initialize all boards. This
helps for buildbot workers that only have a few remote boards assigned
and apparently also works around a bug in GNU parallel 20161222
(currently the most widely deployed version) which causes it to run
out of open files and get stuck in a busy loop.

While here, make run-jsc-stress-tests more robust against corrupted
status files, i.e. ignore empty ones (observed in practice) and use a
regex to verify the contents of non-empty state files.

For consistency, use the same logic for parsing status files when
doing local runs.

In testing with two remotes, run-jsc-stress-tests was able to recover
from either one or both of its remotes rebooting and wiping their
local storage in the middle of a test run.

  • Scripts/run-jsc-stress-tests:
3:58 AM WebKitGTK/2.32.x edited by clopez@igalia.com
(diff)
3:19 AM Changeset in webkit [278158] by youenn@apple.com
  • 7 edits
    2 adds in trunk

Support H264 profiles in MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=226219
<rdar://78027944>

Reviewed by Eric Carlson.

Source/WebCore:

Use mimeType option given in MediaRecorder options to detect which H264 profile to use.
Implement this by parsing the mime type codec parameter and use the avc1.WXYZ string to compute the profile.
By default, use baseline profile, which is not VideoToolbox profile but has wider decoding support.
If profile specified by the application fails, we downgrade to baseline.

Test: http/wpt/mediarecorder/MediaRecorder-video-h264-profiles.html

  • Modules/mediarecorder/MediaRecorderProvider.cpp:

(WebCore::MediaRecorderProvider::isSupported):

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::create):
(WebCore::MediaRecorderPrivateWriter::initialize):
(WebCore::MediaRecorderPrivateWriter::setOptions): Deleted.

  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:

(WebCore::VideoSampleBufferCompressor::create):
(WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
(WebCore::VideoSampleBufferCompressor::vtProfileLevel const):
(WebCore::VideoSampleBufferCompressor::initCompressionSession):

LayoutTests:

  • http/wpt/mediarecorder/MediaRecorder-video-h264-profiles-expected.txt: Added.
  • http/wpt/mediarecorder/MediaRecorder-video-h264-profiles.html: Added.
3:01 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:56 AM Changeset in webkit [278157] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Fix crash on 32-bit big endian systems.
https://bugs.webkit.org/show_bug.cgi?id=226264

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-05-27
Reviewed by Caio Araujo Neponoceno de Lima.

This is an instance where properly offsetting was missed since
the issue was not present in 2.30 series and therefore not fixed
by r273104.

  • llint/LowLevelInterpreter32_64.asm:
2:51 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:43 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:36 AM Changeset in webkit [278156] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Transient quarter display with a HiDPI /4k screen and a 200% scaling
https://bugs.webkit.org/show_bug.cgi?id=219202

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-05-27
Reviewed by Adrian Perez de Castro.

Set the root layer transformation before syncing animations and not after.
This way we avoid having the first frame use the wrong scale on hidpi.

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):

2:18 AM Changeset in webkit [278155] by commit-queue@webkit.org
  • 6 edits in trunk/LayoutTests

MacOS WebM Format Reader returns enabled for tracks that do not have samples
https://bugs.webkit.org/show_bug.cgi?id=226078
<rdar://74048072>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-05-27
Reviewed by Jer Noble.

After r274378 the WebM format reader does not support WebM with non-disabled audio tracks
that do not have any samples.
Remove the empty audio track from all red-green.webmvp9.webm files so that WebGL
conformance tests that use the file do not fail due to this.

  • fast/canvas/webgl/resources/red-green.webmvp8.webm:
  • http/tests/webgl/1.0.2/resources/webgl_test_files/conformance/resources/red-green.webmvp8.webm:
  • webgl/1.0.3/resources/webgl_test_files/conformance/resources/red-green.webmvp8.webm:
  • webgl/2.0.0/resources/webgl_test_files/resources/red-green.webmvp8.webm:
  • webgl/resources/webgl_test_files/resources/red-green.webmvp8.webm:
2:07 AM Changeset in webkit [278154] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[SOUP] Do not disable the idle connection timeout
https://bugs.webkit.org/show_bug.cgi?id=226263

Reviewed by Sergio Villar Senin.

We disable the connection timeout in SoupSession because we implement our own timeout in WebKit, but that's not
the case for the idle connection timeout. There's no reason keep idle connection alive forever.

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession):

1:17 AM Changeset in webkit [278153] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/ANGLE

ANGLE could be compiled with "aggressive uninitialised variable" setting
https://bugs.webkit.org/show_bug.cgi?id=226260

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-05-27
Reviewed by Alexey Proskuryakov.

Turn on compiler flag to warn about uninitialized variables that might be
conditionally uninitialized. This is the same flag as upstream ANGLE uses.
Fix a spurious warning produced by this flag.
This helps in scenarios where custom targets compile ANGLE sources and
this flag set, such as tests.

  • Configurations/Base.xcconfig:
  • src/compiler/translator/TranslatorMetalDirect/FixTypeConstructors.cpp:
1:14 AM Changeset in webkit [278152] by commit-queue@webkit.org
  • 7 edits in trunk/Source/ThirdParty/ANGLE

Cherry-pick ANGLE: D3D11: Skip blits if there is no intersection of dest areas
https://bugs.webkit.org/show_bug.cgi?id=225190
<rdar://77084155>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-05-27
Reviewed by David Kilzer.

Cherry-pick ANGLE commit b574643ef28c92fcea5122dd7a72acb42a514eed
Fixes a security issue on D3D11.
Potential a correctness issue on some OpenGL drivers.
No effect on Metal, but the nodiscard part is still useful.

Upstream description:
D3D11: Skip blits if there is no intersection of dest areas

Blit11 would clip the destination rectangle with the destination size
but ignore the result. gl::ClipRectangle returns false when the
rectangles do not intersect at all, indicating the blit can be skipped.

This could lead to an out-of-bounds write to the GPU memory for the
destination texture.

Mark ClipRectangle as nodiscard to prevent future issues.

  • src/libANGLE/angletypes.h:
  • src/libANGLE/renderer/d3d/d3d11/Blit11.cpp:
  • src/libANGLE/renderer/gl/FramebufferGL.cpp:

(rx::FramebufferGL::clipSrcRegion):

  • src/libANGLE/renderer/metal/ContextMtl.mm:

(rx::ContextMtl::updateScissor):

  • src/libANGLE/renderer/vulkan/ContextVk.cpp:

(rx::ContextVk::updateScissor):

  • src/tests/gl_tests/BlitFramebufferANGLETest.cpp:

(TEST_P):

May 26, 2021:

11:42 PM Changeset in webkit [278151] by Cameron McCormack
  • 8 edits in trunk/Source

Prevent sbix glyphs from being rendered in the GPU process
https://bugs.webkit.org/show_bug.cgi?id=226159
<rdar://77231959>

Reviewed by Darin Adler.

Source/WebCore:

When GPUP canvas is enabled, the display list recorder handles sbix
glyphs by recording drawImage calls. This means that during display list
replay, we should not have any sbix glyphs in a DrawGlyphs display list
item. This patch checks for such glyphs (like we already do for SVG
glyphs) and returns early if they're found.

Manually tested. No new tests, since we'd need to add some way inject
sbix glyph IDs into display list items.

  • platform/graphics/Font.h:

(WebCore::Font::ComplexColorFormatGlyphs::hasRelevantTables const):
(WebCore::Font::ComplexColorFormatGlyphs::bitForInitialized):
(WebCore::Font::ComplexColorFormatGlyphs::bitForValue):
(WebCore::Font::ComplexColorFormatGlyphs::bitsRequiredForGlyphCount):
(WebCore::Font::ComplexColorFormatGlyphs::ComplexColorFormatGlyphs):

  • platform/graphics/coretext/FontCascadeCoreText.cpp:

(WebCore::FontCascade::drawGlyphs): Call new function that checks for
SVG and sbix glyph presence. Change release assertion to debug
assertion to avoid unnecessarily crashing the GPUP, and instead return
early in the presence of these glyphs.

  • platform/graphics/coretext/FontCoreText.cpp:

(WebCore::Font::otSVGTable const):
(WebCore::Font::ComplexColorFormatGlyphs::createWithNoRelevantTables):
(WebCore::Font::ComplexColorFormatGlyphs::createWithRelevantTablesAndGlyphCount):
(WebCore::Font::ComplexColorFormatGlyphs::hasValueFor const):
(WebCore::Font::ComplexColorFormatGlyphs::get const):
(WebCore::Font::ComplexColorFormatGlyphs::set):
(WebCore::Font::hasComplexColorFormatTables const):
(WebCore::Font::glyphsWithComplexColorFormat const):
(WebCore::Font::glyphHasComplexColorFormat const):
(WebCore::Font::findOTSVGGlyphs const):
(WebCore::Font::hasAnyComplexColorFormatGlyphs const): New function to
check if a list of glyph IDs has any that would be inappropriate
to render in the GPU process. Since calling the CoreText function that
allows us to check if an sbix glyph exists would be too expensive to
call for every drawGlyphs call, we lazily cache (in a BitVector) the
presence of sbix and SVG images for glyph IDs we check.

Source/WebCore/PAL:

  • pal/spi/cf/CoreTextSPI.h: Add declaration for an SPI that lets us

infer whether a glyph has an sbix image.

Source/WTF:

  • wtf/PlatformHave.h: Add HAVE_CORE_TEXT_SBIX_IMAGE_SIZE_FUNCTIONS.
10:13 PM Changeset in webkit [278150] by sihui_liu@apple.com
  • 5 edits in trunk/Source/WebCore

Add logging for when SQLiteDatabase fails to close
https://bugs.webkit.org/show_bug.cgi?id=226290

Reviewed by Chris Dumez.

Also fix some logging error in IDB.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::createOrMigrateRecordsTableIfNecessary):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidBlobTables):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsRecordIndex):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::open):
(WebCore::SQLiteDatabase::close):

  • platform/sql/SQLiteDatabase.h:
9:43 PM Changeset in webkit [278149] by Fujii Hironori
  • 6 edits in trunk/Source/WebCore

[Win] Remove unused GraphicsContext::WindowsBitmap class
https://bugs.webkit.org/show_bug.cgi?id=226312

Reviewed by Don Olmstead.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::WindowsBitmap::hdc const): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::buffer const): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::bufferLength const): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::size const): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::bytesPerRow const): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::bitsPerPixel const): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::windowsDIB const): Deleted.

  • platform/graphics/win/GraphicsContextCGWin.cpp:

(WebCore::GraphicsContext::drawWindowsBitmap): Deleted.

  • platform/graphics/win/GraphicsContextCairoWin.cpp:

(WebCore::GraphicsContext::drawWindowsBitmap): Deleted.

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContextDirect2D::drawWindowsBitmap): Deleted.

  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::shouldIncludeChildWindows const):
(WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap): Deleted.
(WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap): Deleted.
(WebCore::GraphicsContext::createWindowsBitmap): Deleted.

9:36 PM Changeset in webkit [278148] by Fujii Hironori
  • 4 edits in trunk/Source/WebCore

[Cairo] Remove unused members ownedPlatformContext and platformContext of GraphicsContextPlatformPrivate
https://bugs.webkit.org/show_bug.cgi?id=226310

Reviewed by Don Olmstead.

GraphicsContextPlatformPrivate is a class tracking HDC
transforming. It doesn't need to know about PlatformContextCairo.
Remove unused members ownedPlatformContext and platformContext.

GraphicsContextPlatformPrivate::syncContext was a setter of
cairo_t*. Removed it and set cairo_t* as an argument of the
constructor.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContextCairo::GraphicsContextCairo):

  • platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:

(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::setCTM):
(WebCore::GraphicsContextPlatformPrivate::syncContext): Deleted.

  • platform/graphics/win/GraphicsContextCairoWin.cpp:

(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::syncContext): Deleted.

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

[MSE] MediaSample that need to be removed with SourceBufferPrivate::evictCodedFrames() may not be removed.
https://bugs.webkit.org/show_bug.cgi?id=225800
<rdar://problem/78296352>

Patch by Toshio Ogasawara <toshio.ogasawara@access-company.com> on 2021-05-26
Reviewed by Jer Noble.

Source/WebCore:

Fixed evictCodedFrames to remove MediaSample that can be removed after the minimumRangeStart.

Test: media/media-source/media-source-evict-codedframe-after-seek.html

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::evictCodedFrames):

LayoutTests:

  • media/media-source/media-source-evict-codedframe-after-seek-expected.txt: Added.
  • media/media-source/media-source-evict-codedframe-after-seek.html: Added.
8:17 PM Changeset in webkit [278146] by Chris Dumez
  • 42 edits in trunk/Source

Leverage the new Vector(const T*, size_t) constructor
https://bugs.webkit.org/show_bug.cgi?id=226304

Reviewed by Darin Adler.

Leverage the new Vector(const T*, size_t) constructor in existing code.

Source/JavaScriptCore:

  • wasm/WasmStreamingParser.cpp:

(JSC::Wasm::StreamingParser::consume):

Source/WebCore:

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::blobFromData):

  • Modules/indexeddb/IDBGetResult.cpp:

(WebCore::IDBGetResult::dataFromBuffer):

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::convertBytesToVector):

  • Modules/webauthn/fido/DeviceResponseConverter.cpp:

(fido::decodeResponseMap):

  • Modules/webauthn/fido/FidoHidPacket.cpp:

(fido::FidoHidInitPacket::createFromSerializedData):
(fido::FidoHidContinuationPacket::createFromSerializedData):

  • Modules/webauthn/fido/Pin.cpp:

(fido::pin::encodeCOSEPublicKey):

  • Modules/webauthn/fido/U2fResponseConverter.cpp:

(fido::WebCore::extractECPublicKeyFromU2fRegistrationResponse):
(fido::WebCore::extractCredentialIdFromU2fRegistrationResponse):
(fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse):
(fido::readU2fSignResponse):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::enqueueRawFrame):

  • crypto/SubtleCrypto.cpp:

(WebCore::toKeyData):
(WebCore::copyToVector):

  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:

(WebCore::CryptoKeyEC::platformAddFieldElements const):

  • crypto/mac/CryptoKeyECMac.cpp:

(WebCore::CryptoKeyEC::platformImportPkcs8):

  • crypto/mac/SerializedCryptoKeyWrapMac.mm:

(WebCore::vectorFromNSData):

  • crypto/openssl/CryptoAlgorithmAES_GCMOpenSSL.cpp:

(WebCore::cryptDecrypt):

  • fileapi/Blob.cpp:

(WebCore::Blob::Blob):

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::ImageBackingStore):

  • platform/graphics/cairo/ImageBufferUtilitiesCairo.cpp:

(WebCore::data):

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::GstMappedBuffer::createVector const):

  • platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:

(WebCore::CDMProxyClearKey::cencSetDecryptionKey):

  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::fetchData):

  • platform/network/FormData.cpp:

(WebCore::FormDataElement::isolatedCopy const):
(WebCore::FormData::appendData):

  • platform/network/curl/OpenSSLHelper.cpp:

(OpenSSL::BIO::getDataAsVector const):

  • testing/Internals.cpp:

(WebCore::Internals::deserializeBuffer const):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::openFunc):

Source/WebCore/PAL:

  • pal/crypto/gcrypt/CryptoDigestGCrypt.cpp:

(PAL::CryptoDigest::computeHash):

Source/WebKit:

  • Platform/IPC/ArrayReference.h:

(IPC::ArrayReference::vector const):

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(vectorFromNSData):

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::setIconForPageURL):

  • UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.mm:

(WebKit::WebCore::convertBytesToVector):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptForExtension):

  • UIProcess/WebAuthentication/Cocoa/HidConnection.mm:

(WebKit::reportReceived):

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticatorInternal::toVector):
(WebKit::LocalAuthenticatorInternal::aaguidVector):

  • UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:

(WebKit::NfcConnection::transact const):

  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::didComplete):

  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:

(WebKit::WebURLSchemeTaskProxy::didReceiveData):

Source/WTF:

  • wtf/text/WTFString.cpp:

(asciiDebug):

8:16 PM Changeset in webkit [278145] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the ENABLE(CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER) build

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:

(WebKit::CGDisplayListImageBufferBackend::create):
Missed one GraphicsContext!

6:48 PM Changeset in webkit [278144] by Chris Dumez
  • 3 edits in trunk/Source/WTF

Use timingsafe_bcmp() in WTF::constantTimeMemcmp() when available
https://bugs.webkit.org/show_bug.cgi?id=226294
<rdar://problem/78542643>

Reviewed by Darin Adler.

Follow-up to r278140 to address post-landing feedback.

  • wtf/CryptographicUtilities.cpp:

(WTF::constantTimeMemcmp):

  • wtf/CryptographicUtilities.h:

(WTF::constantTimeMemcmp):

6:33 PM Changeset in webkit [278143] by Jean-Yves Avenard
  • 11 edits in trunk

Make MediaSession readystate enums all lowercase
https://bugs.webkit.org/show_bug.cgi?id=226213
<rdar://problem/78437011>

Reviewed by Eric Carlson.

Source/WebCore:

Use the current MediaSession definition pattern which makes all enum names
lower case.

  • Modules/mediasession/MediaSession.h:
  • Modules/mediasession/MediaSessionReadyState.h:
  • Modules/mediasession/MediaSessionReadyState.idl:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _createMediaSessionCoordinatorForTesting:completionHandler:]):

Tools:

  • TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm:

(TestWebKitAPI::TEST_F):

LayoutTests:

Use the current MediaSession definition pattern which makes all enum names
lower case.

  • media/media-session/mock-coordinator-expected.txt:
  • media/media-session/mock-coordinator.html:
5:40 PM Changeset in webkit [278142] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening, remove some outdated test expectations.
https://bugs.webkit.org/show_bug.cgi?id=226284

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-05-26

5:40 PM Changeset in webkit [278141] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.1.14

Tag Safari-612.1.15.1.14.

5:39 PM Changeset in webkit [278140] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Use timingsafe_bcmp() in WTF::constantTimeMemcmp() when available
https://bugs.webkit.org/show_bug.cgi?id=226294

Reviewed by Alex Christensen.

Use timingsafe_bcmp() in WTF::constantTimeMemcmp() when available (iOS, macOS, FreeBSD, OpenBSD),
instead of our own custom implementation.

  • wtf/CryptographicUtilities.cpp:

(WTF::constantTimeMemcmp):

5:36 PM Changeset in webkit [278139] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: ASSERTION FAILED: !isCompilationThread() in JSC::Profiler::Database::addCompilation()
https://bugs.webkit.org/show_bug.cgi?id=226302
<rdar://78537378>

Reviewed by Saam Barati.

We started linking the JIT code in the compiler thread, which now triggers this assertion.
The assertion was introduce before a lock was held to modify the data structures in the
profiler database, but it's safe to remove it now.

  • profiler/ProfilerDatabase.cpp:

(JSC::Profiler::Database::addCompilation):

5:35 PM Changeset in webkit [278138] by stephan.szabo@sony.com
  • 2 edits in trunk/Tools

Cleanup temporary directory after TestWTF's FileSystemTests
https://bugs.webkit.org/show_bug.cgi?id=226300

Reviewed by Chris Dumez.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp: move to deleteNonEmptyDirectory during test cleanup
5:10 PM Changeset in webkit [278137] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.15.0.100

Tag Safari-612.1.15.0.100.

5:04 PM Changeset in webkit [278136] by Kocsen Chung
  • 1 edit in branches/safari-612.1.15.0.100-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb

Apply patch. rdar://problem/78538947

5:03 PM Changeset in webkit [278135] by Kocsen Chung
  • 8 edits in branches/safari-612.1.15.0.100-branch/Source

Versioning.

WebKit-7612.1.15.0.100

4:44 PM Changeset in webkit [278134] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.0.8

Tag Safari-612.1.15.0.8.

4:42 PM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
4:33 PM Changeset in webkit [278133] by Kocsen Chung
  • 1 copy in branches/safari-612.1.15.0.100-branch

New branch.

4:24 PM Changeset in webkit [278132] by Chris Dumez
  • 2 edits in trunk/Source/WTF

[Hardening] Have the Ref<> destructor null out its pointer
https://bugs.webkit.org/show_bug.cgi?id=226293
<rdar://problem/78532149>

Reviewed by Geoffrey Garen.

  • wtf/Ref.h:

(WTF::Ref::~Ref):

4:17 PM Changeset in webkit [278131] by Wenson Hsieh
  • 5 edits
    2 adds in trunk/Source/WebCore

Add a PAL softlinking header for the Reveal framework
https://bugs.webkit.org/show_bug.cgi?id=226292

Reviewed by Tim Horton.

Source/WebCore:

Pull soft-linking bits out of DictionaryLookup.mm and into a separate PAL header, so that we can easily soft-
link both Reveal and RevealCore in WebKit, in future patches. See below for more details.

No change in behavior.

  • editing/cocoa/DictionaryLookup.mm:

Also do some minor cleanup around this code:

  • Use auto in more places.
  • Make WebRevealHighlight conform to RVPresenterHighlightDelegate and UIRVPresenterHighlightDelegate, as

was (probably) intended. Currently, the names of these delegate methods are treated as unused type template
arguments on the class. This means we no longer need to static_cast to the protocol when passing these
objects around.

  • Move several ivars on WebRevealHighlight out of the @interface, and into the @implementation.

(-[WebRevealHighlight revealContext:drawRectsForItem:]):
(WebCore::canCreateRevealItems):
(WebCore::DictionaryLookup::rangeForSelection):
(WebCore::DictionaryLookup::rangeAtHitTestResult):
(WebCore::showPopupOrCreateAnimationController):
(SOFT_LINK_CLASS_OPTIONAL): Deleted.

Source/WebCore/PAL:

Add the new header and source file.

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/RevealSoftLink.h: Added.
  • pal/cocoa/RevealSoftLink.mm: Added.
3:49 PM Changeset in webkit [278130] by don.olmstead@sony.com
  • 17 edits
    2 adds in trunk

[CMake] Support USE_ANGLE_EGL on additional platforms
https://bugs.webkit.org/show_bug.cgi?id=224888
<rdar://problem/77280211>

Reviewed by Ken Russell.

.:

USE_ANGLE_EGL is for platforms that want to use ANGLE as the sole OpenGL ES implementation
within WebKit. This setting is applicable to Mac and Windows platforms. USE_ANGLE_WEBGL is
just for platforms that want to use ANGLE for WebGL 2.0 support only. Any other uses of
OpenGL should go through the system OpenGL (desktop or embedded). This setting applies to
GTK.

The platform options were modified to match this.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsMac.cmake:

Source/ThirdParty/ANGLE:

Support ANGLE using the OpenGL backend for GTK. Support ANGLE using Metal
backend for Mac. Add the generated sources for these two backends.

Clean up the CMake and introduce additional targets.

  • CMakeLists.txt:
  • Compiler.cmake:
  • GL.cmake: Added.
  • Metal.cmake: Added.
  • PlatformFTW.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • PlatformWin.cmake:

Source/WebCore:

Use the ANGLE library targets when applicable.

  • CMakeLists.txt:
  • Headers.cmake:

Source/WebKit:

Use the ANGLE library targets when applicable.

  • CMakeLists.txt:

Tools:

Generate source listings for Metal and OpenGL ANGLE backends.

  • Scripts/update-angle:
3:46 PM Changeset in webkit [278129] by Chris Lord
  • 4 edits in trunk

Scrollbars/indicators are sometimes incorrectly drawn when async overflow scrolling is enabled
https://bugs.webkit.org/show_bug.cgi?id=226259

Reviewed by Simon Fraser.

Source/WebCore:

Respect scrolled contents visibility when rendering scrollbar layers.

No new tests, covered by existing tests.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintContents):

LayoutTests:

Some tests involving overflow scrolling now pass.

  • platform/wpe/TestExpectations:
3:44 PM Changeset in webkit [278128] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur] http/tests/performance/performance-resource-timing-resourcetimingbufferfull-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226299

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:08 PM Changeset in webkit [278127] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Refactor SimulatorDevice (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=225158

Unreviewed follow-up fix.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDevice.is_usable): When no UI Manager service is defined, we should early exit.

2:34 PM Changeset in webkit [278126] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[ macOS iOS ] crypto/crypto-random-values-oom.html is a flakey timeout
https://bugs.webkit.org/show_bug.cgi?id=223949

Unreviewed test gardening.

Updated test expectations due to test still appearing flaky.

  • platform/mac/TestExpectations:
2:19 PM Changeset in webkit [278125] by Truitt Savell
  • 3 edits
    2 deletes in trunk

Unreviewed, reverting r278028.

Caused fast/selectors/slow-style-sharing-with-long-cousin-
list.html to timeout on iOS and Windows.

Reverted changeset:

"CrashOnOverflow in
WebCore::RenderTable::cellBefore(WebCore::RenderTableCell
const*)"
https://bugs.webkit.org/show_bug.cgi?id=225949
https://commits.webkit.org/r278028

2:05 PM Changeset in webkit [278124] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Do not skip SetCommitQueueMinusFlagOnPatch step on EWS test instances
https://bugs.webkit.org/show_bug.cgi?id=226289

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(SetCommitQueueMinusFlagOnPatch.start):
(SetCommitQueueMinusFlagOnPatch.doStepIf): Deleted.

2:02 PM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
1:39 PM Changeset in webkit [278123] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Add release logging in WebPage::runJavaScriptInFrameInScriptWorld()
https://bugs.webkit.org/show_bug.cgi?id=226286

Reviewed by Geoffrey Garen.

Add release logging in WebPage::runJavaScriptInFrameInScriptWorld(). We have logging on UIProcess side but not on
WebProcess side. It makes it hard to determine if the WebProcess processed the request to run JS or not.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScriptInFrameInScriptWorld):

1:35 PM Changeset in webkit [278122] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, skip new WebAudio tests added in r278068 on Windows.

WebAudio is disabled on Windows.

  • platform/win/TestExpectations:
1:06 PM Changeset in webkit [278121] by Wenson Hsieh
  • 11 edits
    1 add in trunk/Source/WebCore

[macOS] Support painting data detector highlights inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=226227

Reviewed by Tim Horton.

Add support for painting data detector highlights inside image overlays by leveraging DataDetectorHighlight.
See comments below for more details.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/Editor.cpp:

(WebCore::scanForTelephoneNumbers):

Avoid painting service-controls-based telephone number highlights for selected text inside image overlays, in
order to avoid painting a redundant data detector highlight for telephone numbers in image overlays.

  • html/HTMLElement.cpp:

(WebCore::imageOverlayDataDetectorClassName):
(WebCore::HTMLElement::isImageOverlayDataDetectorResult const):
(WebCore::HTMLElement::updateWithImageExtractionResult):

  • html/HTMLElement.h:
  • html/shadow/imageOverlay.css:

(div.image-overlay-data-detector-result):

Add support for injecting elements in the DOM that represent data detection results; these are transformed and
overlaid on the image in the same way as existing text containers. Note that we lay out these elements on top
of text, but make them invisible to hit-testing unless the IgnoreCSSPointerEventsProperty option is specified.
We'll take advantage of this behavior in a future patch.

  • page/ImageOverlayController.cpp:

(WebCore::ImageOverlayController::selectionQuadsDidChange):
(WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded):
(WebCore::ImageOverlayController::drawRect):
(WebCore::ImageOverlayController::platformHandleMouseEvent):

  • page/ImageOverlayController.h:

Refactor the image overlay controller, such that we install the page overlay if there is any selection inside
the image overlay (as opposed to only when we need to use this overlay to paint the text selection for
transparent images). If data detectors are present, we'll additionally set up out DataDetectorHighlights (one
for each data detection result container).

  • page/mac/ImageOverlayControllerMac.mm: Added.

(WebCore::ImageOverlayController::updateDataDetectorHighlights):

Traverse the image overlay's subtree in search of container elements that correspond to data detection results;
for each of these elements, we create a new DataDetectorHighlight using the element's bounds, and save the
pair in m_dataDetectorContainersAndHighlights. Note that we hold a weak pointer to the container element, such
that there's no risk of leaking any of these data detection result containers (or their documents).

(WebCore::ImageOverlayController::platformHandleMouseEvent):
(WebCore::ImageOverlayController::handleDataDetectorAction):

Add a FIXME referencing the next patch in the sequence.

(WebCore::ImageOverlayController::clearDataDetectorHighlights):

  • platform/mac/DataDetectorHighlight.h:
  • platform/mac/DataDetectorHighlight.mm:

(WebCore::DataDetectorHighlight::createForImageOverlay):

Add a helper method to create a DataDetectorHighlight for image overlays.

12:59 PM Changeset in webkit [278120] by Jonathan Bedard
  • 5 edits
    1 move
    1 delete in trunk

[run-webkit-tests] Strip php support from webserver (Apache)
https://bugs.webkit.org/show_bug.cgi?id=226032
<rdar://problem/78269181>

Reviewed by Adrian Perez de Castro.

Tools:

  • Scripts/webkitpy/port/base.py:

(Port._apache_config_file_name_for_platform): Use explicit Darwin httpd.conf.
(Port._is_darwin_php_version_7): Deleted.
(Port._darwin_php_version): Deleted.

LayoutTests:

  • http/conf/apache2.2-httpd.conf: Remove PHP.
  • http/conf/apache2.4-darwin-httpd.conf: Copied from LayoutTests/http/conf/apache2.4-x-httpd.conf.
  • http/conf/apache2.4-httpd.conf: Remove PHP.
  • http/conf/apache2.4-php7-httpd.conf: Removed.
  • http/conf/apache2.4-x-httpd.conf: Renamed apache2.4-darwin-httpd.conf.
12:19 PM Changeset in webkit [278119] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

Don't hang onto expired resources without validation headers in memory cache
https://bugs.webkit.org/show_bug.cgi?id=226083
rdar://78035612

Reviewed by Chris Dumez.

They consume memory while only really being useful for history navigation.
Disk cache can handle the relatively rare cases where that is useful and not
covered by the page cache.

  • loader/ResourceTimingInformation.cpp:

(WebCore::ResourceTimingInformation::addResourceTiming):
(WebCore::ResourceTimingInformation::removeResourceTiming):

Add way to remove entries from the map.

  • loader/ResourceTimingInformation.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::removeClient):

Removal from cache is now handled in deleteIfPossible() so any path that gets the resource to
canDelete() state will do cache removal check.
Since deleteIfPossible is invoked by removeClient the existing behavior is covered.

(WebCore::CachedResource::deleteIfPossible):

Remove expired resources without validation headers from the cache if the resource is otherwise deletable.
Also eagerly remove no-store http resources (previously only https was removed).

(WebCore::CachedResource::deleteThis):

Factor into a function.

  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

Ensure existing resource is removed from cache adding a new one. This was causing confusion with inCache state.

(WebCore::CachedResourceLoader::garbageCollectDocumentResources):

Don't remove entries with active loader. They are needed for resource timing.
Don't leave removed entries to ResourceTimingInformation. They are not guaranteed to stay alive after
being removed from m_documentResources.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::remove):

Call CachedResource::deleteThis() directly.

11:52 AM Changeset in webkit [278118] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.1

Tag Safari-612.1.15.4.1.

11:50 AM Changeset in webkit [278117] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WTF

Cherry-pick r278032. rdar://problem/78517968

[AppleWin] JSC fails to build
https://bugs.webkit.org/show_bug.cgi?id=226225
<rdar://78330435>

Reviewed by Brent Fulgham.

Speculative build fix for missing script to generate unified sources. Make sure the WTF scripts directory exists before
copying the script there, and add a CMake log message to help further debugging if this is not the correct fix.

  • wtf/CMakeLists.txt:

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

11:48 AM Changeset in webkit [278116] by Russell Epstein
  • 1 edit in branches/safari-612.1.15.4-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm

Cherry-pick r278009. rdar://problem/78463104

Ensure app highlight visibility observer is initialized before adding a new highlight
https://bugs.webkit.org/show_bug.cgi?id=226214
rdar://78173370

Patch by Matt Mokary <mmokary@apple.com> on 2021-05-25
Reviewed by Wenson Hsieh.

The app highlight visibility observer is initialized before restoring highlights, but was not initialized
before adding a new one. It must be initialized before adding a highlight so a change in visibility resulting
from a new highlight is handled correct.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createAppHighlightInSelectedRange):

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

11:48 AM Changeset in webkit [278115] by Russell Epstein
  • 13 edits in branches/safari-612.1.15.4-branch/Source/bmalloc

Cherry-pick r277898. rdar://problem/78411755

[bmalloc] Rollout r276266 because WebKit processes are spending much more time in madvise
https://bugs.webkit.org/show_bug.cgi?id=226122

Unreviewed rollout.

Rolling out r276266 to do some automated testing. At the same time, we'll work on changing the madvise() decommitting to be more precise.

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp: (bmalloc::Heap::scavenge): (bmalloc::Heap::scavengeToHighWatermark): (bmalloc::Heap::allocateSmallChunk): (bmalloc::Heap::allocateSmallPage): (bmalloc::Heap::allocateLarge):
  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h: (bmalloc::passedNumPages>::takeFirstEligible): (bmalloc::passedNumPages>::scavenge): (bmalloc::passedNumPages>::scavengeToHighWatermark):
  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h: (bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
  • bmalloc/LargeMap.cpp: (bmalloc::LargeMap::add):
  • bmalloc/LargeRange.h: (bmalloc::LargeRange::LargeRange): (bmalloc::merge):
  • bmalloc/Scavenger.cpp: (bmalloc::Scavenger::Scavenger): (bmalloc::Scavenger::timeSinceLastPartialScavenge): (bmalloc::Scavenger::scavenge): (bmalloc::Scavenger::partialScavenge): (bmalloc::Scavenger::threadRunLoop):
  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h:

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

11:48 AM Changeset in webkit [278114] by Russell Epstein
  • 1 edit in branches/safari-612.1.15.4-branch/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm

Cherry-pick r277784. rdar://problem/78264934

CRASH: Null-pointer deref in MediaSessionManagerCocoa::setNowPlayingInfo()
https://bugs.webkit.org/show_bug.cgi?id=225999
<rdar://78232970>

Reviewed by Eric Carlson.

Null-check nowPlayingInfo.artwork->imageData before dereferencing.

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):

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

11:48 AM Changeset in webkit [278113] by Russell Epstein
  • 1 edit
    2 adds in branches/safari-612.1.15.4-branch

Cherry-pick r277726. rdar://problem/78260457

[Mac] MSE-based video pauses when put in background; PiP context menu disabled
https://bugs.webkit.org/show_bug.cgi?id=225958
<rdar://78130303>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-has-audio-video.html

In r277116, in order to reduce the CPU usage incurred when pushing state changes from
the GPU process to the WebContent process, state changes to hasAudio and hasVideo
were now only updated when the MediaPlayer indicated that its characteristicsChanged().
However, in SourceBufferPrivateAVFObjC, this call was performed too early, before the
SourceBuffer in the WebContent process had informed SourceBufferPrivate of newly added
audio and video tracks. Thus the cached values of hasAudio and hasVideo inside the
WebContent process were never updated.

Call characteristicsChanged() from the callback handler of didReceiveInitializationSegment(),
which will be called only after the WebContent process completes its handling of the
new initialization segment, which includes telling the SourceBufferPrivate in the GPU
process about newly added audio and video tracks.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):

LayoutTests:

  • media/media-source/media-source-has-audio-video-expected.txt: Added.
  • media/media-source/media-source-has-audio-video.html: Added.

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

11:48 AM Changeset in webkit [278112] by Russell Epstein
  • 1 edit in branches/safari-612.1.15.4-branch/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm

Cherry-pick r277518. rdar://problem/78260425

Web Inspector: _WKInspector leaks WebInspectorUIProxy
https://bugs.webkit.org/show_bug.cgi?id=225815

Reviewed by Tim Horton.

Add a missing call in _WKInspector's destructor to destruct the WebInspectorUIProxy in API object storage.

  • UIProcess/API/Cocoa/_WKInspector.mm: (-[_WKInspector dealloc]):

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

11:48 AM Changeset in webkit [278111] by Russell Epstein
  • 1 edit in branches/safari-612.1.15.4-branch/Source/JavaScriptCore/runtime/JSCJSValue.cpp

Unreviewed build fix, rdar://problem/78224090

./runtime/JSCJSValue.cpp:262:70: error: no member named 'callSetter' in 'JSC::GetterSetter'

11:48 AM Changeset in webkit [278110] by Russell Epstein
  • 95 edits
    15 deletes in branches/safari-612.1.15.4-branch

Cherry-pick r277665. rdar://problem/78224090

Temporarily revert r276592 as it breaks some native apps
https://bugs.webkit.org/show_bug.cgi?id=225917

JSTests:

Unreviewed, revert.

  • microbenchmarks/put-slow-no-cache-array.js: Removed.
  • microbenchmarks/put-slow-no-cache-function.js: Removed.
  • microbenchmarks/put-slow-no-cache-js-proxy.js: Removed.
  • microbenchmarks/put-slow-no-cache-long-prototype-chain.js: Removed.
  • microbenchmarks/put-slow-no-cache.js: Removed.
  • microbenchmarks/reflect-set-with-receiver.js: Removed.
  • stress/custom-get-set-proto-chain-put.js: (getObjects): (let.base.of.getBases):
  • stress/module-namespace-access-set-fails.js: Removed.
  • stress/put-non-reified-static-accessor-or-custom.js: Removed.
  • stress/put-non-reified-static-function-or-custom.js: Removed.
  • stress/put-to-primitive-non-reified-static-custom.js: Removed.
  • stress/put-to-primitive.js: Removed.
  • stress/put-to-proto-chain-overrides-put.js: Removed.
  • stress/typed-array-canonical-numeric-index-string-set.js: Removed.

LayoutTests/imported/w3c:

Unreviewed, revert.

  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver-expected.txt: Removed.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver.html: Removed.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html:

Source/JavaScriptCore:

Unreviewed, revert.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject<Parent>::put):
  • debugger/DebuggerScope.h:
  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.h:
  • runtime/CustomGetterSetter.cpp: (JSC::callCustomSetter):
  • runtime/CustomGetterSetter.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.h:
  • runtime/GenericArguments.h:
  • runtime/GenericArgumentsInlines.h: (JSC::GenericArguments<Type>::put):
  • runtime/GetterSetter.h:
  • runtime/JSArray.cpp: (JSC::JSArray::put):
  • runtime/JSArray.h:
  • runtime/JSArrayBufferView.cpp: (JSC::JSArrayBufferView::put):
  • runtime/JSArrayBufferView.h:
  • runtime/JSCJSValue.cpp: (JSC::JSValue::putToPrimitive):
  • runtime/JSCell.cpp: (JSC::JSCell::doPutPropertySecurityCheck):
  • runtime/JSCell.h:
  • runtime/JSFunction.cpp: (JSC::JSFunction::put):
  • runtime/JSFunction.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::put):
  • runtime/JSGlobalObject.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSModuleEnvironment.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSObject.cpp: (JSC::JSObject::doPutPropertySecurityCheck): (JSC::JSObject::putInlineSlow): (JSC::JSObject::prototypeChainMayInterceptStoreTo): (JSC::definePropertyOnReceiverSlow): Deleted. (JSC::JSObject::definePropertyOnReceiver): Deleted. (JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded): Deleted.
  • runtime/JSObject.h: (JSC::JSObject::putByIndexInline): (JSC::JSObject::doPutPropertySecurityCheck): (JSC::JSObject::hasNonReifiedStaticProperties): Deleted.
  • runtime/JSObjectInlines.h: (JSC::JSObject::canPerformFastPutInlineExcludingProto): (JSC::JSObject::putInlineForJSObject): (JSC::JSObject::putDirectInternal): (JSC::JSObject::putInlineFast): Deleted.
  • runtime/JSProxy.h:
  • runtime/JSTypeInfo.h: (JSC::TypeInfo::overridesGetOwnPropertySlot const): (JSC::TypeInfo::overridesAnyFormOfGetOwnPropertyNames const): (JSC::TypeInfo::hasPutPropertySecurityCheck const): (JSC::TypeInfo::hasStaticPropertyTable const): Deleted. (JSC::TypeInfo::overridesPut const): Deleted.
  • runtime/Lookup.h: (JSC::putEntry): (JSC::lookupPut):
  • runtime/PropertySlot.h:
  • runtime/ProxyObject.cpp: (JSC::ProxyObject::put):
  • runtime/ProxyObject.h:
  • runtime/PutPropertySlot.h: (JSC::PutPropertySlot::PutPropertySlot): (JSC::PutPropertySlot::context const): (JSC::PutPropertySlot::type const): (JSC::PutPropertySlot::isInitialization const): (JSC::PutPropertySlot::isTaintedByOpaqueObject const): Deleted. (JSC::PutPropertySlot::setIsTaintedByOpaqueObject): Deleted.
  • runtime/ReflectObject.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/RegExpObject.cpp: (JSC::RegExpObject::put):
  • runtime/RegExpObject.h:
  • runtime/StringObject.cpp: (JSC::StringObject::put):
  • runtime/StringObject.h:
  • runtime/StringPrototype.cpp: (JSC::StringPrototype::finishCreation): (JSC::StringPrototype::create):
  • runtime/StringPrototype.h:
  • runtime/Structure.cpp: (JSC::Structure::validateFlags):
  • runtime/Structure.h: (JSC::Structure::takesSlowPathInDFGForImpureProperty): (JSC::Structure::hasNonReifiedStaticProperties const): Deleted.
  • tools/JSDollarVM.cpp:

Source/WebCore:

Unreviewed, revert.

  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::doPutPropertySecurityCheck): (WebCore::JSDOMWindow::put):
  • bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::doPutPropertySecurityCheck):
  • bindings/js/JSRemoteDOMWindowCustom.cpp: (WebCore::JSRemoteDOMWindow::put):
  • bindings/scripts/CodeGeneratorJS.pm: (GeneratePut): (GenerateHeader):
  • bindings/scripts/test/JS/JSTestDomainSecurity.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::JSTestIndexedSetterNoIdentifier::put):
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::JSTestIndexedSetterThrowingException::put):
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::JSTestIndexedSetterWithIdentifier::put):
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::put):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::JSTestNamedAndIndexedSetterThrowingException::put):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::put):
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::JSTestNamedSetterNoIdentifier::put):
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::JSTestNamedSetterThrowingException::put):
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::JSTestNamedSetterWithIdentifier::put):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetter::put):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::put):
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp: (WebCore::JSTestNamedSetterWithLegacyOverrideBuiltIns::put):
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp: (WebCore::JSTestNamedSetterWithLegacyUnforgeableProperties::put):
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp: (WebCore::JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns::put):
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h:
  • bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::JSTestPluginInterface::put):
  • bindings/scripts/test/JS/JSTestPluginInterface.h:
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_object.h:

Source/WebKit:

Unreviewed, revert.

  • WebProcess/Plugins/Netscape/JSNPObject.h:

LayoutTests:

Unreviewed, revert

  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put-expected.txt:
  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html:
  • js/dom/reflect-set-onto-dom-expected.txt:
  • js/dom/script-tests/reflect-set-onto-dom.js:

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

11:48 AM Changeset in webkit [278109] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Tools

Revert "Cherry-pick r277608. rdar://problem/78207944"

This reverts commit r277723

11:48 AM Changeset in webkit [278108] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Tools

Cherry-pick r277608. rdar://problem/78207944

Fix clean build after r277606
https://bugs.webkit.org/show_bug.cgi?id=223658

  • TestWebKitAPI/Tests/WebKitCocoa/ContentSecurityPolicy.mm: (TEST): Use API instead of removed API. Why EWS didn't find this, we may never know.

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

11:48 AM Changeset in webkit [278107] by Russell Epstein
  • 2 edits
    2 adds in branches/safari-612.1.15.4-branch

Cherry-pick r277452. rdar://problem/78179698

REGRESSION (r276945): [iOS] Focus rings are too large
https://bugs.webkit.org/show_bug.cgi?id=225778
<rdar://problem/77858341>

Reviewed by Tim Horton.

Source/WebCore:

r276945 updated scaling logic to ensure that the scale of the base CTM
matches the device scale factor. The change itself makes our base CTM
more correct, but exposed a longstanding bug with our focus ring
implementation.

Focus rings are drawn using CoreGraphics, using CGFocusRingStyle. On
macOS, the style is initialized using NSInitializeCGFocusRingStyleForTime.
However, on iOS, we initialize the style ourselves, using UIKit constants.
Currently, the focus ring's style's radius is set to
+[UIFocusRingStyle cornerRadius], a constant of 8. This is the longstanding
issue. CGFocusRingStyle's radius is not a corner radius, but is the
width of the focus ring. In UIKit, this width is represented by
+[UIFocusRingStyle borderThickness], a constant of 3. WebKit has always
intended to match this width, as evidenced by the default outline-width
of 3px in the UA style sheet.

Considering the large disparity between the existing and expected radius
value, it may be surprising that this mistake has gone unnoticed since
2019, when focus rings were first introduced on iOS. This is where r276945
comes into play. Prior to r276945, the scale of the base CTM did not match
the device scale factor. This meant that CG scaled down the constant of 8
to 4 CSS pixels (1 (base CTM) / 2 (device scale factor)). After r276945,
the two scales are equal and the focus ring is drawn as 8 CSS pixels, much
larger than the expected 3px.

Test: fast/forms/ios/focus-ring-size.html

  • platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::drawFocusRingAtTime):

To fix, use the correct SPI to get the focus ring width,
+[UIFocusRingStyle borderThickness]. This ensures that focus rings have
the right width, following r276945.

The change also fixes focus ring repaint issues that arose from the
fact that the outline-width was 3px, but the painted width was 4px.

Source/WebCore/PAL:

  • pal/spi/ios/UIKitSPI.h:

LayoutTests:

Added a regression test to verify the size of the focus ring on iOS.
The test works by drawing an overlay on top of an input element, that
is just large enough to obscure the focus ring. If the focus ring is
too large, the ring will not obscured, leading to a mismatch failure.

  • fast/forms/ios/focus-ring-size-expected.html: Added.
  • fast/forms/ios/focus-ring-size.html: Added.

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

11:48 AM Changeset in webkit [278106] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Revert "Cherry-pick r277459. rdar://problem/78110796"

This reverts commit r277597.

11:48 AM Changeset in webkit [278105] by Russell Epstein
  • 29 edits
    1 add
    1 delete in branches/safari-612.1.15.4-branch

Revert "Cherry-pick r277505. rdar://problem/78110796"

This reverts commit r277598.

11:48 AM Changeset in webkit [278104] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Revert "Cherry-pick r277594. rdar://problem/78130222"

This reverts commit r277621

11:47 AM Changeset in webkit [278103] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Revert "Cherry-pick r277603. rdar://problem/78130222"

This reverts commit r277623

11:47 AM Changeset in webkit [278102] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/ThirdParty/ANGLE

Cherry-pick r277661. rdar://problem/78175007

Stop compiling ANGLE metal files twice
https://bugs.webkit.org/show_bug.cgi?id=225919
<rdar://78013511>

Reviewed by Dean Jackson.

ANGLE currently generates an unused default.metallib that conflicts with other default.metallibs being built.
Since it is unused, remove it.
What we currently do is put all the source bytes into gDefaultMetallibSrc and compile it at runtime.
This could be optimized to do it at compile time and use newLibraryWithData instead of newLibraryWithSource,
but that should be done separately.

  • ANGLE.xcodeproj/project.pbxproj:

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

11:47 AM Changeset in webkit [278101] by Russell Epstein
  • 5 edits in branches/safari-612.1.15.4-branch/Source

Apply patch. rdar://problem/77799537

11:47 AM Changeset in webkit [278100] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Cherry-pick r277603. rdar://problem/78130222

Null check m_resource in SubresourceLoader::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=225879

Reviewed by Chris Dumez.

Add ASSERT_NOT_REACHED and RELEASE_LOG_FAULT if m_resource is null.
This will help us notice this invalid state in debug builds and diagnose strange loading failures in simulated crash logs.
On further investigation, the crash fixed in r277594 was likely already fixed by something else, but that made it more robust.

  • loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):

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

11:47 AM Changeset in webkit [278099] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Cherry-pick r277600. rdar://problem/78130132

REGRESSION(r277425): Crash in FrameSelection::selectFrameElementInParentIfFullySelected
https://bugs.webkit.org/show_bug.cgi?id=225795

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-17
Reviewed by Ryosuke Niwa.

r277425 claimed that in FrameSelection::setSelectionWithoutUpdatingAppearance,
!m_document->frame() was equivalent to !selectionEndpointsBelongToMultipleDocuments &&
!selectionIsInAnotherDocument && selectionIsInDetachedDocument, but it misses the case when
newSelection.document() is null. So this patch adds back this particular case to the
original "if" block. This patch also adds an ASSERT on m_document->frame().

No new tests.

  • editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Add back the case !m_document->frame() && !newSelection.document() to the first sanity check and ASSERT on m_document->frame() after the second sanity check.

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

11:47 AM Changeset in webkit [278098] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Cherry-pick r277594. rdar://problem/78130222

Null check m_resource in SubresourceLoader::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=225879
<rdar://78084804>

Reviewed by Chris Dumez.

  • loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):

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

11:47 AM Changeset in webkit [278097] by Russell Epstein
  • 29 edits
    1 add
    1 delete in branches/safari-612.1.15.4-branch

Cherry-pick r277505. rdar://problem/78110796

Promote -[WKWebView _pageExtendedBackgroundColor] SPI to -[WKWebView underPageBackgroundColor] API
https://bugs.webkit.org/show_bug.cgi?id=225615
<rdar://problem/76568094>

Reviewed by Wenson Hsieh.

Source/WebCore:

underPageBackgroundColor is a null_resettable property that will return (in order of validity)

  • the most recent non-null value provided
  • the CSS background-color of the <body> and/or <html> (this is the current value of _pageExtendedBackgroundColor)
  • the underlying platform view's background color

Modifications to this property will not have any effect until control is returned to the runloop.

Tests: WKWebViewUnderPageBackgroundColor.OnLoad

WKWebViewUnderPageBackgroundColor.SingleSolidColor
WKWebViewUnderPageBackgroundColor.SingleBlendedColor
WKWebViewUnderPageBackgroundColor.MultipleSolidColors
WKWebViewUnderPageBackgroundColor.MultipleBlendedColors
WKWebViewUnderPageBackgroundColor.KVO
WKWebViewUnderPageBackgroundColor.MatchesScrollView

  • page/Page.h: (WebCore::Page::underPageBackgroundColorOverride const): Added.
  • page/Page.cpp: (WebCore::Page::setUnderPageBackgroundColorOverride): Added. Hold the client-overriden value for underPageBackgroundColor so that it can be used when drawing the overscroll layer.
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor): Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColor and UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].
  • dom/Document.cpp: (WebCore::Document::themeColorChanged): It's no longer necessary to force the overscroll area to redraw since that'll be handled by a client calling -[WKWebView setUnderPageBackgroundColor:] (possibly in response to a -[WKWebView themeColor] KVO notification).

Source/WebKit:

underPageBackgroundColor is a null_resettable property that will return (in order of validity)

  • the most recent non-null value provided
  • the CSS background-color of the <body> and/or <html> (this is the current value of _pageExtendedBackgroundColor)
  • the underlying platform view's background color

Modifications to this property will not have any effect until control is returned to the runloop.

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView underPageBackgroundColor]): Added. (-[WKWebView setUnderPageBackgroundColor:]): Added. (+[WKWebView automaticallyNotifiesObserversOfUnderPageBackgroundColor]): Added.
  • UIProcess/API/ios/WKWebViewIOS.mm: (baseScrollViewBackgroundColor): (scrollViewBackgroundColor): Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColor and UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::underPageBackgroundColor const): Added. (WebKit::WebPageProxy::setUnderPageBackgroundColorOverride): Added. (WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange): (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Added. (WebKit::WebPageProxy::scrollAreaBackgroundColor const): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Added.
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Added. Store the client-overriden value for underPageBackgroundColor and manage state changes.
  • UIProcess/PageClient.h: (WebKit::PageClient::underPageBackgroundColorWillChange): Added. (WebKit::PageClient::underPageBackgroundColorDidChange): Added.
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm: (WebKit::PageClientImplCocoa::underPageBackgroundColorWillChange): Added. (WebKit::PageClientImplCocoa::underPageBackgroundColorDidChange): Added. Add ObjC KVO support for -[WKWebView underPageBackgroundColor].
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor): Added. Provide a way to get the backgroundColor of the WKContentView. This is needed on iOS because scrollViewBackgroundColor (now WebPageProxy::platformUnderPageBackgroundColor) would use this value before falling back to the underlying platform view's background color.
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setUnderPageBackgroundColorOverride): Added. Pass the client-overriden value for underPageBackgroundColor to the WebProcess so that it can be used when drawing the overscroll layer.
  • UIProcess/ViewSnapshotStore.cpp: (WebKit::ViewSnapshotStore::recordSnapshot): Go back to using the pageExtendedBackgroundColor (before r273083).

Source/WTF:

underPageBackgroundColor is a null_resettable property that will return (in order of validity)

  • the most recent non-null value provided
  • the CSS background-color of the <body> and/or <html> (this is the current value of _pageExtendedBackgroundColor)
  • the underlying platform view's background color

Modifications to this property will not have any effect until control is returned to the runloop.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColorand UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: Renamed from PageExtendedBackgroundColor.mm. (defaultBackgroundColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.OnLoad): (TEST.WKWebViewUnderPageBackgroundColor.SingleSolidColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.SingleBlendedColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleSolidColors): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleBlendedColors): Added. (-[WKWebViewUnderPageBackgroundColorObserver initWithWebView:]): Added. (-[WKWebViewUnderPageBackgroundColorObserver observeValueForKeyPath:ofObject:change:context:]): Added. (TEST.WKWebViewUnderPageBackgroundColor.KVO): (TEST.WKWebViewUnderPageBackgroundColor.MatchesScrollView): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleStyles): Deleted. (-[WKWebViewPageExtendedBackgroundColorObserver initWithWebView:]): Deleted. (-[WKWebViewPageExtendedBackgroundColorObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (createWebViewWithSampledPageTopColorMaxDifference): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor): Deleted.
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: (createWebView): Deleted. (TEST.WKWebView.ExperimentalUseThemeColorForScrollAreaBackgroundColor): Deleted. Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColor and UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

11:47 AM Changeset in webkit [278096] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebCore

Cherry-pick r277459. rdar://problem/78110796

[macOS] experimental "Use theme color for scroll area background" isn't working
https://bugs.webkit.org/show_bug.cgi?id=225726
<rdar://problem/77933000>

Reviewed by Tim Horton.

  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Fix last remaining m_layerForOverhangAreas->setBackgroundColor to use the helper function RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor instead so that all paths that update the overscroll area color check the experimental settings too.

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

11:47 AM Changeset in webkit [278095] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/WebKit

Cherry-pick r277528. rdar://problem/78109685

REGRESSION (r269824): Random tile corruption when scrolling/zooming in macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=225837
<rdar://problem/75053997>

Reviewed by Simon Fraser.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): Mark the newly front buffer non-volatile before painting into it. This was lost in r269824. Oddly, this caused less trouble than one might expect, except on some particular hardware.

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

11:47 AM Changeset in webkit [278094] by Russell Epstein
  • 35 edits in branches/safari-612.1.15.4-branch/Source

Cherry-pick r277453. rdar://problem/78108967

Add textIndicator bounce for AppHighlights on scroll.
https://bugs.webkit.org/show_bug.cgi?id=225727

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
  • loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::setTextIndicator const):
  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/TextIndicator.h:
  • page/cocoa/WebTextIndicatorLayer.h:
  • page/cocoa/WebTextIndicatorLayer.mm: (-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]): (createBounceAnimation): (-[WebTextIndicatorLayer _animationDuration]):
  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm: (WebCore::TextIndicatorWindow::~TextIndicatorWindow): (WebCore::TextIndicatorWindow::clearTextIndicator): (WebCore::TextIndicatorWindow::setTextIndicator):

Use factored out textIndicator code to add a bounce to an appHighlight
when it is scrolled to.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::clearTextIndicatorWithAnimation): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setTextIndicator): (WebKit::WebPageProxy::clearTextIndicator):
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpTextIndicator:]): (-[WKContentView clearTextIndicator:]): (-[WKContentView setTextIndicatorAnimationProgress:]): (-[WKContentView teardownTextIndicatorLayer]): (-[WKContentView startFadeOut]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::didPerformDictionaryLookup):
  • UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController _animationControllerForText]):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setTextIndicator const):
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator):
  • WebCoreSupport/WebChromeClient.h:

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

11:35 AM Changeset in webkit [278093] by Chris Dumez
  • 35 edits in trunk/Source/JavaScriptCore

Use UncheckedLock even less in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=226278

Reviewed by Darin Adler.

Use UncheckedLock even less in JavaScriptCore as it is being phased out in
favor of Lock, which supports Clang thread safety analysis.

  • heap/BlockDirectory.h:

(JSC::BlockDirectory::WTF_RETURNS_LOCK):

  • heap/CodeBlockSet.h:

(JSC::CodeBlockSet::WTF_RETURNS_LOCK):

  • heap/Heap.h:
  • heap/MarkedSpace.h:

(JSC::MarkedSpace::directoryLock):

  • heap/MarkingConstraintSolver.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::donateKnownParallel):

  • heap/SlotVisitor.h:
  • jit/JITWorklist.cpp:
  • jit/JITWorklist.h:
  • jsc.cpp:
  • profiler/ProfilerDatabase.h:
  • runtime/DeferredWorkTimer.h:
  • runtime/VMTraps.cpp:

(JSC::VMTraps::invalidateCodeBlocksOnStack):

  • runtime/VMTraps.h:
  • tools/FunctionOverrides.cpp:

(JSC::FunctionOverrides::FunctionOverrides):
(JSC::FunctionOverrides::reinstallOverrides):
(JSC::FunctionOverrides::parseOverridesInFile):

  • tools/FunctionOverrides.h:

(JSC::FunctionOverrides::WTF_REQUIRES_LOCK):

  • tools/VMInspector.cpp:

(JSC::ensureIsSafeToLock):
(JSC::VMInspector::codeBlockForMachinePC):

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::didCompleteCompilation):

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

(JSC::Wasm::EntryPlan::parseAndValidateModule):
(JSC::Wasm::EntryPlan::prepare):
(JSC::Wasm::EntryPlan::ThreadCountHolder::~ThreadCountHolder):
(JSC::Wasm::EntryPlan::complete):

  • wasm/WasmEntryPlan.h:

(JSC::Wasm::EntryPlan::tryReserveCapacity):

  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
(JSC::Wasm::LLIntPlan::completeInStreaming):
(JSC::Wasm::LLIntPlan::didFailInStreaming):

  • wasm/WasmLLIntPlan.h:
  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGForOSREntryPlan.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmOMGPlan.h:
  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::runCompletionTasks):
(JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast):
(JSC::Wasm::Plan::fail):

  • wasm/WasmPlan.h:
  • wasm/WasmStreamingCompiler.cpp:

(JSC::Wasm::StreamingCompiler::didCompileFunction):
(JSC::Wasm::StreamingCompiler::completeIfNecessary):
(JSC::Wasm::StreamingCompiler::didComplete):
(JSC::Wasm::StreamingCompiler::finalize):

  • wasm/WasmStreamingCompiler.h:
  • wasm/WasmStreamingPlan.cpp:

(JSC::Wasm::StreamingPlan::work):

  • wasm/WasmStreamingPlan.h:
  • wasm/WasmThunks.h:
10:40 AM Changeset in webkit [278092] by Jonathan Bedard
  • 2 edits
    19 deletes in trunk/LayoutTests

[LayoutTests] Delete php tests from imported/blink
https://bugs.webkit.org/show_bug.cgi?id=226177
<rdar://problem/78401190>

Reviewed by Stephanie Lewis.

  • imported/blink/http/tests/css/remove-placeholder-styles-expected.txt: Removed.
  • imported/blink/http/tests/css/remove-placeholder-styles.html: Removed.
  • imported/blink/http/tests/css/resources: Removed.
  • imported/blink/http/tests/resources: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-origin-expected.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin-expected.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-origin.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-picture-expected.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-picture.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-removeattr-expected.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-removeattr.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-unsafe-url-expected.html: Removed.
  • imported/blink/http/tests/security/referrer-policy-attribute-img-unsafe-url.html: Removed.
  • imported/blink/http/tests/security/resources/green-if-no-referrer.php: Removed.
  • imported/blink/http/tests/security/resources/green-if-referrer-is-full-url-origin-when-crossorigin.php: Removed.
  • imported/blink/http/tests/security/resources/green-if-referrer-is-full-url.php: Removed.
  • imported/blink/http/tests/security/resources/green-if-referrer-is-origin.php: Removed.
  • imported/blink/http/tests/svg/image-fetch-fail-expected.txt: Removed.
  • imported/blink/http/tests/svg/image-fetch-fail.svg: Removed.
  • imported/blink/http/tests/svg/resources: Removed.
  • platform/ios/TestExpectations:
10:34 AM Changeset in webkit [278091] by commit-queue@webkit.org
  • 4 edits in trunk

URL path setter messes up UTF-8 encoding after ?
https://bugs.webkit.org/show_bug.cgi?id=226136

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

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-setters-expected.txt:

Source/WTF:

escapePathWithoutCopying needs to tell percentEncodeCharacters to percent encode all non-ASCII characters in the output of UTF-8 encoding
in addition to ? and #. Otherwise, we take the output of UTF-8 encoding and append each code unit to the input of URL parsing as if it were Latin-1.
This matches Chrome, Firefox, and reason.
Covered by a newly passing WPT test.
Other callers of percentEncodeCharacters use functions that already encode all non-ASCII characters.

  • wtf/URL.cpp:

(WTF::escapePathWithoutCopying):

10:08 AM Changeset in webkit [278090] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.4-branch/Source

Versioning.

WebKit-7612.1.15.4.1

10:04 AM Changeset in webkit [278089] by Chris Dumez
  • 5 edits in trunk

Drop SecurityPolicyViolationEvent's blockedURL & documentURL attributes
https://bugs.webkit.org/show_bug.cgi?id=226270

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT test due to change.

  • web-platform-tests/content-security-policy/securitypolicyviolation/idlharness.window-expected.txt:

Source/WebCore:

Drop SecurityPolicyViolationEvent's blockedURL & documentURL attributes that I very recently added as part of
r278042. No other browser supports those and it looks like they may get dropped from the spec
(https://github.com/w3c/webappsec-csp/issues/498) since the blockedURI/documentURI cannot be renamed in the
SecurityPolicyViolationEventInit dictionary.

This is basically a partial revert of r278042, while we work on the spec to get updated to match browsers.

  • dom/SecurityPolicyViolationEvent.h:
  • dom/SecurityPolicyViolationEvent.idl:
9:47 AM Changeset in webkit [278088] by Russell Epstein
  • 1 copy in branches/safari-612.1.15.4-branch

New branch.

9:46 AM Changeset in webkit [278087] by Chris Dumez
  • 16 edits in trunk/Source

Stop using UncheckedLock in WTF::AutomaticThread
https://bugs.webkit.org/show_bug.cgi?id=226255

Reviewed by Keith Miller.

Source/JavaScriptCore:

Some code in JSC had to be ported from UncheckedLock to Lock as a result of
WTF::AutomaticThread using the Lock type.

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::Worklist):

  • dfg/DFGWorklist.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):

  • heap/Heap.h:
  • jit/JITWorklist.cpp:

(JSC::JITWorklist::JITWorklist):

  • jit/JITWorklist.h:
  • runtime/VMTraps.cpp:

(JSC::VMTraps::VMTraps):

  • runtime/VMTraps.h:
  • wasm/WasmWorklist.cpp:

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

  • wasm/WasmWorklist.h:

Source/WTF:

Stop using UncheckedLock in WTF::AutomaticThread as it is being phased out in favor of
Lock, which supports Clang thread safety analysis.

  • wtf/AutomaticThread.cpp:

(WTF::AutomaticThreadCondition::wait):
(WTF::AutomaticThreadCondition::waitFor):
(WTF::AutomaticThread::AutomaticThread):

  • wtf/AutomaticThread.h:
  • wtf/ParallelHelperPool.cpp:

(WTF::ParallelHelperClient::~ParallelHelperClient):
(WTF::ParallelHelperClient::finish):
(WTF::ParallelHelperClient::finishWithLock):
(WTF::ParallelHelperPool::ParallelHelperPool):

  • wtf/ParallelHelperPool.h:

(WTF::ParallelHelperPool::numberOfThreads const):

  • wtf/WorkerPool.cpp:

(WTF::WorkerPool::WorkerPool):

  • wtf/WorkerPool.h:
9:30 AM Changeset in webkit [278086] by Alan Bujtas
  • 3 edits
    1 add in trunk/Source/WebCore

[LFC] Introduce containingBlockChain iterator
https://bugs.webkit.org/show_bug.cgi?id=226269

Reviewed by Antti Koivisto.

Let's use the range loop syntax to climb the containing block chain.

  • WebCore.xcodeproj/project.pbxproj:
  • layout/formattingContexts/table/TableFormattingQuirks.cpp:

(WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

  • layout/layouttree/LayoutContainingBlockChainIterator.h: Added.

(WebCore::Layout::LayoutContainingBlockChainIterator::operator* const):
(WebCore::Layout::LayoutContainingBlockChainIterator::operator-> const):
(WebCore::Layout::LayoutContainingBlockChainIterator::operator== const):
(WebCore::Layout::LayoutContainingBlockChainIterator::operator!= const):
(WebCore::Layout::LayoutContainingBlockChainIterator::LayoutContainingBlockChainIterator):
(WebCore::Layout::LayoutContainingBlockChainIterator::operator++):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::LayoutContainingBlockChainIteratorAdapter):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::begin):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::end):
(WebCore::Layout::containingBlockChainOf):

8:35 AM Changeset in webkit [278085] by Ruben Turcios
  • 8 edits in branches/safari-612.1.15.1-branch/Source

Versioning.

WebKit-7612.1.15.1.14

8:34 AM Changeset in webkit [278084] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.0-branch/Source

Versioning.

WebKit-7612.1.15.0.8

8:23 AM Changeset in webkit [278083] by Jonathan Bedard
  • 2 edits in trunk/Tools

[test-lldb-webkit] Update for Xcode 12.5
https://bugs.webkit.org/show_bug.cgi?id=226115
<rdar://problem/78331664>

Reviewed by Darin Adler.

  • lldb/lldb_webkit_unittest.py:

(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): Use unicode directly.
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): Ditto.
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): Ditto.
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): Ditto.

8:15 AM Changeset in webkit [278082] by Tadeu Zagallo
  • 35 edits
    3 copies
    9 moves
    3 adds
    4 deletes in trunk/Source/JavaScriptCore

Merge all the JIT worklists into a shared worklist
https://bugs.webkit.org/show_bug.cgi?id=226207

Reviewed by Saam Barati.

Delete the DFG and FTL worklists and refactor JITWorklist to handle the compilation
for all tiers. This reduces the total number of compiler threads while allowing each
tier to use more threads whenever necessary. The default configuration is for the
worklist to have 3 threads, baseline can use up to all 3 threads and DFG and FTL follow
the previous limits set through JSC::Options. Right now, the worklist will only do work
on upper tiers when all lower tiers have no pending tasks or have exceeded the maximum
number of concurrent compilations. i.e. by default we only DFG compile when there are
no baseline tasks in the queue and we only FTL compile when we either have no DFG tasks
in the queue OR there are already 2 DFG compilations in progress.

  • API/JSVirtualMachine.mm:

(+[JSVirtualMachine setNumberOfDFGCompilerThreads:]):
(+[JSVirtualMachine setNumberOfFTLCompilerThreads:]):

  • API/tests/testapi.mm:

(runJITThreadLimitTests):

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

(JSC::CodeBlock::checkIfOptimizationThresholdReached):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCommon.h:

(JSC::DFG::verboseCompilationEnabled):
(JSC::DFG::logCompilationChanges):
(JSC::DFG::shouldDumpGraphAtEachPhase):
(JSC::DFG::shouldDumpDisassembly):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):
(JSC::DFG::compile):

  • dfg/DFGDriver.h:
  • dfg/DFGGraph.h:
  • dfg/DFGGraphSafepoint.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::OSRAvailabilityAnalysisPhase::run):

  • dfg/DFGOSREntrypointCreationPhase.cpp:

(JSC::DFG::OSREntrypointCreationPhase::run):

  • dfg/DFGOperations.cpp:

(JSC::DFG::triggerFTLReplacementCompile):
(JSC::DFG::tierUpCommon):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::codeSize const):
(JSC::DFG::Plan::finalizeInGC):
(JSC::DFG::Plan::notifyReady):
(JSC::DFG::Plan::cancel):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::finalize):
(JSC::DFG::Plan::iterateCodeBlocksForGC):
(JSC::DFG::Plan::checkLivenessAndVisitChildren):
(JSC::DFG::Plan::isKnownToBeLiveDuringGC):
(JSC::DFG::Plan::isKnownToBeLiveAfterGC):

  • dfg/DFGPlan.h:
  • dfg/DFGPlanInlines.h: Removed.
  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):

  • dfg/DFGWorklist.cpp: Removed.
  • dfg/DFGWorklist.h: Removed.
  • dfg/DFGWorklistInlines.h: Removed.
  • ftl/FTLCompile.h:
  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::buildExitArguments):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

  • ftl/FTLState.h:

(JSC::FTL::verboseCompilationEnabled):
(JSC::FTL::shouldDumpDisassembly):

  • heap/Heap.cpp:

(JSC::Heap::completeAllJITPlans):
(JSC::Heap::iterateExecutingAndCompilingCodeBlocks):
(JSC::Heap::removeDeadCompilerWorklistEntries):
(JSC::Heap::stopThePeriphery):
(JSC::Heap::suspendCompilerThreads):
(JSC::Heap::resumeCompilerThreads):
(JSC::Heap::addCoreConstraints):

  • heap/Heap.h:
  • heap/RootMarkReason.h:
  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::codeSize const):
(JSC::JIT::compileTimeStats):

  • jit/JIT.h:
  • jit/JITBaselinePlan.cpp: Copied from Source/JavaScriptCore/ftl/FTLState.cpp.

(JSC::JITBaselinePlan::JITBaselinePlan):
(JSC::JITBaselinePlan::compileInThreadImpl):
(JSC::JITBaselinePlan::codeSize const):
(JSC::JITBaselinePlan::finalize):

  • jit/JITBaselinePlan.h: Copied from Source/JavaScriptCore/dfg/DFGScannable.h.
  • jit/JITCompilationKey.cpp: Renamed from Source/JavaScriptCore/dfg/DFGCompilationKey.cpp.

(JSC::JITCompilationKey::dump const):

  • jit/JITCompilationKey.h: Renamed from Source/JavaScriptCore/dfg/DFGCompilationKey.h.

(JSC::JITCompilationKey::JITCompilationKey):
(JSC::JITCompilationKey::operator! const):
(JSC::JITCompilationKey::isHashTableDeletedValue const):
(JSC::JITCompilationKey::mode const):
(JSC::JITCompilationKey::operator== const):
(JSC::JITCompilationKey::hash const):
(JSC::JITCompilationKeyHash::hash):
(JSC::JITCompilationKeyHash::equal):

  • jit/JITCompilationMode.cpp: Renamed from Source/JavaScriptCore/dfg/DFGCompilationMode.cpp.

(WTF::printInternal):

  • jit/JITCompilationMode.h: Renamed from Source/JavaScriptCore/dfg/DFGCompilationMode.h.

(JSC::isFTL):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITPlan.cpp: Added.

(JSC::JITPlan::JITPlan):
(JSC::JITPlan::cancel):
(JSC::JITPlan::notifyCompiling):
(JSC::JITPlan::notifyReady):
(JSC::JITPlan::tier const):
(JSC::JITPlan::key):
(JSC::JITPlan::isKnownToBeLiveAfterGC):
(JSC::JITPlan::isKnownToBeLiveDuringGC):
(JSC::JITPlan::iterateCodeBlocksForGC):
(JSC::JITPlan::checkLivenessAndVisitChildren):
(JSC::JITPlan::computeCompileTimes const):
(JSC::JITPlan::reportCompileTimes const):
(JSC::JITPlan::compileInThread):

  • jit/JITPlan.h: Added.

(JSC::JITPlan::~JITPlan):
(JSC::JITPlan::vm const):
(JSC::JITPlan::codeBlock const):
(JSC::JITPlan::thread const):
(JSC::JITPlan::mode const):
(JSC::JITPlan::stage const):
(JSC::JITPlan::isFTL const):
(JSC::JITPlan::finalizeInGC):

  • jit/JITPlanStage.h: Renamed from Source/JavaScriptCore/dfg/DFGThreadData.cpp.
  • jit/JITSafepoint.cpp: Renamed from Source/JavaScriptCore/dfg/DFGSafepoint.cpp.

(JSC::Safepoint::Safepoint):
(JSC::Safepoint::~Safepoint):
(JSC::Safepoint::begin):
(JSC::Safepoint::cancel):

  • jit/JITSafepoint.h: Renamed from Source/JavaScriptCore/dfg/DFGSafepoint.h.
  • jit/JITScannable.h: Copied from Source/JavaScriptCore/dfg/DFGScannable.h.
  • jit/JITWorklist.cpp:

(JSC::JITWorklist::JITWorklist):
(JSC::JITWorklist::~JITWorklist):
(JSC::JITWorklist::existingGlobalWorklistOrNull):
(JSC::JITWorklist::ensureGlobalWorklist):
(JSC::JITWorklist::enqueue):
(JSC::JITWorklist::queueLength const):
(JSC::JITWorklist::suspendAllThreads):
(JSC::JITWorklist::resumeAllThreads):
(JSC::JITWorklist::compilationState):
(JSC::JITWorklist::completeAllReadyPlansForVM):
(JSC::JITWorklist::waitUntilAllPlansForVMAreReady):
(JSC::JITWorklist::completeAllPlansForVM):
(JSC::JITWorklist::cancelAllPlansForVM):
(JSC::JITWorklist::removeDeadPlans):
(JSC::JITWorklist::setMaximumNumberOfConcurrentDFGCompilations):
(JSC::JITWorklist::setMaximumNumberOfConcurrentFTLCompilations):
(JSC::JITWorklist::visitWeakReferences):
(JSC::JITWorklist::dump const):
(JSC::JITWorklist::removeAllReadyPlansForVM):
(JSC::JITWorklist::removeMatchingPlansForVM):

  • jit/JITWorklist.h:

(JSC::JITWorklist::static_cast<size_t>):

  • jit/JITWorklistInlines.h: Renamed from Source/JavaScriptCore/dfg/DFGScannable.h.

(JSC::JITWorklist::iterateCodeBlocksForGC):

  • jit/JITWorklistThread.cpp: Added.

(JSC::JITWorklistThread::JITWorklistThread):
(JSC::JITWorklistThread::name const):
(JSC::JITWorklistThread::poll):
(JSC::JITWorklistThread::work):
(JSC::JITWorklistThread::threadDidStart):
(JSC::JITWorklistThread::threadIsStopping):

  • jit/JITWorklistThread.h: Renamed from Source/JavaScriptCore/dfg/DFGThreadData.h.
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):

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

(JSC::VM::~VM):

7:23 AM Changeset in webkit [278081] by Sam Sneddon
  • 3 edits in trunk/Tools

Fix remaining test-webkitpy{,-python2} --all --integration-tests failures
https://bugs.webkit.org/show_bug.cgi?id=226242

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py:

(GitTest.test_remote_branch_ref): Allow main
(GitTest.test_native_branch): Allow main
(SVNTest.clean_bogus_dir): Deleted.
(SVNTest.test_diff_for_file_with_existing_bogus_dir): Deleted.
(SVNTest.test_diff_for_file_with_missing_bogus_dir): Deleted.

  • Scripts/webkitpy/common/checkout/scm/svn.py:

(SVN._setup_bogus_dir): Use tempfile
(SVN._teardown_bogus_dir): Make no-op when no bogus dir exists
(SVN._bogus_dir_name): Deleted.

6:28 AM Changeset in webkit [278080] by Alan Bujtas
  • 4 edits
    2 adds in trunk

REGRESSION: Safari v14.1 computes element height to be 33,554,432 pixels
https://bugs.webkit.org/show_bug.cgi?id=226006
<rdar://problem/78471122>

Reviewed by Antti Koivisto.

Source/WebCore:

We fail to find the intrusive floats when they don't line up with the top of the line.

The fix is twofold here.

  • when probing for the intrusive float boxes, we need to look at both the line geometry and the initial line constraints. When the intrusive floats take up the entire horizontal space and the line ends up with no inline content, the computed line geometry may come back with a 0px tall line. Now if we probe the intrusive floats at [top: 0px, bottom: 0px] and they happen to have a vertical offset e.g 1px, we won't find them (since we only scan at 0px vertically).
  • if we still don't find the intrusive float(s), let's just offset the next line by the line height candidate (e.g. 18px) instead of the "inifitePoint". The layout will likely be incorrect but it won't produce an infinitely tall content.

Test: fast/inline/inline-root-with-negative-margin-and-sibling-float.html

  • layout/floats/FloatingContext.h:
  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

LayoutTests:

  • fast/inline/inline-root-with-negative-margin-and-sibling-float-expected.html: Added.
  • fast/inline/inline-root-with-negative-margin-and-sibling-float.html: Added.
12:19 AM Changeset in webkit [278079] by Cameron McCormack
  • 2 edits
    19 adds in trunk/LayoutTests

Followup test expectation updates.
https://bugs.webkit.org/show_bug.cgi?id=225586
<rdar://77527890>

Unreviewed.

  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-minsize-maxsize-001-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-stretch-properties-dynamic-001-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-combining-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-002-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-005-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt: Added.
  • platform/mac-bigsur-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002-expected.txt: Added.
  • platform/mac/TestExpectations:
Note: See TracTimeline for information about the timeline view.