Timeline



Dec 27, 2021:

10:10 PM Changeset in webkit [287463] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Use thread_switch instead of sched_yield
https://bugs.webkit.org/show_bug.cgi?id=234712

Reviewed by Filip Pizlo.

Previously, we received internal reports that sched_yield waits for a long time, and causing a pause
in the client of JavaScriptCore, and we switched it to thread_switch in bmalloc::Mutex. We should do
the same thing in libpas too.

  • libpas/src/libpas/pas_lock.c:

(pas_lock_lock_slow):

9:44 PM Changeset in webkit [287462] by commit-queue@webkit.org
  • 3 edits
    1 copy
    1 add
    1 delete in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=234714

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

  • platform/glib/TestExpectations:
  • platform/glib/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt: Renamed from LayoutTests/platform/gtk/webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt.
  • platform/glib/webgl/1.0.3/conformance/extensions/webgl-compressed-texture-s3tc-expected.txt: Added.
  • platform/wpe/TestExpectations:
4:29 PM Changeset in webkit [287461] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Element::boundingAbsoluteRectWithoutLayout() should be marked const
https://bugs.webkit.org/show_bug.cgi?id=234703

Reviewed by Darin Adler.

Mark an existing method on Element as const, so that it can be invoked with const Element*/const Element&.
No change in behavior.

  • dom/Element.cpp:

(WebCore::listBoxElementBoundingBox):
(WebCore::Element::boundingAbsoluteRectWithoutLayout const):
(WebCore::Element::boundingAbsoluteRectWithoutLayout): Deleted.

  • dom/Element.h:
8:39 AM Changeset in webkit [287460] by ntim@apple.com
  • 4 edits
    2 deletes in trunk/LayoutTests

Consolidate computed-style-*.txt and getComputedStyle-basic-expected.txt test results

Unreviewed test gardening.

The results in the non-platform directory are stale, the platform/mac/ results are the most recent ones.

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • svg/css/getComputedStyle-basic-expected.txt:
2:04 AM Changeset in webkit [287459] by ysuzuki@apple.com
  • 18 edits
    2 moves in trunk/Source/JavaScriptCore

Consider merging Wasm::FunctionCodeBlock and Wasm::LLIntCallee
https://bugs.webkit.org/show_bug.cgi?id=203691

Reviewed by Filip Pizlo.

This patch merges Wasm::FunctionCodeBlock into Wasm::LLIntCallee since both
are one-on-one and what they want to represent are the same. We change
Wasm::FunctionCodeBlock to Wasm::FunctionCodeBlockGenerator so that we can
use FixedVector in Wasm::LLIntCallee which makes Wasm::LLIntCallee small,
and this is similar to what JS side is doing (UnlinkedCodeBlockGenerator).

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

(JSC::Wasm::BytecodeDumper::dumpBlock):
(JSC::Wasm::BytecodeDumper::dumpConstants):
(JSC::Wasm::BytecodeDumper::constantName const):

  • bytecode/BytecodeDumper.h:
  • interpreter/Interpreter.cpp:

(JSC::CatchInfo::CatchInfo):

  • llint/LLIntOffsetsExtractor.cpp:
  • llint/WebAssembly.asm:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::LLIntCallee::LLIntCallee):
(JSC::Wasm::LLIntCallee::outOfLineJumpOffset):
(JSC::Wasm::LLIntCallee::outOfLineJumpTarget):
(JSC::Wasm::LLIntCallee::linkExceptionHandlers): Deleted.

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::llintFunctionCodeBlock const): Deleted.

  • wasm/WasmFunctionCodeBlockGenerator.cpp: Renamed from Source/JavaScriptCore/wasm/WasmFunctionCodeBlock.cpp.

(JSC::Wasm::FunctionCodeBlockGenerator::setInstructions):
(JSC::Wasm::FunctionCodeBlockGenerator::addOutOfLineJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset):
(JSC::Wasm::FunctionCodeBlockGenerator::addSignature):
(JSC::Wasm::FunctionCodeBlockGenerator::addJumpTable):
(JSC::Wasm::FunctionCodeBlockGenerator::numberOfJumpTables const):

  • wasm/WasmFunctionCodeBlockGenerator.h: Renamed from Source/JavaScriptCore/wasm/WasmFunctionCodeBlock.h.

(JSC::Wasm::FunctionCodeBlockGenerator::FunctionCodeBlockGenerator):
(JSC::Wasm::FunctionCodeBlockGenerator::tierUpCounter):

  • wasm/WasmGeneratorTraits.h:
  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::parseAndCompileBytecode):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::finalize):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addSwitch):

  • wasm/WasmLLIntGenerator.h:
  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):

  • wasm/WasmLLIntPlan.h:
  • wasm/WasmLLIntTierUpCounter.h:

(JSC::Wasm::LLIntTierUpCounter::LLIntTierUpCounter):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::shouldJIT):
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::WASM_SLOW_PATH_DECL):
(JSC::LLInt::doWasmCallIndirect):
(JSC::LLInt::doWasmCallRef):

Dec 26, 2021:

11:46 PM Changeset in webkit [287458] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Use SlowPathReturnType instead of EncodedMatchResult
https://bugs.webkit.org/show_bug.cgi?id=234686

Reviewed by Filip Pizlo.

This patch replaces YarrJIT's EncodedMatchResult with SlowPathReturnType so that
CCallHelpers can handle it correctly.

  • runtime/MatchResult.h:

(JSC::MatchResult::MatchResult):
(JSC::MatchResult::failed):

  • runtime/SlowPathReturnType.h:

(JSC::decodeResult):

  • yarr/YarrJIT.h:
11:38 PM Changeset in webkit [287457] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Test accessibility/aria-inherits-presentational.html is failing with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234685

Reviewed by Adrian Perez de Castro.

We are ignoring list items inheriting presentational role, but we need to expose its contents.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::effectiveRole const): Use section as effective role of list items inheriting
presentational role.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Include list items inheriting
presentational role.

11:37 PM Changeset in webkit [287456] by Carlos Garcia Campos
  • 8 edits in trunk

[GTK][a11y] Stop setting manages-descendants on web process root object with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234663

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Emit parent-changed and children-changed signals instead, like all other objects, to properly update the ATSPI
cache.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::parentChanged): Emit the signal for the root object.
(WebCore::AccessibilityAtspi::childrenChanged): Ditto.

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::cacheDestroyed): Notify the root object too.
(WebCore::AccessibilityObjectAtspi::elementDestroyed): Ditto.
(WebCore::AccessibilityObjectAtspi::setParent): Ditto.
(WebCore::AccessibilityObjectAtspi::serialize const): Use AccessibilityRootAtspi::applicationReference().

  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::AccessibilityRootAtspi::embedded): Call AccessibilityAtspi::parentChanged().
(WebCore::AccessibilityRootAtspi::parentReference const): Added.
(WebCore::AccessibilityRootAtspi::childAdded): Call AccessibilityAtspi::childrenChanged().
(WebCore::AccessibilityRootAtspi::childRemoved): Ditto.
(WebCore::AccessibilityRootAtspi::serialize const): Do not set manages-descendants state.

  • accessibility/atspi/AccessibilityRootAtspi.h:

Tools:

Update the unit test to remove the ATSPI ifdef.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(testAccessibleBasicHierarchy):

11:36 PM Changeset in webkit [287455] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[GTK][a11y] Test /webkit/WebKitAccessibility/selection/listbox is flaky with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234665

Reviewed by Adrian Perez de Castro.

The problem is that selection-changed can be called multiple times for list boxes. When the notification is
deferred by the AXObject cache, it's ensured to be called only one for every element in the following run loop
iteration, but when not deferred the signal is emitted for every notification.

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::selectionChanged): Ensure we don't emit the selection-changed signal more
than once in the same run loop iteration.

11:34 PM Changeset in webkit [287454] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: handle xml-roles attributes to return the right role for landmark with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234638

Reviewed by Adrian Perez de Castro.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::xmlRoleValueString):
(WTR::AccessibilityUIElement::role):

10:43 PM Changeset in webkit [287453] by Alan Bujtas
  • 11 edits in trunk

[LFC][IFC] Do not trim the hanging trailing content
https://bugs.webkit.org/show_bug.cgi?id=234679

Reviewed by Antti Koivisto.

Source/WebCore:

This is the final step of making the hanging content handling inline with the spec.
(https://www.w3.org/TR/css-text-3/#hang)
Since we don't (fake)trim such content when closing the line, the content width matches
the actual content on the line which also helps when it is aligned to support RTL ordering.

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::Run::removeTrailingWhitespace):
(WebCore::Layout::Line::visuallyCollapseHangingOverflowingGlyphs): Deleted.
(WebCore::Layout::Line::Run::visuallyCollapseTrailingWhitespace): Deleted.

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

(WebCore::Layout::horizontalAlignmentOffset):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::close):

LayoutTests:

  • platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt: Progression. Matches FF and Chrome selection behavior.
4:46 PM Changeset in webkit [287452] by weinig@apple.com
  • 12 edits
    1 delete in trunk

Replace WebKit/CocoaColor.h with WebCore/ColorCocoa.h, not confusing at all
https://bugs.webkit.org/show_bug.cgi?id=234693

Reviewed by Simon Fraser.

