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

Timeline



Jan 16, 2022:

10:44 PM Changeset in webkit [288087] by youenn@apple.com
  • 32 edits in trunk

Enforce focus check for getUserMedia
https://bugs.webkit.org/show_bug.cgi?id=235026

Source/WebCore:

Reviewed by Eric Carlson.

Add infrastructure to register a callback so that a task is executed when the document is visible.
Use this to delay getUserMedia requests until document is visible.
The spec currently defines that we should wait for the current document to have focus but this is about to be changed and is not aligned with other browser implementations.

The patch also moves some getUserMedia checks earlier so as to respect order provided by the specs.
Add a check to validate getDisplayMedia is called on a visible document as the user gesture is now time based.

Covered by API test.

  • Modules/mediastream/MediaDevices.cpp:
  • Modules/mediastream/UserMediaRequest.cpp:
  • Modules/mediastream/UserMediaRequest.h:
  • dom/Document.cpp:
  • dom/Document.h:
  • editing/FrameSelection.cpp:

Source/WebKit:

Reviewed by Eric Carlson.

Add setters/getters for the getUserMedia focus settings.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetGetUserMediaRequiresFocus):
(WKPreferencesGetGetUserMediaRequiresFocus):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _getUserMediaRequiresFocus]):
(-[WKPreferences _setGetUserMediaRequiresFocus:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/glib/WebKitSettings.cpp:

(webkitSettingsSetGetUserMediaRequiresFocus):

  • UIProcess/API/glib/WebKitSettingsPrivate.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseMap): Always add the WindowIsActive flag under xvfb.
(webkitWebViewBaseIsFocused): Always consider the view focused when WindowIsActive flag is present under xvfb.

Source/WTF:

Reviewed by Eric Carlson.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Reviewed by Eric Carlson.

Disable focus flag for testing to not require to focus the window.

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::initializeMediaCaptureConfiguration):
(TestWebKitAPI::doCaptureMuteTest):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaNavigation.mm:

(TestWebKitAPI::initializeMediaCaptureConfiguration):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/GetUserMediaReprompt.mm:

(TestWebKitAPI::initializeMediaCaptureConfiguration):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/MediaStreamTrackDetached.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/UserMedia.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/AudioBufferSize.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm:

(TestWebKitAPI::GetDisplayMediaTest::SetUp):

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

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaDisabled.mm:

(MediaCaptureDisabledTest::SetUp):

  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:

(MediaCaptureSimulateFailedSandbox::SetUp):

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewUserMediaEnumerateDevicesPermissionCheck):
(testWebViewUserMediaPermissionRequests):
(testWebViewAudioOnlyUserMediaPermissionRequests):

LayoutTests:

Reviewed by Eric Carlson.

  • fast/mediastream/MediaDevices-getUserMedia-expected.txt:
10:41 PM Changeset in webkit [288086] by youenn@apple.com
  • 5 edits in trunk

Queue a task to fire MediaStreamTrack ended event
https://bugs.webkit.org/show_bug.cgi?id=235227

Reviewed by Eric Carlson.

Source/WebCore:

Adding a specific readyState slot to match the spec and queue a task to stop the track instead of firing the event synchronously.
Covered by updated test.

  • Modules/mediastream/MediaStreamTrack.cpp:
  • Modules/mediastream/MediaStreamTrack.h:

LayoutTests:

  • fast/mediastream/media-stream-track-source-failure.html:
9:18 PM Changeset in webkit [288085] by Lauro Moura
  • 25 edits in trunk/Source

Fix C++20 build warnings with GCC
https://bugs.webkit.org/show_bug.cgi?id=235023

Reviewed by Alex Christensen.

Mostly related to deprecating operations between enums of different
types and not capturing this by default in lambdas.

Source/JavaScriptCore:

  • assembler/X86Assembler.h: Casting enums to same type.

(JSC::X86Assembler::cmovcc):
(JSC::X86Assembler::jccRel32):
(JSC::X86Assembler::setccOpcode):

  • b3/B3CheckSpecial.cpp: Capture this in lambda.

(JSC::B3::CheckSpecial::generate):

  • b3/B3Type.cpp: Replace is_pod_v is is_standard_layout_v and

is_trivial_v

  • bytecode/AccessCase.cpp: Capture this in lambda.

(JSC::AccessCase::generateImpl):

  • bytecode/CallLinkInfo.cpp: Ditto.

(JSC::OptimizingCallLinkInfo::emitDirectFastPath):
(JSC::OptimizingCallLinkInfo::emitDirectTailCallFastPath):
(JSC::OptimizingCallLinkInfo::initializeDirectCall):

  • dfg/DFGSpeculativeJIT.cpp: Ditto.
  • dfg/DFGSpeculativeJIT64.cpp: Ditto.

(JSC::DFG::SpeculativeJIT::compile):

  • jit/ICStats.h: Cast enums to same type.

(JSC::ICEvent::hash const):

  • jit/JITArithmetic.cpp: Capture this in lambda.

(JSC::JIT::emitMathICSlow):

  • jit/JITSizeStatistics.cpp: Ditto.

(JSC::JITSizeStatistics::markEnd):

  • runtime/VM.cpp: Ditto.

(JSC::VM::deleteAllLinkedCode):
(JSC::VM::deleteAllCode):
(JSC::VM::shrinkFootprintWhenIdle):

  • wasm/WasmAirIRGenerator.cpp: Ditto.

