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

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.

Note: See TracTimeline for information about the timeline view.