Source/WebKit:

We don't need both. The WebCore one can work for both.

  • Platform/cocoa/CocoaColor.h: Removed.
  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(IPC::typeFromObject):
(IPC::encodeColorInternal):
(IPC::encodeObject):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView themeColor]):
(-[WKWebView underPageBackgroundColor]):
(-[WKWebView setUnderPageBackgroundColor:]):
(-[WKWebView _themeColor]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _sampledPageTopColor]):

  • UIProcess/API/Cocoa/_WKApplicationManifest.mm:

(-[_WKApplicationManifest initWithCoder:]):
(-[_WKApplicationManifest themeColor]):

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

(colorForItem):
(-[WKSafeBrowsingBox setSafeBrowsingBackgroundColor:]):
(-[WKSafeBrowsingWarning showDetailsClicked]):
(-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):

Tools:

Use WebCore/ColorCocoa.h instead.

  • TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
4:03 PM Changeset in webkit [287451] by ntim@apple.com
  • 8 edits
    2 adds in trunk

Make -webkit-text-combine an inherited property
https://bugs.webkit.org/show_bug.cgi?id=234694

Reviewed by Simon Fraser.

Source/WebCore:

-webkit-text-combine is said to be inherited in CSSProperties.json, but it is not actually the case.
It should be inherited per-spec (for text-combine-upright).

https://drafts.csswg.org/css-writing-modes/#text-combine-upright

Test: fast/text/text-combine-inherited.html

  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayout):
(WebCore::rareInheritedDataChangeRequiresLayout):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::textCombine const):
(WebCore::RenderStyle::setTextCombine):

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

There are also WPT that already exist for the standard version (text-combine-upright):

  • css/css-writing-modes/text-combine-upright-inherit-all-001.html
  • css/css-writing-modes/text-combine-upright-inherit-all-002.html
  • fast/text/text-combine-inherited-expected.html: Added.
  • fast/text/text-combine-inherited.html: Added.
3:11 PM Changeset in webkit [287450] by Yousuke.Kimoto@sony.com
  • 2 edits in trunk/Source/WebKit

RemoteInspectorProtocolHandler::inspect() expects ConnectionID as uint32_t
https://bugs.webkit.org/show_bug.cgi?id=234657

Reviewed by Don Olmstead.

connectionID a parameter of ScriptMessageClient::didPostMessage() is casteed as <int>.
Since ConnectionID is define as uint32_t, it should be casted as <uint32_t>.

  • UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Fixed cast for connectionID.
1:53 PM Changeset in webkit [287449] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

null ptr deref in WebCore::indexForVisiblePosition()
https://bugs.webkit.org/show_bug.cgi?id=234255

Patch by Frédéric Wang <fwang@igalia.com> on 2021-12-26
Reviewed by Darin Adler.

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::doApply): Ensure endOfSelection did not become orphan before
calling indexForVisiblePosition(). This may happen because the VisiblePosition constructor
is called in the while loop, triggering re-layout and post-layout tasks.

1:40 PM Changeset in webkit [287448] by ntim@apple.com
  • 4 edits in trunk/Source/WebCore

Remove -webkit-{border-fit/margin-collapse} leftovers in StyleRareNonInheritedData
https://bugs.webkit.org/show_bug.cgi?id=234692

Reviewed by Simon Fraser.

r285615 removed -webkit-border-fit.
r287429 removed -webkit-margin-collapse properties.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::hashForTextAutosizing const):
(WebCore::RenderStyle::equalForTextAutosizing const):
(WebCore::rareNonInheritedDataChangeRequiresLayout):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):

  • rendering/style/StyleRareNonInheritedData.h:
11:24 AM Changeset in webkit [287447] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[IFC][Integration] Update text renderer's needsVisualReordering bit
https://bugs.webkit.org/show_bug.cgi?id=234688

Reviewed by Antti Koivisto.

This is similar to legacy line layout where the RenderText's needsVisualReordering is
updated as the (bidi) text box is being placed on the line.
Here we update this bit right after the line layout, when we finished constructing the display boxes.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::handleTextContent):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder):
(WebCore::LayoutIntegration::InlineContentBuilder::build const):

  • layout/integration/LayoutIntegrationInlineContentBuilder.h:
  • layout/layouttree/LayoutInlineTextBox.cpp:

(WebCore::Layout::InlineTextBox::InlineTextBox):
(WebCore::Layout::m_canUseSimplifiedContentMeasuring):
(WebCore::Layout::m_containsBidiText): Deleted.

  • layout/layouttree/LayoutInlineTextBox.h:

(WebCore::Layout::InlineTextBox::canUseSimplifiedContentMeasuring const):
(WebCore::Layout::InlineTextBox::containsBidiText const): Deleted. No need to cache this value on the layout box
InlineTextItems more or less have the same lifecycle as their associated layout boxes.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createTextBox):

10:47 AM Changeset in webkit [287446] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Update writing-mode property values in CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=234689

Reviewed by Simon Fraser.

horizontal-tb/vertical-lr/vertical-rl have been supported for a while now.
horizontal-bt has too, but it is non-standard.

  • css/CSSProperties.json:
10:45 AM Changeset in webkit [287445] by Antti Koivisto
  • 8 edits in trunk

[:has() pseudo-class] Support :disabled and :enabled pseudo-class invalidation
https://bugs.webkit.org/show_bug.cgi?id=234636

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/invalidation/has-pseudo-class.html:

Source/WebCore:

Use Style::PseudoClassChangeInvalidation to support invalidation with :has(:disabled).

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::setAncestorDisabled):
(WebCore::HTMLFormControlElement::parseAttribute):
(WebCore::HTMLFormControlElement::disabledStateChanged):

  • html/HTMLOptGroupElement.cpp:

(WebCore::HTMLOptGroupElement::isDisabledFormControl const):

Use a member bit instead of checking the attribute directly. This allows invalidation to be scoped over the state change.

(WebCore::HTMLOptGroupElement::parseAttribute):

Optgroup can flip the disabled status of the associated option elements too so handle that specifically.

  • html/HTMLOptGroupElement.h:
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::parseAttribute):

9:21 AM Changeset in webkit [287444] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

makeTextLogicalOrderCacheIfNeeded is only interested in whether the content needs visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234687

Reviewed by Antti Koivisto.

This renaming patch is in preparation for fixing the caching codepath for LFC bidi.

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

(WebCore::Layout::TextUtil::containsStrongDirectionalityText):
(WebCore::Layout::TextUtil::containsBidiText): Deleted.

  • layout/formattingContexts/inline/text/TextUtil.h:
  • layout/integration/InlineIteratorLogicalOrderTraversal.cpp:

(WebCore::InlineIterator::makeTextLogicalOrderCacheIfNeeded):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::buildTree):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createTextBox):

  • rendering/RenderText.cpp:

(WebCore::RenderText::RenderText):
(WebCore::RenderText::positionLineBox):

  • rendering/RenderText.h:

(WebCore::RenderText::needsVisualReordering const):
(WebCore::RenderText::setNeedsVisualReordering):
(WebCore::RenderText::containsBidiText const): Deleted.
(WebCore::RenderText::setContainsBidiText): Deleted.

7:02 AM Changeset in webkit [287443] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] ContinuousContent should tell InlineContentBreaker if the candidate content is hanging
https://bugs.webkit.org/show_bug.cgi?id=234671

Reviewed by Antti Koivisto.

ContinuousContent now keeps track of whether the candidate run is a hanging content.
It enables InlineContentBreaker to just simply look at the flag to decide if the overflowing
(hanging) content should stay on the line or not.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::reset):

  • layout/formattingContexts/inline/InlineContentBreaker.h:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::isHangingContent const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):

Dec 25, 2021:

10:16 PM Changeset in webkit [287442] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Turn InlineContentBreaker::ContinuousContent's leading/trailing member variables to std::optional<InlineLayoutUnit>
https://bugs.webkit.org/show_bug.cgi?id=234676

Reviewed by Antti Koivisto.

While an empty (logical width = 0) ContinuousContent takes up no space, it should not be mistaken for collapsed content
(i.e when m_logicalWidth(0) == m_trailingCollapsibleWidth(0), hasCollapsibleContent() should still return false)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::tryBreakingOverflowingRun const):
(WebCore::Layout::InlineContentBreaker::tryBreakingPreviousNonOverflowingRuns const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::appendToRunList): Add a dedicated function to deal with append and logicalWidth.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::resetTrailingWhitespace): Turn trailing whitespace into leading if applicable.
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append): Add dedicated functions for each inline item types.

  • layout/formattingContexts/inline/InlineContentBreaker.h:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::leadingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::trailingCollapsibleWidth const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasCollapsibleContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::isFullyCollapsible const):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineCandidate::InlineContent::appendInlineItem):

10:10 PM Changeset in webkit [287441] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Rebaselining after r287440.

Unreviewed.

  • platform/ios/fast/borders/rtl-border-01-expected.txt: Progression. Content does not overflow the line anymore.
12:55 PM Changeset in webkit [287440] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant InlineContentBreaker::shouldKeepEndOfLineWhitespace
https://bugs.webkit.org/show_bug.cgi?id=234668

Reviewed by Antti Koivisto.