(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addTableInit):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::addTableCopy):
(JSC::Wasm::AirIRGenerator::addMemoryFill):
(JSC::Wasm::AirIRGenerator::addMemoryCopy):
(JSC::Wasm::AirIRGenerator::addMemoryInit):
(JSC::Wasm::AirIRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::AirIRGenerator::emitAtomicLoadOp):
(JSC::Wasm::AirIRGenerator::emitAtomicStoreOp):
(JSC::Wasm::AirIRGenerator::emitAtomicBinaryRMWOp):
(JSC::Wasm::AirIRGenerator::emitAtomicCompareExchange):
(JSC::Wasm::AirIRGenerator::atomicWait):
(JSC::Wasm::AirIRGenerator::atomicNotify):
(JSC::Wasm::AirIRGenerator::emitEntryTierUpCheck):
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::AirIRGenerator::addCallRef):
(JSC::Wasm::AirIRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF32>):

  • wasm/WasmB3IRGenerator.cpp: Ditto.

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addTableInit):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addTableCopy):
(JSC::Wasm::B3IRGenerator::emitIndirectCall):
(JSC::Wasm::B3IRGenerator::addMemoryFill):
(JSC::Wasm::B3IRGenerator::addMemoryInit):
(JSC::Wasm::B3IRGenerator::addMemoryCopy):
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffsetForAtomicOps):
(JSC::Wasm::B3IRGenerator::atomicWait):
(JSC::Wasm::B3IRGenerator::atomicNotify):
(JSC::Wasm::B3IRGenerator::emitEntryTierUpCheck):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::B3IRGenerator::addCallRef):
(JSC::Wasm::B3IRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):

  • yarr/YarrJIT.cpp: Ditto.

Source/WebCore:

  • dom/ViewportArguments.h: Replace enum with constexpr ints as they're

compared to doubles in various places through ViewportArguments.cpp.

  • dom/WheelEvent.h: Replace single-valued enum with constexpr

variable.

  • platform/animation/Animation.h: Ditto.
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

Ditto.
(WebCore::CoordinatedGraphicsLayer::shouldDirectlyCompositeImage const):

  • rendering/style/RenderStyleConstants.h: Merge two enums that are

used only in the context of being combined to form a third enum.

Source/WebKit:

  • WebProcess/Inspector/WebInspector.cpp: Capture this in lambdas.

(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::startElementSelection):
(WebKit::WebInspector::stopElementSelection):

Source/WTF:

  • wtf/AutomaticThread.cpp: Capture this in lambda.

(WTF::AutomaticThread::start):

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

Tag Safari-612.4.9.0.3.

7:54 PM Changeset in webkit [288083] by bshafiei@apple.com
  • 1 copy in tags/Safari-612.4.9.1.5

Tag Safari-612.4.9.1.5.

7:49 PM Changeset in webkit [288082] by bshafiei@apple.com
  • 4 edits
    4 adds in branches/safari-612.4.9.0-branch

Cherry-pick r288078. rdar://problem/85801310

database names leak cross-origin within the same browser session
https://bugs.webkit.org/show_bug.cgi?id=233548

Reviewed by Geoff Garen.

Source/WebCore:

Test: http/tests/security/getdatabases-crossorigin.html

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): When iterating the set of all open UniqueIDBDatabases, only add them to the results list if their origins match.
  • page/ClientOrigin.h: (WebCore::ClientOrigin::operator!= const):

LayoutTests:

  • http/tests/security/getdatabases-crossorigin-expected.txt: Added.
  • http/tests/security/getdatabases-crossorigin.html: Added.
  • http/tests/security/resources/getdatabases-otherframe.html: Added.
  • http/tests/security/resources/getdatabases-otherwindow.html: Added.

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

7:46 PM Changeset in webkit [288081] by bshafiei@apple.com
  • 4 edits
    4 adds in branches/safari-612.4.9.1-branch

Cherry-pick r288078. rdar://problem/85801310

database names leak cross-origin within the same browser session
https://bugs.webkit.org/show_bug.cgi?id=233548

Reviewed by Geoff Garen.

Source/WebCore:

Test: http/tests/security/getdatabases-crossorigin.html

  • Modules/indexeddb/server/IDBServer.cpp: (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): When iterating the set of all open UniqueIDBDatabases, only add them to the results list if their origins match.
  • page/ClientOrigin.h: (WebCore::ClientOrigin::operator!= const):

LayoutTests:

  • http/tests/security/getdatabases-crossorigin-expected.txt: Added.
  • http/tests/security/getdatabases-crossorigin.html: Added.
  • http/tests/security/resources/getdatabases-otherframe.html: Added.
  • http/tests/security/resources/getdatabases-otherwindow.html: Added.

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

7:41 PM Changeset in webkit [288080] by bshafiei@apple.com
  • 8 edits in branches/safari-612.4.9.1-branch/Source

Versioning.

WebKit-7612.4.9.1.5

7:36 PM Changeset in webkit [288079] by bshafiei@apple.com
  • 8 edits in branches/safari-612.4.9.0-branch/Source

Versioning.

WebKit-7612.4.9.0.3

7:35 PM Changeset in webkit [288078] by beidson@apple.com
  • 4 edits
    4 adds in trunk

database names leak cross-origin within the same browser session
https://bugs.webkit.org/show_bug.cgi?id=233548

Reviewed by Geoff Garen.

Source/WebCore:

Test: http/tests/security/getdatabases-crossorigin.html

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): When iterating the set of all open

UniqueIDBDatabases, only add them to the results list if their origins match.

  • page/ClientOrigin.h:

(WebCore::ClientOrigin::operator!= const):

LayoutTests:

  • http/tests/security/getdatabases-crossorigin-expected.txt: Added.
  • http/tests/security/getdatabases-crossorigin.html: Added.
  • http/tests/security/resources/getdatabases-otherframe.html: Added.
  • http/tests/security/resources/getdatabases-otherwindow.html: Added.
5:04 PM Changeset in webkit [288077] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Use character names instead of codepoint values in overrideControlCharacters()
https://bugs.webkit.org/show_bug.cgi?id=235283

Reviewed by Cameron McCormack.