This is in preparation for moving pre-wrap checking out of InlineContentBreaker.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::shouldKeepEndOfLineWhitespace const): Deleted.

  • layout/formattingContexts/inline/InlineContentBreaker.h:
11:18 AM Changeset in webkit [287439] by commit-queue@webkit.org
  • 2 edits in trunk

Add my github username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231666

Patch by Sergey Rubanov <Sergey Rubanov> on 2021-12-25
Reviewed by Alexey Proskuryakov.

  • metadata/contributors.json:
10:34 AM Changeset in webkit [287438] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fully collapsible whitespace content should always stay on the current line
https://bugs.webkit.org/show_bug.cgi?id=234667

Reviewed by Antti Koivisto.

Fully collapsible trailing whitespace content (normal/nowrap/preline) gets removed at
the trimming phase so it always "fits" the current line.
This is also in preparation for decoupling removeable and hanging trailing content.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

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

[LFC][IFC] InlineContentBreaker should know about the hanging content width
https://bugs.webkit.org/show_bug.cgi?id=234662

Reviewed by Antti Koivisto.

Pass in the trailing hanging content width to InlineContentBreaker as this specific type
of content (e.g. pre-wrap whitespace) should be ignored when checking for content fit.

(Note that we already ignore it through the shouldKeepEndOfLineWhitespace() call in
InlineContentBreaker::processOverflowingContent, but this patch is in preparation for making hanging content logic
more inline with the spec. -and also removing shouldKeepEndOfLineWhitespace needs some more changes.)

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

  • layout/formattingContexts/inline/InlineContentBreaker.h:
  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::hangingTrailingContentWidth const):
(WebCore::Layout::Line::hangingWhitespaceWidth const): Deleted.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::handleInlineContent):

2:13 AM Changeset in webkit [287436] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r285088.
https://bugs.webkit.org/show_bug.cgi?id=234680

From A/B test, we probably need to revert both, 285087 and
285088

Reverted changeset:

"Web process shouldn't crash if
ImageBuffer::ensureBackendCreated() fails"
https://bugs.webkit.org/show_bug.cgi?id=232520
https://commits.webkit.org/r285088

Dec 24, 2021:

6:22 PM Changeset in webkit [287435] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, remove -webkit-svg-shadow from CSSProperties.json

It's been unshipped since 2018, and most removed properties aren't kept in CSSProperties.json
(e.g. -webkit-border-fit, -webkit-background-composite, -webkit-margin-collapse).

There's not much point to keep it in there.

  • css/CSSProperties.json:
6:03 PM Changeset in webkit [287434] by ntim@apple.com
  • 23 edits
    3 deletes in trunk

Internally unprefix -webkit-font-kerning CSS property
https://bugs.webkit.org/show_bug.cgi?id=234673

Reviewed by Myles C. Maxfield.

Same to what was done in bug 234602 for text-emphasis CSS properties.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::computedAttributesForElement):

LayoutTests:

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
1:59 PM Changeset in webkit [287433] by ntim@apple.com
  • 32 edits
    6 deletes in trunk

Remove non-standard -webkit-background-composite CSS property
https://bugs.webkit.org/show_bug.cgi?id=234661

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

Allows removing the non-standard -webkit-mask-composite CSS values (which do not match the standard
mask-composite ones) more easily later on.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumePrefixedMaskComposite):
(WebCore::consumeMaskComposite):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumePrefixedBackgroundComposite): Deleted.
(WebCore::consumeBackgroundComposite): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::supportsDirectlyCompositedBoxDecorations):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::backgroundRepeatY const):
(WebCore::RenderStyle::backgroundComposite const): Deleted.

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

  • compositing/background-color/background-color-composite-expected.html: Removed.
  • compositing/background-color/background-color-composite.html: Removed.
  • fast/backgrounds/bgCompositeCopy-expected.txt: Removed.
  • fast/backgrounds/bgCompositeCopy.html: Removed.
  • fast/backgrounds/composite-highlight-is-invalid-expected.txt: Removed.
  • fast/backgrounds/composite-highlight-is-invalid.html: Removed.
  • fast/backgrounds/multiple-backgrounds-computed-style-expected.txt:
  • fast/backgrounds/multiple-backgrounds-computed-style.html:
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/multicol/body-stuck-with-dirty-bit-with-columns.html:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
1:39 PM Changeset in webkit [287432] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

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

Reviewed by Darin Adler.

  • platform/network/win/DownloadBundleWin.cpp:

(WebCore::DownloadBundle::appendResumeData): Use fclose directly.
(WebCore::DownloadBundle::extractResumeData): Ditto.
(WebCore::DownloadBundle::fileCloser): Deleted.

1:02 PM Changeset in webkit [287431] by Simon Fraser
  • 28 edits
    2 deletes in trunk

Apply the scroll delta in the "began" wheel event
https://bugs.webkit.org/show_bug.cgi?id=234645

Reviewed by Wenson Hsieh.

Source/WebCore:

ScrollingEffectsController::handleWheelEvent() previously early returned without applying
the delta in the "Began" event, which means that scrolling started a frame later than it
should have. For snappier scrolling in Safari, we should apply this delta.

  • platform/ScrollSnapAnimatorState.cpp:

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

Source/WebKit:

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::nextEventToDispatch): Fix logging typo.

LayoutTests:

Fix various test issues, and rebase tests affected by the change.

  • fast/scrolling/iframe-scrollable-after-back.html:
  • fast/scrolling/overflow-scrollable-after-back.html: Applying the delta from the "began" event caused

multiple scroll events to fire, triggering multiple navigations (previously, event coalescing would result in a single
scroll for multiple "changed" events).
Fix by using UIHelper.mouseWheelScrollAt() and logging the scroll only once.

  • fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Accumulated offset includes "began" delta.
  • fast/scrolling/latching/iframe-latch-small-deltas.html: Ditto
  • fast/scrolling/latching/latching-and-wheel-events-expected.txt: Ditto
  • fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
  • fast/scrolling/mac/momentum-animator-in-overflow.html: Remove comment.
  • fast/scrolling/mac/momentum-animator-maybegin-stops.html: Ditto
  • fast/scrolling/mac/momentum-animator.html: Ditto
  • fast/scrolling/mac/momentum-event-sequence-expected.txt: Accumulated offset includes "began" delta.
  • fast/scrolling/mac/momentum-event-sequence.html: Accumulated offset includes "began" delta.
  • fast/scrolling/mac/rubberband-overflow-in-wheel-region.html: Wheel event coalescing resulted in

unpredictable behavior, so ensure there is one.

  • platform/mac-wk1/fast/scrolling/latching/iframe-latch-small-deltas-expected.txt: Removed.
  • platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt: Accumulated offset includes "began" delta.
  • platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto
  • scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow-expected.txt: Ditto
  • scrollingcoordinator/mac/latching/horizontal-overflow-in-vertical-overflow.html: Ditto
  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt: Ditto
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt: Ditto
  • tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt: Ditto
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Test was designed with overlay scrollbars,

allowing for some between-snapoint slow that allowed an x delta to get applied. Fix to make room for scrollbars so that
snapping is always predictable.

12:20 PM Changeset in webkit [287430] by ntim@apple.com
  • 8 edits in trunk

Unreviewed, r287356 followups and rebaselining for glib

Source/WebCore:

  • css/html.css:

(rt): unprefix usage of -webkit-text-emphasis

  • style/StyleBuilderCustom.h:

Sort per Darin Adler's comment

LayoutTests:

  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
10:55 AM Changeset in webkit [287429] by ntim@apple.com
  • 43 edits
    13 deletes in trunk

Remove non-standard -webkit-margin-collapse CSS property and longhands
https://bugs.webkit.org/show_bug.cgi?id=190788

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::operator MarginCollapse const): Deleted.

  • css/CSSProperties.json:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseShorthand):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::isSelfCollapsingBlock const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild const):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::setMustDiscardMarginBefore): Deleted.
(WebCore::RenderBlockFlow::setMustDiscardMarginAfter): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginBefore const): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginAfter const): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild const): Deleted.
(WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild const): Deleted.
(WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild const): Deleted.
(WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild const): Deleted.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setMargin):
(WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::negativeMargin const):
(WebCore::RenderBlockFlow::initMaxMarginValues):
(WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin): Deleted.
(WebCore::RenderBlockFlow::MarginInfo::discardMargin const): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::textOverflow const):
(WebCore::RenderStyle::setTextOverflow):
(WebCore::RenderStyle::initialTextOverflow):
(WebCore::RenderStyle::marginBeforeCollapse const): Deleted.
(WebCore::RenderStyle::marginAfterCollapse const): Deleted.
(WebCore::RenderStyle::setMarginBeforeCollapse): Deleted.
(WebCore::RenderStyle::setMarginAfterCollapse): Deleted.
(WebCore::RenderStyle::initialMarginBeforeCollapse): Deleted.
(WebCore::RenderStyle::initialMarginAfterCollapse): Deleted.

  • rendering/style/RenderStyleConstants.cpp:
  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

For fast/multicol/offset-top-left.html, reproduced the same visual result without
-webkit-border-collapse: separate. Unfortunately, offsetTop/offsetLeft aren't correct
in flipped writing mode despite correct visual results.