It's simply easier to read.

No new tests because there is no behavior change.

  • platform/graphics/Font.cpp:

(WebCore::overrideControlCharacters):

2:10 PM Changeset in webkit [288076] by Cameron McCormack
  • 9 edits in trunk/Source

Ensure in flight layer transactions don't accumulate further canvas drawing
https://bugs.webkit.org/show_bug.cgi?id=231163
<rdar://problem/83863292>

Reviewed by Simon Fraser.

Source/WebCore:

When UI side compositing is enabled (as it is on iOS), we build a
layer tree transaction in RemoteLayerTreeDrawingArea::updateRendering to
send off to the UI process. At a high level, updateRendering does this:

  1. Run any requestAnimationFrame callbacks
  2. Iterate over the composited layers to draw their contents into the layer backing stores
  3. Dispatch a task to a different thread to flush the contexts of the layer backing stores and then send the transaction to the UI process

Step 3 is done off a separate task as an optimization, to get the
drawing work queued up by step 2 happening in parallel to any work the
page may day once updateRendering is finished. This can be a problem
when:

  • GPU process canvas rendering is enabled (but DOM rendering is disabled)
  • we have accelerated ImageBuffers for both layer backing stores and canvas backing stores
  • the page does canvas drawing between steps 2 and 3, which affects the contents of a canvas backing store IOSurface that was drawn into a layer backing store IOSurface while building the transaction

The way we draw the canvas contents into the layer is by creating a
CGImage from the canvas backing store ImageBuffer's IOSurface.
Normally, if we draw into an IOSurface that has been wrapped by a
CGImage, this will cause the CGImage to obtain a unique copy of the
IOSurface's pixels, rather than continue holding on to the IOSurface
itself.

When the drawing of this CGImage on to the layer backing store
IOSurface happens, the "draw image" command is queued up to be
processed later. It's only when the flush happens in step 3 above that
the drawing occurs. This means that the CGImage wrapping the IOSurface
exists until that flush.

But while the CGImage does exist, it's in the Web process, and the
canvas drawing on to the same IOSurface happens in the GPU process.
Since QuartzCore doesn't know of its existence, it doesn't cause the
copy-on-write to occur. The effect of this is that subsequent page
drawing on to the canvas can make its way into the layer transaction
unexpectedly.

This patch induces the copy-on-write in the Web process when needed,
by tracking whether a canvas has been drawn into a layer backing
store and the layer transaction flush hasn't happened yet. Just before
we do any more drawing on the canvas, if we are in this state, we
perform a no-op drawing command on the IOSurface, then flush, to make
the CGImage copy the IOSurface data out.

  • html/HTMLCanvasElement.cpp:

(WebCore::imageDrawingRequiresGuardAgainstUseByPendingLayerTransaction):
We only need to induce the CGImage copy-on-write behavior if both the
layer and canvas backing stores are accelerated, the canvas
ImageBuffer is remote, and the layer ImageBuffer is not remote.
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::drawingContext const):
Use drawingContext as a convenient single place to check whether we
are performing the first drawing command before the layer tree
transaction flush has happened.

  • html/HTMLCanvasElement.h:
  • page/Page.h:

(WebCore::Page::setIsAwaitingLayerTreeTransactionFlush):
(WebCore::Page::isAwaitingLayerTreeTransactionFlush const):

  • platform/graphics/ImageBufferBackend.h:

(WebCore::ImageBufferBackend::ensureNativeImagesHaveCopiedBackingStore):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::ensureNativeImagesHaveCopiedBackingStore):
The flush is needed since the CGImage wrapping the IOSurface will only
copy the pixel data out once the no-op drawing command is processed.

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::willCommitLayerTree):
(WebKit::WebPage::didFlushLayerTreeAtTime):
Inform the WebCore::Page about the state of the layer tree transaction
building.

  • WebProcess/WebPage/WebPage.h:
1:44 PM Changeset in webkit [288075] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

[WTF] Add TollFreeBridging.h to Xcode project

Unreviewed follow-up for r284038:

Switch WTF::bridge_cast to use type traits
<https://webkit.org/b/231467>
<rdar://problem/84050614>

  • WTF.xcodeproj/project.pbxproj:
  • Add TollFreeBridging.h to the project.
1:34 PM Changeset in webkit [288074] by ddkilzer@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION (r286603): Leak of three NSMutableDictionary objects each time rx::DisplayMtl::getMetalDeviceMatchingAttribute() is called
<https://webkit.org/b/235278>
<rdar://problem/87653812>

Reviewed by Darin Adler.

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

(rx::DisplayMtl::getMetalDeviceMatchingAttribute):

  • Make use of mtl::adoptObjCObj<> so these objects are relaseed when the method returns.
12:51 PM Changeset in webkit [288073] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

After r288052 added editing/execCommand/paste-as-quotation-disconnected-paragraph-ancestor-crash.html,
WinCairo WK1 tests subsequent to the test case had been failing.
It looked like DRT output the result of the privous test case.

  • platform/wincairo-wk1/TestExpectations: Skip the test case as well as AppleWin does.
1:08 AM Changeset in webkit [288072] by ChangSeok Oh
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] local build is broken
https://bugs.webkit.org/show_bug.cgi?id=235265

Reviewed by Philippe Normand.

The local build of Flatpak SDK is broken due to a missing reference to the freedesktop sdk.
This change updates the reference.

  • elements/freedesktop-sdk.bst:

Jan 15, 2022:

10:22 PM Changeset in webkit [288071] by weinig@apple.com
  • 18 edits in trunk

CSS Gradients: interpolation mode should default to OKLab if any non-legacy color syntax colors are used in the stops
https://bugs.webkit.org/show_bug.cgi?id=235071

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test to also include non-legacy color syntax stops and update results
to match new expected behavior.

  • web-platform-tests/css/css-images/parsing/gradient-interpolation-method-computed-expected.txt:
  • web-platform-tests/css/css-images/parsing/gradient-interpolation-method-computed.html:
  • web-platform-tests/css/css-images/parsing/gradient-interpolation-method-valid-expected.txt:
  • web-platform-tests/css/css-images/parsing/gradient-interpolation-method-valid.html:

Source/WebCore:

Change the default interpolation mode for CSS gradients that have any color stops specified using non-legacy
color syntax (e.g. color(...), lab(...), oklch(...), etc.) to OKLab from sRGB.

This is the current behavior specified (kind of, it could be clearer) by the spec, but I have concerns about
whether it is a good idea for the behavior to be dependent on what syntax style you use. This has been raised
with the editors at https://github.com/w3c/csswg-drafts/issues/6914.

To implement, we now compute the default color interpolation method from the parsed stop list and pass the
result to CSSGradientValue along with the stops and other data. The CSSGradientValue needs this information
avoid computing on serialization, since we need to conditionally exclude either "in srgb" or "in oklab"
depending on which one is computed.

To continue passing the interpolation color method to the CSSGradientValue constructor so it can be immutable,
we now need to consume all the color stops before we can create the CSSGradientValue. This also allows us to
pass the stops to the constructor and make them immutable as well.

  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::equals const):
(WebCore::appendColorInterpolationMethod):
(WebCore::CSSLinearGradientValue::customCSSText const):
(WebCore::CSSRadialGradientValue::customCSSText const):
(WebCore::CSSConicGradientValue::customCSSText const):

  • css/CSSGradientValue.h:

(WebCore::CSSGradientValue::setSecondY):
(WebCore::CSSGradientValue::CSSGradientValue):
(WebCore::CSSGradientValue::defaultColorInterpolationMethod const):
(WebCore::CSSGradientValue::addStop): Deleted.
(WebCore::CSSGradientValue::doneAddingStops): Deleted.
(WebCore::CSSGradientValue::hasAtLeastTwoStops const): Deleted.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
(WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
(WebCore::CSSPropertyParserHelpers::consumePrefixedRadialGradient):
(WebCore::CSSPropertyParserHelpers::computeGradientColorInterpolationMethod):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumePrefixedLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeConicGradient):

  • html/HTMLInputElement.cpp:

(WebCore::autoFillStrongPasswordMaskImage):

Source/WebKitLegacy/win:

Add support for tests enabling the CSSGradientInterpolationColorSpacesEnabled preference.

  • WebPreferences.cpp:

(WebPreferences::cssGradientInterpolationColorSpacesEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):
Add default for Windows WebKitLegacy testing which still requires it.

LayoutTests:

Update test to use an explicit interpolation method when using non-legacy colors to maintain srgb interpolation.

  • css3/color/gradients.html:
8:43 PM Changeset in webkit [288070] by Alan Bujtas
  • 29 edits
    3 copies
    2 deletes in trunk

[LFC][IFC] Enable content with complex font codepath for IFC
https://bugs.webkit.org/show_bug.cgi?id=235266

Reviewed by Antti Koivisto.

Source/WebCore:

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForFontAndText):

LayoutTests:

  • TestExpectations:
  • fast/text/simple-line-layout-simple-text-but-complex-font-path-expected.html: Removed.
  • fast/text/simple-line-layout-simple-text-but-complex-font-path.html: Removed.
  • platform/mac-bigsur/fast/dom/52776-expected.txt:
  • platform/mac-bigsur/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/mac-catalina/platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.txt:
  • platform/mac/fast/dom/52776-expected.txt:
  • platform/mac/fast/text/atsui-negative-spacing-features-expected.txt:
  • platform/mac/fast/text/atsui-spacing-features-expected.txt:
  • platform/mac/fast/text/combining-enclosing-keycap-expected.txt:
  • platform/mac/fast/text/international/bidi-control-chars-treated-as-ZWS-expected.txt:
  • platform/mac/fast/text/international/bidi-linebreak-001-expected.txt:
  • platform/mac/fast/text/international/bidi-linebreak-002-expected.txt:
  • platform/mac/fast/text/international/bidi-linebreak-003-expected.txt:
  • platform/mac/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/mac/fast/text/wide-zero-width-space-expected.txt:
  • platform/mac/platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.txt:
  • platform/win/TestExpectations:
5:33 PM Changeset in webkit [288069] by Chris Dumez
  • 65 edits in trunk/Source

Introduce dynamicDowncast<>() for convenience
https://bugs.webkit.org/show_bug.cgi?id=235259

Reviewed by Darin Adler.

Source/WebCore:

Start adopting dynamicDowncast<>().

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::willChangeRenderer):
(WebCore::WebAnimation::timingDidChange):
(WebCore::WebAnimation::invalidateEffect):
(WebCore::WebAnimation::finishNotificationSteps):
(WebCore::WebAnimation::resolve):
(WebCore::WebAnimation::persist):
(WebCore::WebAnimation::commitStyles):

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::isCloneInShadowTreeOfSVGUseElement):
(WebCore::JSLazyEventListener::initializeJSFunction const):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::fontRangesForFamily):

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::insertRule):

  • dom/Attr.cpp:

(WebCore::Attr::style):

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::MainThreadBridge::ensureOnMainThread):
(WebCore::BroadcastChannel::isEligibleForMessaging const):

  • dom/CharacterData.cpp:

(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):

  • dom/CharacterData.h:

(WebCore::Node::length const):

  • dom/ComposedTreeAncestorIterator.h:

(WebCore::ComposedTreeAncestorIterator::traverseParent):
(WebCore::ComposedTreeAncestorAdapter::begin):

  • dom/ComposedTreeIterator.h:

(WebCore::firstChildInComposedTreeIgnoringUserAgentShadow):

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeNodeWithScriptAssertion):
(WebCore::ContainerNode::removeSelfOrChildNodesForInsertion):
(WebCore::destroyRenderTreeIfNeeded):
(WebCore::containsIncludingHostElements):
(WebCore::checkAcceptChild):

  • dom/ContainerNode.h:

(WebCore::Node::countChildNodes const):
(WebCore::Node::traverseToChildAt const):
(WebCore::Node::firstChild const):
(WebCore::Node::lastChild const):

  • dom/Document.cpp:

(WebCore::widgetForElement):
(WebCore::Document::buildAccessKeyCache):
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):

  • dom/Element.cpp:

(WebCore::Element::insertedIntoAncestor):
(WebCore::Element::removedFromAncestor):

  • dom/ElementInlines.h:

(WebCore::Node::parentElement const):

  • dom/EventDispatcher.cpp:

(WebCore::EventDispatcher::dispatchEvent):

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::toElement const):
(WebCore::MouseEvent::fromElement const):

  • dom/Node.cpp:

(WebCore::Node::renderBox const):
(WebCore::Node::renderBoxModelObject const):
(WebCore::Node::containingShadowRoot const):
(WebCore::Node::compareDocumentPosition):

  • dom/Position.cpp:

(WebCore::Position::containerText const):

  • dom/TextNodeTraversal.cpp:

(WebCore::TextNodeTraversal::contentsAsString):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::elementsFromPoint):

  • dom/TypedElementDescendantIterator.h:

(WebCore::ElementDescendantRange<ElementType>::from const):
(WebCore::InclusiveElementDescendantRange<ElementType>::from const):

  • dom/VisitedLinkState.cpp:

(WebCore::linkHashForElement):

  • dom/messageports/MessagePortChannelProvider.cpp:

(WebCore::MessagePortChannelProvider::fromContext):

  • editing/Editing.cpp:

(WebCore::enclosingBlock):

  • html/HTMLOptGroupElement.cpp:

(WebCore::HTMLOptGroupElement::ownerSelectElement const):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::renderEmbeddedObject const):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • page/AutoscrollController.cpp:

(WebCore::AutoscrollController::updateAutoscrollRenderer):

  • page/DOMTimer.cpp:

(WebCore::DOMTimer::fired):

  • page/DragController.cpp:

(WebCore::asFileInput):
(WebCore::DragController::operationForLoad):

  • platform/DragImage.cpp:

(WebCore::ScopedNodeDragEnabler::ScopedNodeDragEnabler):

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

(WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::computeLogicalBoxHeights):
(WebCore::placeChildInlineBoxesInBlockDirection):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::marginValuesForChild const):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::findAutoscrollable):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::imageOrientation const):

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::uploadButton const):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::updateInnerContentRect):
(WebCore::RenderImage::paintIntoRect):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::mayAffectLayout const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::renderBox const):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::updateValueNow const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::offsetParent const):

  • rendering/RenderTableCol.cpp:

(WebCore::RenderTableCol::table const):

  • rendering/RenderTreeAsText.cpp:

(WebCore::writeDebugInfo):

  • rendering/RenderView.cpp:

(WebCore::RenderView::paintBoxDecorations):

  • rendering/SelectionRangeData.cpp:

(WebCore::containingBlockBelowView):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::Parent::Parent):

  • style/ChildChangeInvalidation.h:

(WebCore::Style::ChildChangeInvalidation::ChildChangeInvalidation):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::findViewAnchor const):
(WebCore::SVGSVGElement::findRootAnchor const):

  • testing/Internals.cpp:

(WebCore::bitmapImageFromImageElement):
(WebCore::pdfDocumentImageFromImageElement):

Source/WebKit:

Start adopting dynamicDowncast<>().

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::didEnterFullScreen):

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::paymentCoordinator):

Source/WebKitLegacy/mac:

Start adopting dynamicDowncast<>().

  • DOM/DOMUIKitExtensions.mm:

(-[DOMHTMLElement structuralComplexityContribution]):

  • WebView/WebHTMLRepresentation.mm:

(inputElementFromDOMElement):

Source/WTF:

Introduce dynamicDowncast<>() for convenience. It can result in more concise code for the common pattern
where we call is<T>(x) and then downcast<T>(x).

  • wtf/TypeCasts.h:

(WTF::dynamicDowncast):

3:10 PM Changeset in webkit [288068] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

Only use diff --binary switch on Windows
<https://webkit.org/b/235268>
<rdar://problem/87490487>

Reviewed by Alexey Proskuryakov.

  • Scripts/VCSUtils.pm:

(mergeChangeLogs):

  • Only pass --binary switch on Windows.
2:29 PM Changeset in webkit [288067] by Darin Adler
  • 39 edits in trunk/Source/WebCore

First step to fix hacked isReplaced: Rename isReplaced functions to isReplacedOrInlineBlock
https://bugs.webkit.org/show_bug.cgi?id=235258

Reviewed by Alan Bujtas.

The isReplaced function returns true for things that are not CSS replaced
elements. That's confusing and not good. We want to straighten this out.
In this first step, we rename the isReplaced and setReplaced functions
to isReplacedOrInlineBlock and setReplacedOrInlineBlock. There are still
functions with out arguments named "isReplaced", which we can deal with
later. Other later clean-up and clarification could one day change what
bits we store in RenderStyle and possibly even remove this function entirely.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::nextContinuation):

  • accessibility/atk/WebKitAccessible.cpp:

(interfaceMaskFromObject):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::isNonReplacedInline):

  • dom/Node.cpp:

(WebCore::Node::renderRect):

  • dom/Position.cpp:

(WebCore::endsOfNodeAreVisuallyDistinctPositions):

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
(WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):

  • page/TextIndicator.cpp:

(WebCore::hasNonInlineOrReplacedElements):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::renderRectForPoint const):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForBox):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::adjustPosition):
(WebCore::LegacyInlineBox::canAccommodateEllipsis const):

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const):

  • rendering/LegacyInlineIterator.h:

(WebCore::isIteratorTarget):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine):
(WebCore::LegacyLineLayout::layoutLineBoxes):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):
(WebCore::LegacyRootInlineBox::verticalPositionForBox):
(WebCore::LegacyRootInlineBox::includeLeadingForBox const):
(WebCore::LegacyRootInlineBox::includeFontForBox const):
(WebCore::LegacyRootInlineBox::includeGlyphsForBox const):
(WebCore::LegacyRootInlineBox::includeInitialLetterForBox const):
(WebCore::LegacyRootInlineBox::includeMarginForBox const):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::removePositionedObjectsIfNeeded):
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
(WebCore::RenderBlock::paintChild):
(WebCore::RenderBlock::positionForPoint):
(WebCore::RenderBlock::lineHeight const):
(WebCore::RenderBlock::baselinePosition const):
(WebCore::RenderBlock::firstLineBlock const):
(WebCore::findFirstLetterBlock):
(WebCore::RenderBlock::getFirstLetter):

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

(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::InlineMinMaxIterator::next):
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::offsetFromContainer const):
(WebCore::RenderBox::positionLineBox):
(WebCore::RenderBox::computeLogicalHeight const):
(WebCore::RenderBox::shouldTreatChildAsReplacedInTableCells const):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::computePositionedLogicalHeight const):
(WebCore::RenderBox::avoidsFloats const):
(WebCore::RenderBox::isUnsplittableForPagination const):
(WebCore::RenderBox::lineHeight const):
(WebCore::RenderBox::baselinePosition const):

  • rendering/RenderBox.h:

(WebCore::RenderBox::shouldComputeSizeAsReplaced const):

  • rendering/RenderBoxModelObject.h:

(WebCore::RenderBoxModelObject::canHaveBoxInfoInFragment const):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner const):
(WebCore::RenderElement::getTrailingCorner const):
(WebCore::RenderElement::absoluteAnchorRect const):

  • rendering/RenderFullScreen.cpp:

(WebCore::RenderFullScreen::RenderFullScreen):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::RenderListMarker):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::containingBlockForPositionType):
(WebCore::RenderObject::caretMaxOffset const):

  • rendering/RenderObject.h:

(WebCore::RenderObject::hasIntrinsicAspectRatio const):
(WebCore::RenderObject::isReplacedOrInlineBlock const):
(WebCore::RenderObject::setReplacedOrInlineBlock):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
(WebCore::RenderObject::isAtomicInlineLevelBox const):
(WebCore::RenderObject::isReplaced const): Deleted.
(WebCore::RenderObject::setReplaced): Deleted.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::RenderReplaced):

  • rendering/RenderReplica.cpp:

(WebCore::RenderReplica::RenderReplica):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

  • rendering/line/LineBreaker.cpp:

(WebCore::LineBreaker::nextLineBreak):

  • rendering/updating/RenderTreeBuilderInline.cpp:

(WebCore::nextContinuation):
Renamed in all these places. Also added one FIXME for something
Alan pointed out we'd like to do in the future.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::removeOnlyThisLayer): Removed unhelpful use
of RenderLayer::reflection function just to find out whether the
RenderLayer::reflectionLayer function will return null or not.

  • rendering/RenderLayer.h: Removed unneeded RenderLayer::reflection.
  • rendering/RenderLayerCompositor.cpp: Removed an unneeded include

of RenderReplica.h.

1:35 PM Changeset in webkit [288066] by ysuzuki@apple.com
  • 4 edits in trunk

[JSC] Fix Date functions' argument coercion
https://bugs.webkit.org/show_bug.cgi?id=235271

Reviewed by Alexey Shvayka.

JSTests:

  • test262/expectations.yaml:

Source/JavaScriptCore:

Even if the input Date is NaN or the result looks like NaN, we need to coerce passed
arguments to Number[1] since it has observable side effect.

[1]: https://github.com/tc39/ecma262/pull/2136

  • runtime/DatePrototype.cpp:

(JSC::applyToNumbersToTrashedArguments):
(JSC::fillStructuresUsingTimeArgs):
(JSC::fillStructuresUsingDateArgs):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):

1:32 PM Changeset in webkit [288065] by ysuzuki@apple.com
  • 11 edits
    5 deletes in trunk

[JSC] Fix misc issues in WebAssembly.Exception
https://bugs.webkit.org/show_bug.cgi?id=235261

Reviewed by Alexey Shvayka.

JSTests:

  • wasm/stress/create-tag-from.js:
  • wasm/v8/exceptions-api.js:

(TestGetArg):

LayoutTests/imported/w3c:

Remove web-platform-tests/wasm/jsapi/exception/type.tentative.any.js test since
this behavior is not defined in wasm exception-handling and/or wasm js-types spec.
Probably this test was confused with WebAssembly.Tag (and that test is in wasm/jsapi/tag/).

Also change RangeError to TypeError according to the spec[1].

[1]: https://webassembly.github.io/exception-handling/js-api/index.html#dom-exception-getarg

  • web-platform-tests/wasm/jsapi/exception/getArg.tentative.any-expected.txt:
  • web-platform-tests/wasm/jsapi/exception/getArg.tentative.any.js:

(test):

  • web-platform-tests/wasm/jsapi/exception/getArg.tentative.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/exception/toString.tentative.any-expected.txt:
  • web-platform-tests/wasm/jsapi/exception/toString.tentative.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/exception/type.tentative.any-expected.txt: Removed.
  • web-platform-tests/wasm/jsapi/exception/type.tentative.any.html: Removed.
  • web-platform-tests/wasm/jsapi/exception/type.tentative.any.js: Removed.
  • web-platform-tests/wasm/jsapi/exception/type.tentative.any.worker-expected.txt: Removed.
  • web-platform-tests/wasm/jsapi/exception/type.tentative.any.worker.html: Removed.