Filed webkit.org/b/234664 for the issue (which was pre-existing this patch).

  • fast/block/margin-collapse/webkit-margin-collapse-container-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-container.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-floats-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-floats.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-separate-position-expected.txt: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-separate-position.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings-bt-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings-bt.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings-expected.html: Removed.
  • fast/block/margin-collapse/webkit-margin-collapse-siblings.html: Removed.
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/css/getPropertyValue-webkit-margin-collapse-expected.txt: Removed.
  • fast/css/getPropertyValue-webkit-margin-collapse.html: Removed.
  • fast/css/inherit-initial-shorthand-values-expected.txt:
  • fast/css/inherit-initial-shorthand-values.html:
  • fast/css/remove-shorthand-expected.txt:
  • fast/css/remove-shorthand.html:
  • fast/multicol/offset-top-left-expected.txt:
  • fast/multicol/offset-top-left.html:
  • fast/text/text-combine-crash.html:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
9:06 AM Changeset in webkit [287428] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Simplify test for startOfLastParagraph in InsertListCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=234600

Patch by Frederic Wang <fwang@igalia.com> on 2021-12-24
Reviewed by Darin Adler.

Current test is !startOfLastParagraph.deepEquivalent().anchorNode()->isConnected(). It could
be replaced with the less verbose startOfLastParagraph.isOrphan() which is equivalent to
startOfLastParagraph.deepEquivalent().isOrphan() and so to the condition
startOfLastParagraph.deepEquivalent().anchorNode() &&
!startOfLastParagraph.deepEquivalent().anchorNode()->isConnected(). A difference can only
happen for a page where anchorNode() is a null pointer. In such a test case exists, then it
is already crashing with a null ptr deref anyway.

No new tests, behavior essentially unchanged.

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::doApply): Use startOfLastParagraph.isOrphan().

8:57 AM Changeset in webkit [287427] by Simon Fraser
  • 2 edits in trunk

Add pycache and DerivedData to the .gitignore file
https://bugs.webkit.org/show_bug.cgi?id=234656

Reviewed by Daniel Bates.

  • .gitignore:
8:46 AM Changeset in webkit [287426] by weinig@apple.com
  • 4 edits
    2 adds in trunk

On systems without CG support for alpha premultiplied gradients, the CGGradientRef path should still be used for the subset of gradients that can transformed
https://bugs.webkit.org/show_bug.cgi?id=234653

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/gradients/alpha-premultiplied-representable-by-unpremultiplied.html

Optimize gradient rendering on systems without a version of CoreGraphics that supports
alpha premultiplied gradients by using the CGGradientRef code path for the subset of
alpha premultiplied gradients that can be represented as alpha non-premultiplied gradients.

Two types of optimizations are possible for two classes of this subset:

  1. Any gradient that uses the same alpha value for all color stops can be used as is with the alpha non-premultiplied CGGradientRef.
  2. Any gradient that conforms to the rule that "any two consecutive color stops must either have one that is fully transparent or have the same alpha value for both" can be transformed into an identical alpha non-premultiplied gradient by transforming the fully transparent stops into either one or two stops. A comment in the code goes into much more detail about this.
  • platform/graphics/cg/GradientRendererCG.cpp:

(WebCore::classifyAlphaType):
(WebCore::analyzeColorStopsForEmulatedAlphaPremuliplicationOppertunity):
(WebCore::alphaTransformStopsToEmulateAlphaPremuliplication):
(WebCore::GradientRendererCG::pickStrategy const):

LayoutTests:

Add tests of gradients that can render identically with both alpha premultiplied and non-premultiplied gradients
either using the same color stop list or a transformed one.

The main test page contains the alpha premultiplied gradients (which is the default now for CSS gradients), while
the -expected.html contains the alpha non-premultiplied gradients and has alpha premultiplied interpolation explicitly
disabled via a CSSGradientPremultipliedAlphaInterpolationEnabled=false comment command.

  • fast/gradients/alpha-premultiplied-representable-by-unpremultiplied-expected.html: Added.
  • fast/gradients/alpha-premultiplied-representable-by-unpremultiplied.html: Added.
  • platform/glib/TestExpectations: Disable on non-CoreGraphics ports.
2:50 AM Changeset in webkit [287425] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK][a11y] Expose live region attributes with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234637

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::attributes const):

Tools:

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSupported):

2:48 AM Changeset in webkit [287424] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Expose the right roles for math elements with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234634

Reviewed by Adrian Perez de Castro.

This is missing with ATSPI causing all a11y mathml layout tests to fail.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::atspiRole):
(WebCore::AccessibilityObjectAtspi::attributes const):
(WebCore::AccessibilityObjectAtspi::effectiveRole const):
(WebCore::AccessibilityObjectAtspi::effectiveRoleName const):
(WebCore::AccessibilityObjectAtspi::effectiveLocalizedRoleName const):

2:47 AM Changeset in webkit [287423] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Expose list items with pseudo marker as List instead of Group with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234633

Reviewed by Adrian Perez de Castro.

This happens because pseudo markers don't have the ListMarker role, but StaticText that we ignore.

Fixes accessibility/list-detection2.html.

  • accessibility/AccessibilityList.cpp:

(WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Add ATSPI ifdef too.

Dec 23, 2021:

11:47 PM Changeset in webkit [287422] by Fujii Hironori
  • 2 edits in trunk

REGRESSION(r287412)[WinCairo] error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)).
https://bugs.webkit.org/show_bug.cgi?id=234658

Unreviewed build fix.

After r287412, WinCairo Debug can't compile due to the following error.

C:\MSVS\VC\Tools\MSVC\14.28.29910\include\type_traits(1066):

error C2338: You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)).
Before VS 2017 15.8, the member "type" would non-conformingly have an alignment of only alignof(max_align_t).
VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility
(*only* for uses of aligned_storage with extended alignments).
Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment,
or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conforming behavior.

  • Source/cmake/OptionsMSVC.cmake: Added _ENABLE_EXTENDED_ALIGNED_STORAGE macro.
9:58 PM Changeset in webkit [287421] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Make DeferredWorkTimer::addPendingWork() return a Ticket.
https://bugs.webkit.org/show_bug.cgi?id=234628
rdar://84260429

Reviewed by Yusuke Suzuki.

  1. Make Ticket a unique token instead of the JSObject* target object. The Ticket is now a pointer to the TicketData in the pending work list.
  1. Instead of taking a Ticket argument, DeferredWorkTimer::addPendingWork() now takes a JSObject* target argument explicitly, and returns the Ticket for the added TicketData instead.

All the relevant DeferredWorkTimer APIS already take a Ticket as an argument.
This ensures that addPendingWork() is called before we start doing work with
these APIs (especially scheduleWorkSoon()).

  1. Previously, addPendingWork() will only save one instance of TicketData for a given JSObject* key. With this patch, we'll register a new TicketData instance for every call to addPendingWork(), and return a unique Ticket for it.

This is needed because it may be possible for 2 different clients to call
addPendingWork() and scheduleWorkSoon() with the same target JSObject* but with
different sets of dependencies.

Secondly, even is the both sets of dependencies are identical, a client may
call addPendingWork() and scheduleWorkSoon() with the same JSObject* target
more than once because it intended to schedule more than 1 task to run.

Note that DeferredWorkTimer::doWork() consumes the corresponding TicketData
(i.e. removes it from the m_pendingTickets list) for each task as it is run.
To ensure that the dependencies for each task is protected, we'll either need
to ref count the TicketData for the same target object (and hold off on removing
it from the list), or we'll need to register a different TicketData instance
for each task. Ref counting can solve the second issue above, but does not
solve the first. So, this patch goes with the more generic solution to allow
each task to have its own TicketData instance (and, its own unique Ticket).

  1. Previously, if the client cancels pending work, we would remove the TicketData immediately from the m_pendingTickets list. This opens up an opportunity for the same TicketData memory to be re-allocated by another client. This, in turn, would make the Ticket token not unique and potentially allow a cancelled ticket to be reused before DeferredWorkTimer::doWork() is called.

This patch changes DeferredWorkTimer::cancelPendingWork() to only clear the
contents of the TicketData instead. TicketData::scriptExecutionOwner being
null is used as an indication that the ticket has been cancelled. Since the
TicketData itself is not "freed" yet, all TicketData will remain unique until
DeferredWorkTimer::doWork().

Consequently, DeferredWorkTimer::doWork() will now check for cancelled tickets
and remove them from the m_pendingTickets list.

  1. JSFinalizationRegistry was previously calling DeferredWorkTimer::hasPendingWork() to check if it has already scheduled a task, so as not to reschedule again until after the previously scheduled task has been run. This does not play nice with the new Ticket API, because this hasPendingWork() check needs to be done before calling addPendingWork(), and hence, the Ticket is not available yet.

Fortunately, JSFinalizationRegistry should know if it has already scheduled
a task itself. This patch adds a m_hasAlreadyScheduledWork flag to
JSFinalizationRegistry that can be used for this check instead.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

  • runtime/DeferredWorkTimer.cpp:

(JSC::DeferredWorkTimer::TicketData::TicketData):
(JSC::DeferredWorkTimer::TicketData::vm):
(JSC::DeferredWorkTimer::TicketData::cancel):
(JSC::DeferredWorkTimer::doWork):
(JSC::DeferredWorkTimer::addPendingWork):
(JSC::DeferredWorkTimer::hasPendingWork):
(JSC::DeferredWorkTimer::hasDependancyInPendingWork):
(JSC::DeferredWorkTimer::cancelPendingWork):

  • runtime/DeferredWorkTimer.h:

(JSC::DeferredWorkTimer::TicketData::target):

  • runtime/JSFinalizationRegistry.cpp:

(JSC::JSFinalizationRegistry::finalizeUnconditionally):

  • runtime/JSFinalizationRegistry.h:
  • wasm/WasmStreamingCompiler.cpp:

(JSC::Wasm::StreamingCompiler::StreamingCompiler):
(JSC::Wasm::StreamingCompiler::~StreamingCompiler):
(JSC::Wasm::StreamingCompiler::didComplete):
(JSC::Wasm::StreamingCompiler::fail):
(JSC::Wasm::StreamingCompiler::cancel):

  • wasm/WasmStreamingCompiler.h:
  • wasm/js/JSWebAssembly.cpp:

(JSC::JSWebAssembly::webAssemblyModuleValidateAsync):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::JSWebAssembly::webAssemblyModuleInstantinateAsync):

9:19 PM Changeset in webkit [287420] by Wenson Hsieh
  • 7 edits
    1 add in trunk

Modal container control classifier fails on some neutral controls that contain multiplication symbols
https://bugs.webkit.org/show_bug.cgi?id=234651

Reviewed by Tim Horton.

Source/WebKit:

Treat several ASCII symbols that resemble the letter "x" (i.e. several types of multiplication signs) as the
letter "x" when massaging the raw text content of controls in modal containers into canonical form for the text
classifier. This allows such controls to be (correctly) tagged as "neutral" controls, for the purposes of
delegating modal container policy decisions to the WebKit client.

Test: ModalContainerObservation.ClassifyMultiplySymbol

  • UIProcess/Cocoa/ModalContainerControlClassifier.mm:

(-[WKModalContainerClassifierInput initWithTokenizer:rawInput:]):
(WebKit::computePredictions):

Tools:

Add a new API test to exercise the change.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/modal-container-custom.html: Added.

Add an alternate version of modal-container.html that allows each API test to present custom markup (as
innerHTML) inside a fixed position modal container; use this test page in the new API test.

  • TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:

(-[ModalContainerWebView loadBundlePage:andDecidePolicy:]):
(-[ModalContainerWebView evaluate:andDecidePolicy:]):
(-[ModalContainerWebView loadBundlePage:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(-[ModalContainerWebView lastModalContainerInfo]):

Add a property to keep track of the most recent _WKModalContainerInfo we recieved via the modal container
decision handler, and use this to test for which types of controls are available, in both the new test as well
as existing tests.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin:
  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin:

Adjust the test CoreML model to classify "x" as the neutral control type.

8:23 PM Changeset in webkit [287419] by weinig@apple.com
  • 2 edits in trunk/Source/WTF

Gradient color interpolation incorrect for colors with alpha (need to interpolate premultiplied colors)
https://bugs.webkit.org/show_bug.cgi?id=150940
<rdar://problem/25499232>

Reviewed by Simon Fraser.

Enable CSSGradientPremultipliedAlphaInterpolationEnabled by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:49 PM Changeset in webkit [287418] by sihui_liu@apple.com
  • 5 edits in trunk

Don't create LocalStorage database for read if it does not exist
https://bugs.webkit.org/show_bug.cgi?id=234569

Reviewed by Alex Christensen.

Source/WebKit:

If database does not exists when read, we can return empty or null, instead of creating an empty database.

New API test: WKWebView.LocalStorageNoRecordAfterGetItem

  • NetworkProcess/storage/SQLiteStorageArea.cpp:

(WebKit::SQLiteStorageArea::isEmpty):
(WebKit::SQLiteStorageArea::prepareDatabase):
(WebKit::SQLiteStorageArea::getItemFromDatabase):
(WebKit::SQLiteStorageArea::allItems):
(WebKit::SQLiteStorageArea::setItem):
(WebKit::SQLiteStorageArea::removeItem):
(WebKit::SQLiteStorageArea::clear):

  • NetworkProcess/storage/SQLiteStorageArea.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm:

(-[LocalStorageUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

5:22 PM Changeset in webkit [287417] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION(Containment) nullptr deref in RenderBox::styleDidChange
https://bugs.webkit.org/show_bug.cgi?id=234647
<rdar://86841302>

Reviewed by Simon Fraser.

Source/WebCore:

Do not try to propagate the writing mode to the RenderView unless we are attached to one.

Test: fast/dynamic/document-elment-renderer-null-crash.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

LayoutTests:

  • fast/dynamic/document-elment-renderer-null-crash-expected.txt: Added.
  • fast/dynamic/document-elment-renderer-null-crash.html: Added.
3:46 PM Changeset in webkit [287416] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Update features.json for STP 134-137
https://bugs.webkit.org/show_bug.cgi?id=234650

Reviewed by Simon Fraser.

New contacts for Web Authn, dialog, inert (with their permission).
New CSS features added.

  • features.json:
3:19 PM Changeset in webkit [287415] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Update display property values in CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=234649

Reviewed by Simon Fraser.

Removed some spec links, since they're all in the css-display-3 spec which is already linked for the property.

flow, flow-root: r276293 implemented those 2 keywords in CSSPropertyParser.cpp (consumeDisplay function).

compact: removed in r163560

Also remove duplicate values array for border-collapse.

  • css/CSSProperties.json:
3:09 PM Changeset in webkit [287414] by commit-queue@webkit.org
  • 12 edits in trunk

Check allowed network hosts list when we schedule the load in the network process
https://bugs.webkit.org/show_bug.cgi?id=234543
<rdar://83501315>

Patch by Matt Woodrow <Matt Woodrow> on 2021-12-23
Reviewed by Alex Christensen.

The check for WKWebViewConfiguration._allowedNetworkHost previously happened before the check to see if
the given ResourceRequest would directly from an archive.
This moves to the allowed network host list check to happen when we schedule the network request, and thus
allows subresources cached within an archive to load, even if their original URL would be blocked.
Source/WebCore:

New test LoadWebArchive.DisallowedNetworkHosts added.

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

  • loader/ResourceLoadNotifier.h:

(WebCore::ResourceLoadNotifier::isInitialRequestIdentifier):

Source/WebKit:

We also need to check when redirecting to prevent an allowed domain from redirecting to a forbidden domain.
This also makes it so that WKWebViewConfiguration._loadsSubresources only prevents
subresource loads that would touch the network, so we can't use WKURLSchemeHandler to test it any more.
That's fine, since the two users of the SPI only load URLs from the network.

New test LoadWebArchive.DisallowedNetworkHosts added.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::willSendRequest):

Tools:

New test LoadWebArchive.DisallowedNetworkHosts added.

  • TestWebKitAPI/Tests/mac/LoadWebArchive.mm:

(TestWebKitAPI::TEST):

2:00 PM Changeset in webkit [287413] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Allow a necessary syscall in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=234641
<rdar://problem/86808395>

Reviewed by Alan Bujtas.

Telemetry and testing logs indicate that we need to allow
'SYS_memorystatus_control' in our WebContent sandbox.

We allow this in all other sandboxes, so this was likely an oversight.

  • WebProcess/com.apple.WebProcess.sb.in:
1:50 PM Changeset in webkit [287412] by beidson@apple.com
  • 39 edits
    1 copy in trunk

Add WTF::UUID class which is natively a 128-bit integer
https://bugs.webkit.org/show_bug.cgi?id=234571

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Refactor, covered by existing tests)

  • Modules/notifications/NotificationData.h:

(WebCore::NotificationData::decode):

Source/WebKit:

Notifications - which are UUID identified - are now addressed by a UUID object instead of a v4 UUID string.

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::cancelNotification):
(WebKit::NetworkNotificationManager::clearNotifications):
(WebKit::NetworkNotificationManager::didDestroyNotification):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Scripts/webkit/messages.py:

(forward_declarations_and_headers_for_replies):
(headers_for_type):

  • Shared/Notifications/NotificationManagerMessageHandler.h:
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in:
  • UIProcess/API/C/WKNotification.cpp:

(WKNotificationCopyCoreIDForTesting):

  • UIProcess/API/C/WKNotification.h:
  • UIProcess/API/C/WKNotificationManager.cpp:

(WKNotificationManagerProviderDidClickNotification_b):

  • UIProcess/API/C/WKNotificationManager.h:
  • UIProcess/Notifications/WebNotification.h:

(WebKit::WebNotification::coreNotificationID const):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:

(WebKit::WebNotificationManagerMessageHandler::cancelNotification):
(WebKit::WebNotificationManagerMessageHandler::clearNotifications):
(WebKit::WebNotificationManagerMessageHandler::didDestroyNotification):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::cancel):
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::pageIDsMatch):
(WebKit::pageAndNotificationIDsMatch):
(WebKit::WebNotificationManagerProxy::clearNotifications):
(WebKit::WebNotificationManagerProxy::providerDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):

  • UIProcess/Notifications/WebNotificationManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::cancelNotification):