Source/JavaScriptCore:

  1. Add @toStringTag to WebAssembly.Exception.prototype.
  2. Add argument count check for WebAssembly.Exception methods (since it is specified in WebIDL and these methods do not have optional parameters).
  • wasm/js/WebAssemblyExceptionPrototype.cpp:

(JSC::WebAssemblyExceptionPrototype::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):

1:17 PM Changeset in webkit [288064] by ysuzuki@apple.com
  • 9 edits in trunk

[JSC] Fix misc WebAssembly.Table issues
https://bugs.webkit.org/show_bug.cgi?id=235262

Reviewed by Alexey Shvayka.

LayoutTests/imported/w3c:

Fix length of WebAssembly.Table.set from 2 to 1.
According to the spec[1], it should be 1 since the second argument is an optional.

Also fix stray argument test. Previously, it was stray argument. But after the update
of the wasm spec, the second argument of Table constructor can be used for initial value.
So, WebAssembly.Table "anyfunc" with {} initial value throws an error since it is not
a function. This fixes a test, passing null for the second argument, and adding third
stray argument for the stray argument test.

[1]: https://webassembly.github.io/spec/js-api/index.html#tables

  • web-platform-tests/wasm/jsapi/idlharness.any-expected.txt:
  • web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/interface.any.js:
  • web-platform-tests/wasm/jsapi/table/constructor.any-expected.txt:
  • web-platform-tests/wasm/jsapi/table/constructor.any.js:

(test):

  • web-platform-tests/wasm/jsapi/table/constructor.any.worker-expected.txt:

Source/JavaScriptCore:

  • wasm/js/WebAssemblyTablePrototype.cpp:
12:32 PM Changeset in webkit [288063] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Bug 234910 - jsc_fuz/wktr: crash with exotic settings
https://bugs.webkit.org/show_bug.cgi?id=234910

Patch by Frédéric Wang <fwang@igalia.com> on 2022-01-15
Reviewed by Michael Saboff.

ASAN release build of WebKitTestRunner and DumpRenderTree may crash when loading the file
with content "<script>'a'+Math.floor()+'a';</script>" when the ASAN option
detect_stack_use_after_return=1 is set and when the JSC option slowPathAllocsBetweenGCs takes
to specific values. This is because the 'TestRendered' string of WTR::sendTestRenderedEvent
can be garbage collected. This patch fixes that issue by protecting that string. The fix has
been verified for all slowPathAllocsBetweenGCs values from 1 to 100.

  • TestRunnerShared/ReftestFunctions.cpp:

(WTR::sendTestRenderedEvent): Protect "TestRendered" JSString from garbage collection until
the event is dispatched.

12:24 PM Changeset in webkit [288062] by ysuzuki@apple.com
  • 92 edits
    4 copies
    134 adds in trunk/JSTests

[JSC] Upgrade test262
https://bugs.webkit.org/show_bug.cgi?id=235263

Reviewed by Alexey Shvayka.

Update to the latest one.

  • test262/config.yaml:
  • test262/expectations.yaml:
  • test262/test262-Revision.txt:
12:10 PM Changeset in webkit [288061] by Alan Bujtas
  • 6 edits in trunk

web-platform-tests/html/rendering/dimension-attributes.html is failing when table width is set to 0px
https://bugs.webkit.org/show_bug.cgi?id=235267

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/html/rendering/dimension-attributes-expected.txt:

Source/WebCore:

This patch is based on the following Blink commit:

https://chromium-review.googlesource.com/c/chromium/src/+/2458587

This only applies to width (not height) - see:

https://wpt.fyi/results/html/rendering/dimension-attributes.html?label=master&label=experimental&aligned&q=dimension-attributes

See also: https://drafts.csswg.org/css-tables-3/#mapping

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::addHTMLLengthToStyle):

  • html/HTMLElement.h:
  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::collectPresentationalHintsForAttribute):

10:58 AM Changeset in webkit [288060] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

Share some code that looks at visibility in order to short-circuit repaint rect computation
https://bugs.webkit.org/show_bug.cgi?id=235242

Reviewed by Dean Jackson.

There were five instances of this common code pattern that short-circuited clippedOverflowRect()
when we know that the renderer is hidden with visibility:hidden, so factor it into a common
function on RenderElement.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::clippedOverflowRect const):

  • rendering/RenderBox.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::isInsideEntirelyHiddenLayer const):

  • rendering/RenderElement.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::clippedOverflowRect const):

  • rendering/svg/LegacyRenderSVGRoot.cpp:

(WebCore::LegacyRenderSVGRoot::clippedOverflowRect const):

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::clippedOverflowRect const):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::clippedOverflowRect const):

10:51 AM Changeset in webkit [288059] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Make a function that returns the ordered list of top layer RenderLayers
https://bugs.webkit.org/show_bug.cgi?id=235251

Reviewed by Alan Bujtas.

Factor the code in RenderLayer::rebuildZOrderLists() that generates the list of
top-layer RenderLayers into its own function.

Add Document::hasTopLayerElement() to avoid calling it when there are no top layer
elements.

  • dom/Document.h:

(WebCore::Document::hasTopLayerElement const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::rebuildZOrderLists):

  • rendering/RenderLayer.h:
9:23 AM Changeset in webkit [288058] by Tyler Wilcock
  • 10 edits in trunk

AX: Fix disabled-controls-not-focusable.html in isolated tree mode by updating AXPropertyName::CanSetFocusAttribute when the disabled attribute changes
https://bugs.webkit.org/show_bug.cgi?id=235246

Reviewed by Chris Fleizach.

Source/WebCore:

Fixes disabled-controls-not-focusable.html in isolated tree mode.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChange):
Post a AXDisabledStateChanged notification when the disabled attribute changes.
(WebCore::AXObjectCache::updateIsolatedTree):
Handle the AXDisabledStateChanged notification to update AXPropertyName::CanSetFocusAttribute.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateNodeProperty):
Re-compute AXPropertyName::CanSetFocusAttribute when asked to do so.

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::isAttributeSettable):
Use new isAttributeSettable(NSString *attribute) helper function.
(WTR::AccessibilityUIElement::isAttributeSettable const):
Added. Dispatches call to accessibilityIsAttributeSettable on the AX thread.

(WTR::AccessibilityUIElement::isFocusable const):
(WTR::AccessibilityUIElement::isSelectable const):
Use new isAttributeSettable to reduce repetition.

LayoutTests:

  • accessibility/disabled-controls-not-focusable-expected.txt:
  • accessibility/disabled-controls-not-focusable.html:

Make this test async so that it can pass in isolated tree mode. This
test must be async because it dynamically changes the disabled
attribute via JS.

  • platform/win/accessibility/disabled-controls-not-focusable-expected.txt:

Update Windows-specific expectation to match test changes.

9:21 AM Changeset in webkit [288057] by commit-queue@webkit.org
  • 4 edits in trunk

[css-contain] Fix contain-size-replaced-002.html
https://bugs.webkit.org/show_bug.cgi?id=235175

Patch by Rob Buis <rbuis@igalia.com> on 2022-01-15
Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

If the SVG root has zero content width and/or height, there is no point
in painting the children contents.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-size-replaced-002.html

  • rendering/svg/LegacyRenderSVGRoot.cpp:

(WebCore::LegacyRenderSVGRoot::paintReplaced):

LayoutTests:

9:11 AM Changeset in webkit [288056] by Tyler Wilcock
  • 5 edits in trunk/Source/WebCore

AX: Remove AXAriaAttributeChanged notification because it's not used by anything
https://bugs.webkit.org/show_bug.cgi?id=235253

Reviewed by Chris Fleizach.

Nothing uses AXAriaAttributeChanged, but we still spend time processing
it through the notification pipeline (postNotification -> m_notificationsToPost -> updateIsolatedTree(notifications) + postPlatformNotification(notifications)).

This patch deletes it.

  • accessibility/AXLogger.cpp:

(WebCore::operator<<):

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChange):

  • accessibility/AXObjectCache.h:
  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

5:36 AM Changeset in webkit [288055] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] imported/w3c/web-platform-tests/css/css-text/word-break/word-break-normal-ar-000.html fails with incorrect run position
https://bugs.webkit.org/show_bug.cgi?id=235011

Reviewed by Antti Koivisto.

IFC (inherited from simple line layout) uses this technique of measuring the content with the trailing whitespace
and then simply subtract the whitespace width. It enables us to keep pushing content to the line without re-measuring it each time.
(the "non-whitespace + whitespace" pattern is extremely common for IFC content).
However in some cases when the trailing whitespace is trimmed, subtracting the trimmed width from the
content width instead of measuring it produces a visually incorrect result.
This patch fixes the most obvious cases when the incorrect width turns into an offset for the RTL content.

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::TrimmableTrailingContent::remove):
(WebCore::Layout::Line::Run::removeTrailingLetterSpacing):
(WebCore::Layout::Line::Run::removeTrailingWhitespace):

  • layout/formattingContexts/inline/InlineLine.h:
  • layout/formattingContexts/inline/text/TextUtil.cpp:

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

  • layout/formattingContexts/inline/text/TextUtil.h:
5:32 AM Changeset in webkit [288054] by graouts@webkit.org
  • 10 edits
    1 copy in trunk

Setting content: normal on a ::marker should make computed style return resolved values
https://bugs.webkit.org/show_bug.cgi?id=235222

Reviewed by Aditya Keerthi.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/css/css-pseudo/marker-computed-size-expected.txt:

Source/WebCore:

Until now, StyleBuilder would treat "none" and "normal" values the same way for the "content"
CSS property. However, "normal", the initial value, is not the same as "none" which explicitly
states that we do not have any content. The WPT test css/css-pseudo/marker-computed-size.html
checks on this by setting content: normal on a ::marker and expecting the computed style
for "width" and "height" to be pixel values and not "auto".

We already have a bit in RenderStyle that would be turned on when we would parse either "none"
or "normal". We're now only setting that bit, with a better name when the value is explicitly "none".

So we now remove hasExplicitlyClearedContent() and instead expose hasEffectiveContentNone()
on RenderStyle.

We also remove a stale comment in applyInheritContent() since the spec has not changed to make
"content" inherited.

Finally, Styleable::renderer() now returns the markerRenderer() unless
RenderStyle::hasEffectiveContentNone() is true.

For reference, the relevant spec is https://drafts.csswg.org/css-content-3/#content-property.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::contentToCSSValue):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::isControlStyled const):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasEffectiveContentNone const):
(WebCore::RenderStyle::setHasContentNone):
(WebCore::RenderStyle::NonInheritedFlags::operator== const):
(WebCore::RenderStyle::setHasExplicitlyClearedContent): Deleted.
(WebCore::RenderStyle::hasExplicitlyClearedContent const): Deleted.

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInitialContent):
(WebCore::Style::BuilderCustom::applyInheritContent):
(WebCore::Style::BuilderCustom::applyValueContent):

  • style/Styleable.cpp:

(WebCore::Styleable::renderer const):

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/css/css-pseudo/marker-computed-size-expected.txt:
Note: See TracTimeline for information about the timeline view.