(WebKit::WebPageProxy::clearNotifications):
(WebKit::WebPageProxy::didDestroyNotification):

  • UIProcess/WebPageProxy.h:
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleCopyWebNotificationID):

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::webNotificationID):

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::didShowNotification):
(WebKit::WebNotificationManager::didClickNotification):
(WebKit::WebNotificationManager::didCloseNotifications):

  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/Notifications/WebNotificationManager.messages.in:

Source/WTF:

This patch adds a new WTF::UUID class.

For now, it is simply a wrapper around a 128-bit integer, and creating a new one primes that integer with
cryptographically random data.

It can be encoded/decoded as well as used as a HashKey.

And it will be a great utility to use as a unique object identifier for objects that logically exist
in multiple processes.

On that note, it also changes "UUIDIdentifier" to use this new UUID class instead of a v4 UUID string.

  • wtf/Identified.h:

(WTF::UUIDIdentified::UUIDIdentified):

  • wtf/UUID.cpp:

(WTF::UUID::UUID):
(WTF::UUID::toVector const):
(WTF::UUID::hash const):

  • wtf/UUID.h:

(WTF::UUID::create):
(WTF::UUID::UUID):
(WTF::UUID::operator== const):
(WTF::UUID::data const):
(WTF::UUID::isHashTableDeletedValue const):
(WTF::UUIDHash::hash):
(WTF::UUIDHash::equal):
(WTF::HashTraits<UUID>::emptyValue):
(WTF::HashTraits<UUID>::constructDeletedValue):
(WTF::HashTraits<UUID>::isDeletedValue):
(WTF::UUID::encode const):
(WTF::UUID::decode):

Tools:

Notifications - which are UUID identified - are now addressed by a UUID object instead of a v4 UUID string.

The way our C-API vends that UUID object is through a data object, so change WKTR to account for that.

  • WebKitTestRunner/DataFunctions.h: Copied from Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h.

(WTR::dataValue):
(WTR::dataToUUID):
(WTR::uuidToData):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::postSimulateWebNotificationClick):
(WTR::postPageMessage):

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

(WTR::TestController::simulateWebNotificationClick):

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

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::showWebNotification):
(WTR::WebNotificationProvider::closeWebNotification):
(WTR::WebNotificationProvider::removeNotificationManager):
(WTR::WebNotificationProvider::simulateWebNotificationClick):
(WTR::WebNotificationProvider::reset):

  • WebKitTestRunner/WebNotificationProvider.h:
1:35 PM Changeset in webkit [287411] by weinig@apple.com
  • 22 edits
    3 adds in trunk

Encapsulate gradient color stops into a self contained class
https://bugs.webkit.org/show_bug.cgi?id=234583

Reviewed by Simon Fraser.

Source/WebCore:

Replace most uses of Gradient::ColorStopVector with new GradientColorStops class.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Add new file.

  • css/CSSGradientValue.h:
  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::computeStops):
Replace some usage of Gradient::ColorStopVector with GradientColorStops. While here,
optimize color filter transformation to only happen when there is color filter,
removing extra unnecessary copies of Colors.

Also utilizes the GradientColorStops::Sorted type to create a GradientColorStops
object that has the isSorted bit set.

(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
(WebCore::CSSConicGradientValue::createGradient):
The calls to setSortedColorStops is no longer needed, as the GradientColorStops
now maintains that state.

  • platform/graphics/Color.h:

(WebCore::add):
Move definition of add(Hasher&, Color) here, where it makes sense, rather than
keeping it in Gradient.

  • platform/graphics/FloatPoint.h:

(WebCore::add):
Move definition of add(Hasher&, FloatPoint) here, where it makes sense, rather than
keeping it in Gradient.

  • platform/graphics/Gradient.h:
  • platform/graphics/Gradient.cpp:

(WebCore::Gradient::create):
(WebCore::Gradient::Gradient):
(WebCore::Gradient::addColorStop):
(WebCore::Gradient::hash const):
(WebCore::Gradient::setSortedColorStops): Deleted.
(WebCore::Gradient::sortStops const): Deleted.
Replace ColorStopVector with GradientColorStops. This allows removing the m_stopsSorted
bit, as the new class maintains that, as well as removing setSortedColorStops since
you can achieve this by just creating the Gradient with a GradientColorStops that knows
it is sorted (using the GradientColorStops::Sorted helper).

  • platform/graphics/GradientColorStop.h:

(WebCore::add):
Move definition of add(Hasher&, GradientColorStop) here, where it makes sense, rather than
keeping it in Gradient.

  • platform/graphics/GradientColorStops.h: Added.

(WebCore::GradientColorStops::GradientColorStops):
(WebCore::GradientColorStops::addColorStop):
(WebCore::GradientColorStops::sort):
(WebCore::GradientColorStops::sorted const):
(WebCore::GradientColorStops::size const):
(WebCore::GradientColorStops::isEmpty const):
(WebCore::GradientColorStops::begin const):
(WebCore::GradientColorStops::end const):
(WebCore::GradientColorStops::mapColors const):
(WebCore::GradientColorStops::stops const):
(WebCore::GradientColorStops::validateIsSorted const):
(WebCore::GradientColorStops::encode const):
(WebCore::GradientColorStops::decode):
Encapsulate state and functionality of the gradient color stop list, maintaining
the sorted state, and providing a pleasent API to work with. In the future, this
will be a good place to add functions to analyze and transform the list for optimizing
what can use the gradient fast paths.

  • platform/graphics/cairo/GradientCairo.cpp:

Update to use the new names.

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::paint):
Ensure the color stops passed to the gradient renderer are sorted using the sorted()
helper, which does an inplace sort and returns a reference to itself.

  • platform/graphics/cg/GradientRendererCG.h:
  • platform/graphics/cg/GradientRendererCG.cpp:

(WebCore::GradientRendererCG::GradientRendererCG):
(WebCore::GradientRendererCG::pickStrategy const):
(WebCore::GradientRendererCG::makeGradient const):
(WebCore::GradientRendererCG::makeShading const):
Replace uses of GradientColorStopVector with GradientColorStops.

  • rendering/svg/RenderSVGResourceGradient.h:
  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::RenderSVGResourceGradient::stopsByApplyingColorFilter):
Add early return if there is no color filter to apply, and utilize the mapColors()
function to update the colors if there is.

  • rendering/svg/RenderSVGResourceLinearGradient.cpp:

(WebCore::RenderSVGResourceLinearGradient::buildGradient const):

  • rendering/svg/RenderSVGResourceRadialGradient.cpp:

(WebCore::RenderSVGResourceRadialGradient::buildGradient const):
Remove some extraneous type names.

  • svg/GradientAttributes.h:

(WebCore::GradientAttributes::stops const):
(WebCore::GradientAttributes::setStops):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::buildStops):

  • svg/SVGGradientElement.h:

Replace uses of GradientColorStopVector with GradientColorStops.

Tools:

  • TestRunnerShared/PlatformGTK.cmake: Added.
  • TestRunnerShared/PlatformWPE.cmake: Added.

Keep GTK and WPE ports building by propogating glib.h header to the test runnner. Change
by Fujii Hironori.

12:56 PM Changeset in webkit [287410] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GStreamer] MediaPlayerPrivateGStreamer mishandles failure to create WebKitTextCombiner
https://bugs.webkit.org/show_bug.cgi?id=233230

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-23
Reviewed by Michael Catanzaro.

Gracefully fail when the subenc plugin is not available. It is optional, we should not
assert or crash if it's not found. Two warnings are logged already when it's not found.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

12:54 PM Changeset in webkit [287409] by ntim@apple.com
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Support conic gradients in gradient editor and autocompletion
https://bugs.webkit.org/show_bug.cgi?id=234562

Reviewed by Devin Rousso.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Controllers/CSSManager.js:
  • UserInterface/Models/Gradient.js:

(WI.Gradient.angleFromString):
(WI.Gradient.fromString):
(WI.Gradient.prototype.get angleValue):
(WI.Gradient.prototype.set angleValue):
(WI.Gradient.prototype.get angleUnits):
(WI.Gradient.prototype.set angleUnits):
(WI.Gradient.prototype._angleValueForUnits):
(WI.Gradient):
(WI.LinearGradient.fromComponents):
(WI.LinearGradient.prototype.toString):
(WI.LinearGradient):
(WI.RadialGradient):
(WI.RadialGradient.fromComponents):
(WI.RadialGradient.prototype.get angleValue):
(WI.RadialGradient.prototype.set angleValue):
(WI.RadialGradient.prototype.get angleUnits):
(WI.RadialGradient.prototype.set angleUnits):
(WI.RadialGradient.prototype.copy):
(WI.RadialGradient.prototype.toString):
(WI.ConicGradient):
(WI.ConicGradient.fromComponents):
(WI.ConicGradient.prototype.copy):
(WI.ConicGradient.prototype.toString):
(WI.LinearGradient.prototype.set angleValue): Deleted.
(WI.LinearGradient.prototype.get angleValue): Deleted.
(WI.LinearGradient.prototype.set angleUnits): Deleted.
(WI.LinearGradient.prototype.get angleUnits): Deleted.
(WI.LinearGradient.prototype._angleValueForUnits): Deleted.

  • UserInterface/Views/CodeMirrorTextMarkers.js:
  • UserInterface/Views/GradientEditor.js:

(WI.GradientEditor):
(WI.GradientEditor.prototype.set gradient):
(WI.GradientEditor.prototype._gradientTypeChanged):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._addGradientTokens):

12:45 PM Changeset in webkit [287408] by ntim@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark mode: Make gradient editor angle input readable in dark mode
https://bugs.webkit.org/show_bug.cgi?id=234640

Reviewed by Devin Rousso.

Just use the native input styling, which is dark mode compatible by default.

  • UserInterface/Views/GradientEditor.css:

(.gradient-editor > .gradient-angle > input[type="number"]):

12:36 PM Changeset in webkit [287407] by Patrick Griffis
  • 2 edits in trunk/Tools

[Flatpak] Revert filesystem permission change in r287396
https://bugs.webkit.org/show_bug.cgi?id=234612

Reviewed by Michael Catanzaro.

This causes a regression where some important contents of
XDG_RUNTIME_DIR are overriden and causes issues like TLS failures.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

12:08 PM Changeset in webkit [287406] by ChangSeok Oh
  • 2 edits in trunk

Add changseok's github username.

Unreviewed.

  • metadata/contributors.json:
10:36 AM Changeset in webkit [287405] by sihui_liu@apple.com
  • 17 edits in trunk/Source

Ensure file handles used in FileSystemAccess API are closed
https://bugs.webkit.org/show_bug.cgi?id=234520

Reviewed by Darin Adler.

Source/WebCore:

WebCore::FileHandle closes file handle in its destructor. Replace FileSystem::PlatformFileHandle with
WebCore::FileHandle in FileSystemSyncAccessHandle and WorkerFileSystemStorageConnection to ensure file handle
get closed if worker thread fails to execute the callback of createSyncAccessHandle, and if
FileSystemSyncAccessHandle is destroyed.

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):

  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:

(WebCore::FileSystemSyncAccessHandle::create):
(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::truncate):
(WebCore::FileSystemSyncAccessHandle::getSize):
(WebCore::FileSystemSyncAccessHandle::flush):
(WebCore::FileSystemSyncAccessHandle::closeInternal):
(WebCore::FileSystemSyncAccessHandle::closeFile):
(WebCore::FileSystemSyncAccessHandle::read):
(WebCore::FileSystemSyncAccessHandle::write):

  • Modules/filesystemaccess/FileSystemSyncAccessHandle.h:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::didCreateSyncAccessHandle):
(WebCore::WorkerFileSystemStorageConnection::createSyncAccessHandle):

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
  • platform/FileHandle.cpp:

(WebCore::FileHandle::FileHandle):
(WebCore::FileHandle::operator=):
(WebCore::FileHandle::open):
(WebCore::FileHandle::read):
(WebCore::FileHandle::write):
(WebCore::FileHandle::close):
(WebCore::FileHandle::handle const):

  • platform/FileHandle.h:

Source/WebKit:

Replace FileSystem::PlatformFileHandle with WebCore::FileHandle in SharedFileHandle to ensure file handle get
closed, if it's not released for use.

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::createSyncAccessHandle):

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::createSyncAccessHandle):

  • Platform/IPC/SharedFileHandle.cpp:

(IPC::SharedFileHandle::create):
(IPC::SharedFileHandle::close): Deleted.

  • Platform/IPC/SharedFileHandle.h:

(IPC::SharedFileHandle::release):
(IPC::SharedFileHandle::SharedFileHandle):
(IPC::SharedFileHandle::handle): Deleted.
(): Deleted.

  • Platform/IPC/cocoa/SharedFileHandleCocoa.cpp:

(IPC::SharedFileHandle::create):
(IPC::SharedFileHandle::encode const):
(IPC::SharedFileHandle::decode):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::createSyncAccessHandle):

Source/WTF:

  • wtf/CrossThreadCopier.h:
9:57 AM Changeset in webkit [287404] by Wenson Hsieh
  • 15 edits
    1 copy
    6 adds in trunk

Add API testing support for modal container observation
https://bugs.webkit.org/show_bug.cgi?id=234610

Reviewed by Megan Gardner.

Source/WebCore:

Add support for new API tests for modal container observation SPI. See Tools/ChangeLog for more details.

Tests: ModalContainerObservation.HideAndAllowModalContainer

ModalContainerObservation.HideAndDisallowModalContainer
ModalContainerObservation.HideAndIgnoreModalContainer
ModalContainerObservation.ShowModalContainer

  • dom/Document.h:
  • page/ModalContainerObserver.cpp:

(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):
(WebCore::ModalContainerObserver::shouldHide): Deleted.

Drive-by adjustment: make shouldHide() an inline method, and mark it const.

  • page/ModalContainerObserver.h:

(WebCore::ModalContainerObserver::overrideSearchTermForTesting):

Add a testing-only method to override the search term used for modal container observation; if set, we ignore
the search term vended by the chrome client, and instead use this override.

(WebCore::ModalContainerObserver::shouldHide const):

  • testing/Internals.cpp:

(WebCore::Internals::overrideModalContainerSearchTermForTesting):

  • testing/Internals.h:

Add an internals hook to override the modal container search term.

  • testing/Internals.idl:

Tools:

Add support for new API tests that exercise the modal container observation policy in webpage preferences, as
well as the UI delegate SPI method for deciding policies in detected modal containers.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/modal-container.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm:

Non-unified-source build fix (see below).

  • TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm: Added.

(-[NSBundle swizzled_URLForResource:withExtension:]):
(TestWebKitAPI::ClassifierModelSwizzler::ClassifierModelSwizzler):
(TestWebKitAPI::ClassifierModelSwizzler::~ClassifierModelSwizzler):
(-[ModalContainerWebView initWithFrame:configuration:]):
(-[ModalContainerWebView loadBundlePage:andDecidePolicy:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(TestWebKitAPI::createModalContainerWebView):
(TestWebKitAPI::TEST):

Add API tests to exercise each of the 4 modal container policy decisions in a simple modal container. Two key
pieces are needed in order to simulate the end-to-end flow for detecting and deciding policies for modal
containers:

  1. Add internals.overrideModalContainerSearchTermForTesting(), which allows script (through the

internals testing plugin) to set ModalContainerObserver's search term.

  1. Swizzle out -[NSBundle URLForResource:withExtension:] to return the file URL to TestWebKitAPI's

TestModalContainerControls.mlmodelc, instead of the real CoreML model.

  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/analytics/coremldata.bin: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/coremldata.bin: Copied from Source/WebCore/page/ModalContainerObserver.h.
  • TestWebKitAPI/Tests/WebKitCocoa/TestModalContainerControls.mlmodelc/metadata.json: Added.

Add a mock CoreML model that's used to simulate classifier results in WebKit::ModalContainerControlClassifier.
See above for more details.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:

More non-unified-source build fixes: hoist the definitions of redColorComponents and blueColorComponents
into the USE(CG) part of TestCocoa.h, and then import TestCocoa.h in these files. This avoids build failures
due to symbol redefinition when we add the new test file above.

  • TestWebKitAPI/cocoa/TestCocoa.h:
9:55 AM Changeset in webkit [287403] by ntim@apple.com
  • 4 edits
    2 deletes in trunk/LayoutTests

Rebaseline getComputedStyle tests for iOS after r287356

Unreviewed test gardening.

Also combine results for ios-wk2 and ios, since they are the same, except ios is stale.

  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/ios-wk2/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
9:31 AM Changeset in webkit [287402] by Alan Coon
  • 1 copy in tags/Safari-613.1.12.2

Tag Safari-613.1.12.2.

9:29 AM Changeset in webkit [287401] by Alan Coon
  • 11 edits
    1 delete in branches/safari-613.1.12-branch/Source

Cherry-pick r287382. rdar://problem/86855207

Fix WebKit Build issues when using system content path
https://bugs.webkit.org/show_bug.cgi?id=234624

Reviewed by Filip Pizlo.

Source/ThirdParty/ANGLE:

Changed INSTALL_PATH on macOS builds to use a fully qualified .../WebCore.framework/Versions/A/Frameworks.
Deleted unused create-symlink-to-altroot.sh script.

  • Configurations/ANGLE-dynamic.xcconfig:
  • scripts/create-symlink-to-altroot.sh: Removed.

Source/ThirdParty/libwebrtc:

Changed INSTALL_PATH on macOS builds to use fully qualified .../WebCore.framework/Versions/A/Frameworks.

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Covered by existing tests.

Added SYSTEM_CONTENT_PATH processing to WebCore's normal location.

  • Configurations/WebCore.xcconfig:

Source/WebKit:

Added SYSTEM_CONTENT_PATH processing to the nested frameworks path (UMBRELLA_FRAMEWORKS_DIR).

  • Configurations/BaseTarget.xcconfig:
  • Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

Added SYSTEM_CONTENT_PATH processing to NORMAL_PRODUCTION_FRAMEWORKS_DIR.

  • Configurations/WebKitLegacy.xcconfig:

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

9:29 AM Changeset in webkit [287400] by Alan Coon
  • 2 edits in branches/safari-613.1.12-branch/Source/WebCore

Cherry-pick r287361. rdar://problem/86855206

Fix WebCore install headers with alternate build
https://bugs.webkit.org/show_bug.cgi?id=234592

Reviewed by Filip Pizlo.

Covered by existing tests.

Fixed OUTPUT_ALTERNATE_ROOT_PATH for macOS to return an empty value since we don't need a symlink
as the WebCore framework is in a subdirectory of WebKit.framework.
Fixed typos with NORMAL_PRODUCTION_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_YES rules,
eliminating the ')'s at the end of the lines.

  • Configurations/WebCore.xcconfig:

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

9:29 AM Changeset in webkit [287399] by Alan Coon
  • 9 edits in branches/safari-613.1.12-branch/Source

Cherry-pick r287326. rdar://problem/86855216

Fix symlinks for alternate root framework locations
https://bugs.webkit.org/show_bug.cgi?id=234567

Reviewed by Filip Pizlo.

Source/ThirdParty/ANGLE:

Eliminated the creation of symlinks for ANGLE as it is under WebCore.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:

Source/WebCore:

Covered by existing tests.

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebCore.xcodeproj/project.pbxproj:

Source/WebGPU:

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebGPU.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.

  • WebInspectorUI.xcodeproj/project.pbxproj:

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

9:23 AM Changeset in webkit [287398] by Alan Coon
  • 9 edits in branches/safari-613.1.12-branch/Source

Versioning.

WebKit-7613.1.12.2

9:19 AM Changeset in webkit [287397] by Simon Fraser
  • 14 edits in trunk

Share macOS code between ScrollAnimator::handleWheelEvent() and ScrollingEffectsController::handleWheelEvent()
https://bugs.webkit.org/show_bug.cgi?id=231238

Reviewed by Wenson Hsieh.

Source/WebCore:

ScrollAnimator::handleWheelEvent() had some macOS-only code (despite having a
ScrollAnimatorMac subclass) whose purpose was unclear. It turns out the code runs in two
scenarios: for select lists, which always scroll on the main thread, and in some main thread
scrolling cases when responding to non-gesture events (i.e. those from old-style clicky
scroll wheels).

Clean this by making that code clearly specific to "stepped scrolling", via the
virtual ScrollableArea::hasSteppedScrolling(). Call it in cross-platform code in
ScrollAnimator::handleWheelEvent().

The ScrollAnimatorMac::handleWheelEvent() override now simply calls into the base class,
after doing some macOS-specific stuff for phase handling (which is related to scrollbar flashing).

rubberBandingEnabledForSystem() is no longer consulted; this never worked for threaded scrolling.
If we need it, we can bring it back. We no longer need the shouldForwardWheelEventsToParent()
and its misleading comment.

Now that stateless wheel events go through ScrollingEffectsController::handleWheelEvent(),
we have to avoid doing axis snapping for them.

css3/scroll-snap/scroll-snap-wheel-event.html reveals a behavior progression: previously
stateless, main thread scroll snap scrolls would use the code now in
handleSteppedScrolling() and a single small delta would pick the snap point in that
direction. This differed from scrolling thread scrolls, where stateless scrolls animate to
the nearest snap pointer after a timer fire. Now, this same behavior applies to main thread
stateless scrolls.

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::isGestureEvent const):
(WebCore::PlatformWheelEvent::isNonGestureEvent const):

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::handleWheelEvent):
(WebCore::ScrollAnimator::handleSteppedScrolling):

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::hasSteppedScrolling const):

  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::handleWheelEvent):
(WebCore::rubberBandingEnabledForSystem): Deleted.
(WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent const): Deleted.

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

  • rendering/RenderListBox.h:

LayoutTests:

  • css3/scroll-snap/scroll-snap-wheel-event.html: We need to scroll 3 clicks to get closer to the target snap point.
  • platform/mac-wk1/fast/scrolling/latching/latching-and-wheel-events-expected.txt: Rebase already-failing

result (because ScrollingEffectsController::handleWheelEvent() doesn't scroll on the "begin" event).

  • platform/mac-wk1/fast/scrolling/latching/overflow-in-iframe-latching-expected.txt: Ditto.
  • platform/mac-wk1/fast/scrolling/latching/scroll-snap-latching-expected.txt: Ditto.
8:53 AM Changeset in webkit [287396] by Patrick Griffis
  • 2 edits in trunk/Tools

[Flatpak] Fix a11y tests on some distros including Fedora
https://bugs.webkit.org/show_bug.cgi?id=234612

Reviewed by Michael Catanzaro.

Using --no-a11y-bus fixes a11y working in Fedora, as well
as just being the intended behavior it always had since we
granted direct org.a11y.Bus access.

  • flatpak/flatpakutils.py:

(WebkitFlatpak):
(WebkitFlatpak.run_in_sandbox):

7:07 AM Changeset in webkit [287395] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not try to bidi reorder empty content
https://bugs.webkit.org/show_bug.cgi?id=234623

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::buildBidiParagraph):
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):

6:42 AM Changeset in webkit [287394] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Empty bidi inline boxes should not make the line taller
https://bugs.webkit.org/show_bug.cgi?id=234621

Reviewed by Antti Koivisto.

We perform the same check for non-bidi inline boxes (also see FIXME).

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

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

6:13 AM Changeset in webkit [287393] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for RTL scrollable overflow
https://bugs.webkit.org/show_bug.cgi?id=234617

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

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

  • platform/graphics/FloatRect.h:

(WebCore::FloatRect::shiftMaxXEdgeBy):

12:57 AM Changeset in webkit [287392] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: handle heading level as special case in intValue with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234603

Reviewed by Adrian Perez de Castro.

Tests expect intValue to return the heading level.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::intValue const):

12:57 AM Changeset in webkit [287391] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234601

Reviewed by Adrian Perez de Castro.

We need to handle aria-readonly attribute and the combobox and listbox elements.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::isAttributeSettable):

12:56 AM Changeset in webkit [287390] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: add missing bool and string attribute values with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234599

Reviewed by Adrian Perez de Castro.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::checkElementState):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::boolAttributeValue):

12:55 AM Changeset in webkit [287389] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK][a11y] WTR: ensure the root object is created before getting the focused element with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234597

Reviewed by Adrian Perez de Castro.

This is causing some tests to fail when executed in the same web process after another test.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:

(WTR::AccessibilityController::focusedElement):

12:54 AM Changeset in webkit [287388] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][a11y] Test accessibility/svg-remote-element.html crashes with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234563

Reviewed by Adrian Perez de Castro.

This is because the remote svg element wrappers can't be created because the svg image page hasn't the root
object set.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::remoteSVGRootElement const): Set the root image wrapper element on the svg
image page.

12:53 AM Changeset in webkit [287387] by Carlos Garcia Campos
  • 10 edits
    2 adds in trunk

[GTK][a11y] WTR: add support for notifications when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234550

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Add private API for WTR notifications.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::childrenChanged):
(WebCore::AccessibilityAtspi::stateChanged):
(WebCore::AccessibilityAtspi::textChanged):
(WebCore::AccessibilityAtspi::textCaretMoved):
(WebCore::AccessibilityAtspi::valueChanged):
(WebCore::AccessibilityAtspi::selectionChanged):
(WebCore::AccessibilityAtspi::loadEvent):
(WebCore::AccessibilityAtspi::addNotificationObserver):
(WebCore::AccessibilityAtspi::removeNotificationObserver):
(WebCore::AccessibilityAtspi::notifyStateChanged const):
(WebCore::AccessibilityAtspi::notifySelectionChanged const):
(WebCore::AccessibilityAtspi::notifyTextChanged const):
(WebCore::AccessibilityAtspi::notifyTextCaretMoved const):
(WebCore::AccessibilityAtspi::notifyChildrenChanged const):
(WebCore::AccessibilityAtspi::notifyValueChanged const):
(WebCore::AccessibilityAtspi::notifyLoadEvent const):

  • accessibility/atspi/AccessibilityAtspi.h:

Tools:

Add AccessibilityNotificationHandler class to handle the ATSPI notifications.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:

(WTR::AccessibilityController::resetToConsistentState): Remove the global event listener if there's one active.
(WTR::AccessibilityController::addNotificationListener): Create a global event listener.
(WTR::AccessibilityController::removeNotificationListener): Remove the global event listener.

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.cpp: Added.

(WTR::AccessibilityNotificationHandler::AccessibilityNotificationHandler):
(WTR::AccessibilityNotificationHandler::~AccessibilityNotificationHandler):

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityNotificationHandler.h: Added.
  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:

(WTR::AccessibilityUIElement::addNotificationListener): Create the element event listener.
(WTR::AccessibilityUIElement::removeNotificationListener): Remove the element event listener.

  • WebKitTestRunner/PlatformGTK.cmake:
12:46 AM Changeset in webkit [287386] by commit-queue@webkit.org
  • 6 edits in trunk

[GStreamer] test fast/mediastream/get-display-media-settings.html fails
https://bugs.webkit.org/show_bug.cgi?id=233879

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-23
Reviewed by Youenn Fablet.

Source/WebCore:

Pass down hashSalt to GStreamer display mock capture source and
advertise its deviceId as supported constraint.

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:

(WebCore::MockDisplayCaptureSourceGStreamer::create):
(WebCore::MockDisplayCaptureSourceGStreamer::MockDisplayCaptureSourceGStreamer):
(WebCore::MockDisplayCaptureSourceGStreamer::settings):

  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

LayoutTests:

  • platform/glib/TestExpectations:
Note: See TracTimeline for information about the timeline view.