Timeline



Jan 2, 2022:

11:39 PM Changeset in webkit [287531] by ysuzuki@apple.com
  • 7 edits
    1 add in trunk

[JSC] Use emitPutProperty / emitGetPropertyValue consistently to handle private names in edge cases
https://bugs.webkit.org/show_bug.cgi?id=234794

Reviewed by Alexey Shvayka.

JSTests:

  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch consistently uses emitPutProperty / emitGetPropertyValue so that we handle private names
in edge cases.

  • bytecompiler/NodesCodegen.cpp:

(JSC::TaggedTemplateNode::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::AssignmentElementNode::bindValue const):

10:30 PM Changeset in webkit [287530] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening, update baseline for imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window.html
https://bugs.webkit.org/show_bug.cgi?id=207258

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/transfer-errors.window-expected.txt:
9:52 PM Changeset in webkit [287529] by Manuel Rego Casasnovas
  • 12 edits
    2 adds in trunk

Access key should work on focusable element.
https://bugs.webkit.org/show_bug.cgi?id=72359

Reviewed by Darin Adler.

Source/WebCore:

Elements that have "accesskey" attribute and are focusable should be focused when you use the access key,
this is happening for some elements but not all.
To fix the issue this patch moves accessKeyAction() implementation from some subclasses to HTMLElement,
which makes us match other browsers.

This patch changes the behavior for HTMLAnchorElement, as it was not focused before, but that matches other browsers too.

Test: fast/dom/accesskey-focus-element.html

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::accessKeyAction): Deleted.

  • html/HTMLAnchorElement.h:
  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::accessKeyAction): Deleted.

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

(WebCore::HTMLElement::accessKeyAction):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::accessKeyAction): Deleted.

  • html/HTMLSelectElement.h:

LayoutTests:

Add new test to check the behavior of accesskey on focusable and not focusable DIV, together with other elements
like INPUT, SELECT and A.
Update expectations for fast/forms/access-key.html test, as now more elements are focused than before.
Apart from that we had to modify accessibility/mac/search-predicate-visited-links.html as that was pressing a link
and the link is now focused.

This will make us also pass css/selectors/focus-visible-024.html from WPT, but that test cannot run properly on WebKit
due to webkit.org/b/234139.

  • accessibility/mac/search-predicate-visited-links.html: Update test due to change of behavior.
  • fast/dom/accesskey-focus-element-expected.txt: Added.
  • fast/dom/accesskey-focus-element.html: Added.
  • fast/forms/access-key-expected.txt: Update expectations.
  • platform/ios/TestExpectations: Skip new accesskey test.
9:40 PM Changeset in webkit [287528] by Diego Pino Garcia
  • 2 edits
    2 adds in trunk/LayoutTests

[GTK] Unreviewed test gardening, emit baseline for imported/w3c/web-platform-tests/css/selectors/focus-visible-002.html
https://bugs.webkit.org/show_bug.cgi?id=224967

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt: Added.
7:43 PM Changeset in webkit [287527] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

[GTK] Unreviewed build fix after r287519
https://bugs.webkit.org/show_bug.cgi?id=234802

  • layout/integration/InlineIteratorInlineBox.cpp:

(WebCore::InlineIterator::firstInlineBoxFor):
(WebCore::InlineIterator::firstRootInlineBoxFor):

6:22 PM Changeset in webkit [287526] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[WPE] [Debug] Unreviewed test gardening, remove WebXR tests failures no longer crashing
https://bugs.webkit.org/show_bug.cgi?id=225379

  • platform/wpe/TestExpectations:
4:49 PM Changeset in webkit [287525] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add ASSERT(middle >= left && middle < right) to TextUtil::breakWord
https://bugs.webkit.org/show_bug.cgi?id=234801

Reviewed by Antti Koivisto.

Before adding support for surrogate pairs, the implicit integral flooring guaranteed that
(left + right) / 2 always produced a middle point where left >= middle and middle < right.
With introducing surrogate pair support, the middle point may end up being equal to the right position.
(when the (left + right) / 2 falls right in the middle of a surrogate pair, we advance the index
to the _end_ of the pair (and later we adjust it by calling U16_SET_CP_START)).

In this patch, we revert this behavior back so that the middle point is always < right.
We also make sure that left/right/middle are all fall on cluster boundary by calling nextUserPerceivedCharacterIndex.
This patch is also in preparation for introducing grapheme cluster support.

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

(WebCore::Layout::TextUtil::breakWord):

3:42 PM Changeset in webkit [287524] by graouts@webkit.org
  • 6 edits in trunk

LayoutTests/imported/w3c:
[Web Animations] getKeyframes() should handle multiple 0% and 100% keyframes
https://bugs.webkit.org/show_bug.cgi?id=234799

Reviewed by Dean Jackson.

Mark a WPT progression.

  • web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative-expected.txt:

Source/WebCore:
[Web Animations] getKeyframes() should handle multiple keyframes for the same offset
https://bugs.webkit.org/show_bug.cgi?id=234799

Reviewed by Dean Jackson.

A @keyframes rule may specify multiple keyframes for the same offset. We currently have support
for merging such keyframes into consolidated keyframes in Style::Resolver::keyframeStylesForAnimation()
but WPT shows that it's lacking since it doesn't account for animation-timing-function. Indeed, we
need to be careful not to merge keyframes with the same offset but a different timing function.

So we now use a std::pair<> using an offset and a timing function to compute de-duplicated keyframes.
But this showed an issue with StepsTimingFunction::operator== where we would not return true for
steps(1) and steps(1, end) since we only checked for equality for the optional keyword and did not
account for the default "end" value should the keyword not be explicit.

This ensured we correctly de-duplicated keyframes accounting for not only the offset but also
the timing function. But this then highlighted a different issue which was that our getKeyframes()
only ever expected one keyframe respectively for the 0% or 100% offsets when filling in implicit
values, which we'd just added support for in bug 234795.

So in KeyframeEffect::getKeyframes() we now compile a list of properties not explicitly specified
on any of the 0% or 100% keyframes and, as we process the first of a 0% or 100% keyframe, we set
the implicit properties.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):

  • platform/animation/TimingFunction.h:
  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::keyframeStylesForAnimation):

1:37 PM Changeset in webkit [287523] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Rebaselining after r287519.

Unreviewed.

  • platform/ios/fast/table/table-continuation-outline-paint-crash-expected.txt:
12:19 PM Changeset in webkit [287522] by Wenson Hsieh
  • 6 edits
    1 add in trunk

[WebKit2] Camera continuity is disabled in richly editable content
https://bugs.webkit.org/show_bug.cgi?id=234773
rdar://46323417

Reviewed by Darin Adler.

Source/WebKit:

-[WKWebView validRequestorForSendType:returnType:] currently never returns a nonnull result when the given
send type is nil, because WebViewImpl::validRequestorForSendAndReturnTypes only sets isValidSendType to
anything other than false if sendType is nonnull. Instead of doing this, we should match legacy WebKit
behavior by treating the send type as "valid" if it's nil.

Test: NSResponderTests.ValidRequestorForReturnTypes

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):

Source/WebKitLegacy/mac:

Drive-by fix: add a missing ALLOW_DEPRECATED_DECLARATIONS_END for the unbalanced BEGIN declaration.

  • WebView/WebHTMLView.mm:

(+[WebHTMLView _insertablePasteboardTypes]):

Tools:

Add an API test to verify that the result of -validRequestorForSendType:returnType: isn't always nil in the
case where there is no send type.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/NSResponderTests.mm: Added.

(TestWebKitAPI::TEST):

11:05 AM Changeset in webkit [287521] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Followup to r287494
https://bugs.webkit.org/show_bug.cgi?id=234747
rdar://85899879

Reviewed by Darin Adler.

Use auto instread of RefPtr when storing the result of enclosingImageElement() in a few places; this
method already returns a RefPtr.

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::updateAttributes):
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):

10:48 AM Changeset in webkit [287520] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

[LFC][Integration] RenderBlockFlow::containsNonZeroBidiLevel should use iterator
https://bugs.webkit.org/show_bug.cgi?id=234796

Reviewed by Alan Bujtas.

Also rename Line::first/lastRun -> Line::first/lastLeafBox for consistency and accuracy.

  • editing/VisibleUnits.cpp:

(WebCore::startPositionForLine):
(WebCore::endPositionForLine):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):

  • layout/integration/InlineIteratorLine.cpp:

(WebCore::InlineIterator::Line::firstLeafBox const):
(WebCore::InlineIterator::Line::lastLeafBox const):
(WebCore::InlineIterator::Line::closestRunForLogicalLeftPosition const):
(WebCore::InlineIterator::Line::selectionState const):
(WebCore::InlineIterator::Line::firstSelectedBox const):
(WebCore::InlineIterator::Line::lastSelectedBox const):
(WebCore::InlineIterator::Line::firstRun const): Deleted.
(WebCore::InlineIterator::Line::lastRun const): Deleted.

  • layout/integration/InlineIteratorLine.h:
  • layout/integration/InlineIteratorLineLegacyPath.h:

(WebCore::InlineIterator::LineIteratorLegacyPath::firstLeafBox const):
(WebCore::InlineIterator::LineIteratorLegacyPath::lastLeafBox const):
(WebCore::InlineIterator::LineIteratorLegacyPath::firstRun const): Deleted.
(WebCore::InlineIterator::LineIteratorLegacyPath::lastRun const): Deleted.

  • layout/integration/InlineIteratorLineModernPath.h:

(WebCore::InlineIterator::LineIteratorModernPath::firstLeafBox const):
(WebCore::InlineIterator::LineIteratorModernPath::lastLeafBox const):
(WebCore::InlineIterator::LineIteratorModernPath::firstRun const): Deleted.
(WebCore::InlineIterator::LineIteratorModernPath::lastRun const): Deleted.

  • layout/integration/InlineIteratorLogicalOrderTraversal.h:

(WebCore::InlineIterator::leafBoxesInLogicalOrder):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • style/InlineTextBoxStyle.cpp:

(WebCore::minLogicalTopForTextDecorationLine):
(WebCore::maxLogicalBottomForTextDecorationLine):

10:30 AM Changeset in webkit [287519] by Antti Koivisto
  • 14 edits in trunk

[LFC][Integration] Support outlines
https://bugs.webkit.org/show_bug.cgi?id=234766

Reviewed by Alan Bujtas.

Source/WebCore:

Outlines should not require legacy line layout.

  • layout/integration/InlineIteratorInlineBox.cpp:

(WebCore::InlineIterator::firstInlineBoxFor):
(WebCore::InlineIterator::firstRootInlineBoxFor):

Add iterator support for getting inline boxes from renderer.

  • layout/integration/InlineIteratorInlineBox.h:
  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForRenderInlineChild):
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

  • layout/integration/LayoutIntegrationCoverage.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstInlineBoxFor const):
(WebCore::LayoutIntegration::LineLayout::firstRootInlineBox const):
(WebCore::LayoutIntegration::LineLayout::paint):

Support outline painting.

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintObject):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

Port to use iterator.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

Port to use iterator.

LayoutTests:

  • fast/repaint/focus-ring-repaint-expected.txt:
  • platform/ios/fast/table/table-continuation-outline-paint-crash-expected.txt:
  • platform/mac/fast/table/table-continuation-outline-paint-crash-expected.txt:
9:59 AM Changeset in webkit [287518] by graouts@webkit.org
  • 4 edits in trunk

[Web Animations] getKeyframes() should ensure that all properties are present on 0% and 100% keyframes
https://bugs.webkit.org/show_bug.cgi?id=234795

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark a WPT progressions.

  • web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative-expected.txt:

Source/WebCore:

Keyframes at 0% and 100% may not explicitly specify properties animated on intermediate keyframes, so
in the case of such keyframes, we must ensure we output the non-animated value for properties not
explicitly specified on the keyframe style.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):

8:12 AM Changeset in webkit [287517] by graouts@webkit.org
  • 6 edits in trunk

[Web Animations] getKeyframes() should return an empty object when there are no animatable properties in @keyframes rule
https://bugs.webkit.org/show_bug.cgi?id=234793

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark a new WPT progression.

  • web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative-expected.txt:

Source/WebCore:

If the keyframes for an animation result from a declarative source, let's not output any data if none of the properties
are animatable.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::getKeyframes):

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::containsAnimatableProperty const):

  • rendering/style/KeyframeList.h:
7:38 AM Changeset in webkit [287516] by commit-queue@webkit.org
  • 7 edits in trunk/Source/JavaScriptCore

Remove unused AbstractMacroAssembler::repatchJumpToNop() function
https://bugs.webkit.org/show_bug.cgi?id=234777

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-01-02
Reviewed by Yusuke Suzuki.

Remove the unused AbstractMacroAssembler::repatchJumpToNop() function,
along with the underlying relinkJumpToNop() functions on ISA-specific
assembler classes.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::relinkJumpToNop): Deleted.

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::relinkJumpToNop): Deleted.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::repatchJumpToNop): Deleted.

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::relinkJumpToNop): Deleted.

  • assembler/RISCV64Assembler.h:

(JSC::RISCV64Assembler::relinkJumpToNop): Deleted.

  • assembler/X86Assembler.h:

(JSC::X86Assembler::relinkJumpToNop): Deleted.

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

InlineTextItems should never split inside surrogate pairs
https://bugs.webkit.org/show_bug.cgi?id=234791

Reviewed by Antti Koivisto.

This check was added (r285016) to handle the case if the start position in TextUtil::breakWord is
inside a surrogate pair. However we should never have surrogate pairs split across InlineTextItems.
This incorrect state was caused by the bogus "let's keep the first character on the current line" logic
-which could also lead to a visually broken rendering.
(Note that fast/text/word-break-letter-spacing-utf16-surrogates.html passes without the early return)

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

(WebCore::Layout::TextUtil::breakWord):
(WebCore::Layout::TextUtil::firstUserPerceivedCharacterLength):

7:05 AM Changeset in webkit [287514] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][IFC] Nested inline box continuation fails to omit margin/border/padding start/end values
https://bugs.webkit.org/show_bug.cgi?id=234789

Reviewed by Antti Koivisto.

Source/WebCore:

Nested inline boxes inside continuation do not have block parents. It's sufficient to check
for the continuation bits.

Test: fast/inline/unexpected-start-end-decoration-with-nested-continuation.html

  • layout/integration/LayoutIntegrationBoxTree.cpp:

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

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):

LayoutTests:

  • fast/inline/unexpected-start-end-decoration-with-nested-continuation-expected.html: Added.
  • fast/inline/unexpected-start-end-decoration-with-nested-continuation.html: Added.
2:32 AM Changeset in webkit [287513] by commit-queue@webkit.org
  • 9 edits in trunk/Source/JavaScriptCore

[RISCV64] Make DFG, FTL, B3, WASM buildable on CPU(RISCV64)
https://bugs.webkit.org/show_bug.cgi?id=234775

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-01-02
Reviewed by Yusuke Suzuki.

Enable building DFG, FTL, B3 and WASM subsystems on 64-bit RISC-V.
Necessary guards and missing bits are added to make things buildable,
but actual enabling of these features at build-time is left for later.
Even when enabled at build-time in the future, there'll likey be open
issues that will require disabling different features at run-time.

MacroAssemblerRISCV64::setCarry() no-op method is added for now. Carry
flag retrieval isn't exactly possible on RISC-V, so the uses of it will
have to be addressed some other way.

The patchpointScratchRegister value is defined for CPU(RISCV64). As
on ARM64, the value matches MacroAssemblerRISCV64::dataTempRegister.

In B3, we follow ARM64 in the pinned extended-offset-address use and
stack argument lowering.

in WASM, we can again mirror ARM64 around LLInt callee registers and
slots as well as executing the epilogue of a OSR-entry callee.

  • assembler/MacroAssembler.h: Provide lea64() for CPU(RISCV64) as well.
  • assembler/MacroAssemblerRISCV64.h:
  • b3/B3Common.cpp:

(JSC::B3::pinnedExtendedOffsetAddrRegister):

  • b3/air/AirLowerStackArgs.cpp:

(JSC::B3::Air::lowerStackArgs):

  • jit/GPRInfo.h:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::LLIntCallee::calleeSaveRegisters):

  • wasm/WasmLLIntPlan.cpp:

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

  • wasm/WasmOperations.cpp:

(JSC::Wasm::doOSREntry):

1:12 AM Changeset in webkit [287512] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[RISCV64] Enable building LLInt WebAssembly via the riscv64 offlineasm backend
https://bugs.webkit.org/show_bug.cgi?id=234776

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-01-02
Reviewed by Yusuke Suzuki.

Sprinkle RISCV64 conditions around WebAssembly.asm as appropriate.
For division, we can reuse the divi(s)/divq(s) instructions already
available in offlineasm. RISC-V additionally provides remainder
instructions, so the necessary offlineasm instructions are added
and used for RISCV64.

In the offlineasm riscv64 backend, the division and remainder
instruction handling is improved to properly cover signed and unsigned
variants. For other instructions used in LLint WebAssembly
implementation like left or right rotation, trailing- or leading-zero
counting, order-based floating-point comparison, load-reserved and
store-conditional operations, the riscv64WASMPlaceholder helper is used
to generate an ebreak instruction that will halt the program at runtime
but will not throw a build-time error. Proper implementations will be
provided once WebAssembly support on RISCV64 is taken up.

  • llint/WebAssembly.asm:
  • offlineasm/instructions.rb:
  • offlineasm/riscv64.rb:
1:07 AM Changeset in webkit [287511] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[RISCV64] Get testmasm building for CPU(RISCV64)
https://bugs.webkit.org/show_bug.cgi?id=234774

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-01-02
Reviewed by Yusuke Suzuki.

Add missing MacroAssemblerRISCV64 methods used in testmasm. Placeholders
are used for now, proper implementations will be introduced later.

In testmasm itself, we avoid testing the condition-flags register values
since, like on MIPS, that register isn't available on RISC-V.

  • assembler/MacroAssemblerRISCV64.h:
  • assembler/testmasm.cpp:

(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesStackValues):

12:20 AM Changeset in webkit [287510] by ysuzuki@apple.com
  • 18 edits
    74 adds
    3 deletes in trunk

[JSC] Replace UDIS86 with Zydis
https://bugs.webkit.org/show_bug.cgi?id=234765

Reviewed by Michael Saboff.

Source/JavaScriptCore:

UDIS86 is not updated from 2014. Since it is missing relatively new SIMD opcodes,
we cannot disassemble these opcodes when implementing Wasm SIMD.
This patch replaces UDIS86 with Zydis, which is actively developed and used in
SpiderMonkey too. It is under MIT license.

This patch imports Zydis v3.2.1.

  1. Import header and C files of Zydis and Zycore in a flattened manner.
  2. Add directory names to the files (e.g. Zydis/Decoder.c => ZydisDecoder.c) to make it easy to build in JSC build.
  3. Replace header includes from #include <Zydis/XXX.h> to #include "ZydisXXX.h".
  4. Fix compile errors with our stricter compiler flags.
  5. Remove Zycore API files and ZycoreArgParse.[hc] since they are not used.

We didn't add files to Sources.txt since unified builds do not support C files currently.

Source/WTF:

  • wtf/PlatformEnable.h:

Jan 1, 2022:

11:22 PM Changeset in webkit [287509] by graouts@webkit.org
  • 8 edits in trunk

"animation" shorthand does not parse values in the right order
https://bugs.webkit.org/show_bug.cgi?id=234788

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark a new WPT progression.

  • web-platform-tests/css/css-animations/parsing/animation-valid-expected.txt:

Source/WebCore:

The animation-name should be parsed last, not first.

  • css/CSSProperties.json:

LayoutTests:

Update the order in which animation-name is serialized in the "animation" shorthand
for some non-WPT tests.

  • fast/css/longhand-overrides-shorthand-prefixing-expected.txt:
  • fast/css/longhand-overrides-shorthand-prefixing.html:
  • fast/css/transform-inline-style-remove-expected.txt:
5:06 PM Changeset in webkit [287508] by Diego Pino Garcia
  • 5 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening, update flakey tests expectations
https://bugs.webkit.org/show_bug.cgi?id=234760

Remove tests that have been constantly passing for the last 4000 revisions, as well as update state of tests
that have been constantly failing with a single state.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/events/wheel/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt:
  • platform/gtk/fast/events/wheel/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt:
  • platform/wpe/TestExpectations:
4:19 PM Changeset in webkit [287507] by Jean-Yves Avenard
  • 11 edits in trunk/Source/WebCore

ScalableImageDecoder should be using SharedBuffer instead of DataSegment
https://bugs.webkit.org/show_bug.cgi?id=233441
rdar://problem/85854204

Reviewed by Darin Adler.

DataSegment should be a SharedBuffer's implementation details and not
be used outside SharedBuffer's code.
Historically, using the inner DataSegment was required as it was thread
safe while SharedBuffer wasn't: This is no longer the case.
SharedBuffer and DataSegment are semantically very similar, so this is
mostly a find/replace change.
Flattening the FragmentedSharedBuffer is still required as most decoders
require reading the raw bytes.

No change in observable behaviour.

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::setSize):
(WebCore::ImageBackingStore::ImageBackingStore):

  • platform/image-decoders/ScalableImageDecoder.h:
  • platform/image-decoders/avif/AVIFImageReader.cpp:

(WebCore::AVIFImageReader::parseHeader):
(WebCore::AVIFImageReader::decodeFrame):

  • platform/image-decoders/avif/AVIFImageReader.h:
  • platform/image-decoders/bmp/BMPImageReader.h:

(WebCore::BMPImageReader::readUint16):
(WebCore::BMPImageReader::readUint32):
(WebCore::BMPImageReader::setData):

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFImageReader::setData):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageReader::decode):

  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:

(WebCore::JPEG2000ImageDecoder::decode):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageReader::decode):

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::decode):

4:09 PM Changeset in webkit [287506] by Jean-Yves Avenard
  • 4 edits in trunk

make SharedBuffer::copy() return a contiguous SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=234622
rdar://problem/86829527

Reviewed by Darin Adler.

Source/WebCore:

make SharedBuffer::copy() return a contiguous SharedBuffer

API tests added.

  • platform/SharedBuffer.cpp:

(WebCore::FragmentedSharedBuffer::copy const):

Tools:

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):

3:06 PM Changeset in webkit [287505] by Wenson Hsieh
  • 5 edits in trunk

Modal containers are incorrectly detected in navigation elements and fixed document elements
https://bugs.webkit.org/show_bug.cgi?id=234669
rdar://87030613

Reviewed by Darin Adler.

Source/WebCore:

Avoid false positives when detecting modal containers in the following scenarios:

  • Fixed-position document elements that contain the search term.
  • Text that contains the search term inside fixed-position navigation elements.

Additionally, ensure that we unhide the current modal container in the event of a false positive where we find
no element that fulfills the criteria for being a classifiable control.

Tests: ModalContainerObservation.IgnoreFixedDocumentElement

ModalContainerObservation.IgnoreNavigationElements
ModalContainerObservation.ShowModalContainerAfterFalsePositive

  • page/ModalContainerObserver.cpp:

(WebCore::accessibilityRole):

Move this static helper function farther up this source file, so that we can use it inside
updateModalContainerIfNeeded().

(WebCore::isInsideNavigationElement):
(WebCore::ModalContainerObserver::updateModalContainerIfNeeded):
(WebCore::ModalContainerPolicyDecisionScope::ModalContainerPolicyDecisionScope):
(WebCore::ModalContainerPolicyDecisionScope::~ModalContainerPolicyDecisionScope):
(WebCore::ModalContainerPolicyDecisionScope::continueHidingModalContainerAfterScope):
(WebCore::ModalContainerPolicyDecisionScope::document const):

Add a RAII helper object to ensure that the modal container is revealed at the end of the modal container policy
decision scope, unless continueHidingModalContainerAfterScope() is invoked. Since this class contains a
WeakPtr<Document> already, we can replace the WeakPtr<Document> we're currently plumbing through each of the
async callbacks with only the ModalContainerPolicyDecisionScope, and just grab the document (or null if it was
destroyed) from the scope object.

This helper object allows us to avoid sprinkling ad-hoc calls to revealModalContainer() when exiting modal
container classification codepaths.

(WebCore::ModalContainerObserver::collectClickableElementsTimerFired):

  • page/ModalContainerObserver.h:

Tools:

Add several new API tests to exercise the changes.

  • TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:

(-[ModalContainerWebView initWithFrame:configuration:]):
(-[ModalContainerWebView loadHTML:]):
(-[ModalContainerWebView _webView:decidePolicyForModalContainer:decisionHandler:]):
(TestWebKitAPI::TEST):

2:54 PM Changeset in webkit [287504] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] Unexpected line break with leading collapsed whitespace
https://bugs.webkit.org/show_bug.cgi?id=234786

Reviewed by Antti Koivisto.

Source/WebCore:

We use Line::hasContent to decide whether an overflowing content should be wrapped to the next line.
Line is considered empty unless it has at least one content-type run.

Test: fast/inline/unexpected-line-break-on-empty-content.html

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::hasContent const):

LayoutTests:

  • fast/inline/unexpected-line-break-on-empty-content-expected.html: Added.
  • fast/inline/unexpected-line-break-on-empty-content.html: Added.
1:03 PM Changeset in webkit [287503] by Wenson Hsieh
  • 2 edits in trunk/Tools

[Cocoa] Simplify some FontAttributes API tests
https://bugs.webkit.org/show_bug.cgi?id=234770

Reviewed by Darin Adler.

Simplify some of the logic around FontAttributes.FontAttributesAfterChangingSelection:

  1. Instead of defining PlatformColor/PlatformFont, use CocoaColor/CocoaFont from WebCore.
  2. Remove the Nullity flag in ShadowExpectation and ColorExpectation (and use std::optional instead to

indicate that the shadow or font attribute should be null).

  1. Change a several rvalue references to be plain values instead (when passinng expectation structs that only

contain a handful of scalar values).

  • TestWebKitAPI/Tests/WebKitCocoa/FontAttributes.mm:

(TestWebKitAPI::checkColor):
(TestWebKitAPI::checkShadow):
(TestWebKitAPI::checkFont):
(TestWebKitAPI::TEST):
(TestWebKitAPI::ColorExpectation::ColorExpectation): Deleted.
(TestWebKitAPI::ShadowExpectation::ShadowExpectation): Deleted.

8:25 AM Changeset in webkit [287502] by jeffm@apple.com
  • 22 edits in trunk

Update user-visible copyright strings to include 2022
https://bugs.webkit.org/show_bug.cgi?id=234263

Reviewed by Anders Carlsson.

.:

  • Source/cmake/tools/scripts/COPYRIGHT-END-YEAR:

Source/JavaScriptCore:

  • Info.plist:

Source/WebCore:

  • Info.plist:

Source/WebGPU:

  • Info.plist:

Source/WebKit:

  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:
  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist:
  • Info.plist:
  • NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist:
  • NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist:
  • WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist:
  • WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:

Source/WebKitLegacy/mac:

  • Info.plist:

WebKitLibraries:

  • win/tools/scripts/COPYRIGHT-END-YEAR:
7:34 AM Changeset in webkit [287501] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Simple RTL content triggers redundant horizontal positioning
https://bugs.webkit.org/show_bug.cgi?id=234772

Reviewed by Antti Koivisto.

RTL content with inline boxes require a second pass horizontal positioning.
Currently we trigger this second pass even when the content does not have any inline box.
(e.g <div>content<span>with inline box</span></div> <div>content with no inline box</div>)

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

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent): !0 parentDisplayBoxNodeIndex means non-root inline box.
(WebCore::Layout::DisplayBoxTree::hasInlineBox const): Deleted.

6:55 AM Changeset in webkit [287500] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][IFC] Incorrect word-spacing gaps between RTL runs
https://bugs.webkit.org/show_bug.cgi?id=234771

Reviewed by Antti Koivisto.

Source/WebCore:

"word-spacing" acts as a margin for word separator type of runs.
In this patch we take this margin into account the same way we do for atomic inline level boxes with margins.

Test: fast/text/word-spacing-rtl.html

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::Run::Run):

  • layout/formattingContexts/inline/InlineLine.h:

(WebCore::Layout::Line::Run::isText const):
(WebCore::Layout::Line::Run::isWordSeparator const):

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

(WebCore::InlineDisplay::Box::isText const):
(WebCore::InlineDisplay::Box::isWordSeparator const):
(WebCore::InlineDisplay::Box::isNonRootInlineLevelBox const):
(WebCore::InlineDisplay::Box::type const): Deleted.

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

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

LayoutTests:

  • fast/text/word-spacing-rtl-expected.html: Added.
  • fast/text/word-spacing-rtl.html: Added.
6:15 AM Changeset in webkit [287499] by ntim@apple.com
  • 42 edits
    1 copy
    5 moves
    68 adds in trunk/LayoutTests

Re-import css/css-writing-modes WPT
https://bugs.webkit.org/show_bug.cgi?id=234764

Reviewed by Dean Jackson.

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

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/css/css-writing-modes/astral-bidi/adlam-anti-ref-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/astral-bidi/adlam-anti-ref-expected.html.
  • web-platform-tests/css/css-writing-modes/astral-bidi/cypriot-anti-ref-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/astral-bidi/cypriot-anti-ref-expected.html.
  • web-platform-tests/css/css-writing-modes/astral-bidi/w3c-import.log:
  • web-platform-tests/css/css-writing-modes/bidi-dynamic-iframe-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/bidi-dynamic-iframe-001.html: Added.
  • web-platform-tests/css/css-writing-modes/bidi-plaintext-br-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/bidi-plaintext-br-001.html: Added.
  • web-platform-tests/css/css-writing-modes/block-flow-direction-slr-062.xht:
  • web-platform-tests/css/css-writing-modes/block-flow-direction-srl-061.xht:
  • web-platform-tests/css/css-writing-modes/block-flow-direction-vlr-022.xht:
  • web-platform-tests/css/css-writing-modes/block-flow-direction-vrl-021.xht:
  • web-platform-tests/css/css-writing-modes/crashtests/orthogonal-percent-height-multicol-crash.html: Added.
  • web-platform-tests/css/css-writing-modes/crashtests/orthogonal-scroll-percent-height-crash.html: Added.
  • web-platform-tests/css/css-writing-modes/crashtests/orthogonal-table-in-flex-crash.html: Added.
  • web-platform-tests/css/css-writing-modes/crashtests/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/astral-bidi/w3c-import.log.
  • web-platform-tests/css/css-writing-modes/crashtests/wm-body-propagation-crash.html: Added.
  • web-platform-tests/css/css-writing-modes/direction-propagation-body-contain-root-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/direction-propagation-body-contain-root.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-rtl-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-rtl-001.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-rtl-002-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-rtl-002.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-001.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-002-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-002.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-rtl-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-rtl-001.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-rtl-002-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/dynamic-offset-vrl-rtl-002.html: Added.
  • web-platform-tests/css/css-writing-modes/full-width-001-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/full-width-001-expected.html.
  • web-platform-tests/css/css-writing-modes/full-width-002-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/full-width-002-expected.html.
  • web-platform-tests/css/css-writing-modes/full-width-003-expected-mismatch.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/full-width-003-expected.html.
  • web-platform-tests/css/css-writing-modes/inline-box-orthogonal-child-with-margins-expected.html:
  • web-platform-tests/css/css-writing-modes/inline-box-orthogonal-child-with-margins.html:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-003.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-005.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-007.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-009.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-011.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-013.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-021.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vlr-023.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vrl-002.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vrl-004.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vrl-006.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vrl-008.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vrl-010.xht:
  • web-platform-tests/css/css-writing-modes/line-box-height-vrl-012.xht:
  • web-platform-tests/css/css-writing-modes/logical-physical-mapping-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/logical-physical-mapping-001.html: Added.
  • web-platform-tests/css/css-writing-modes/padding-percent-orthogonal-dynamic-expected.txt: Added.
  • web-platform-tests/css/css-writing-modes/padding-percent-orthogonal-dynamic.html: Added.
  • web-platform-tests/css/css-writing-modes/replaced-content-image-004-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/replaced-content-image-004.html: Added.
  • web-platform-tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-013-expected.xht:
  • web-platform-tests/css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht:
  • web-platform-tests/css/css-writing-modes/slr-alongside-vlr-floats-expected.html:
  • web-platform-tests/css/css-writing-modes/slr-alongside-vlr-floats.html:
  • web-platform-tests/css/css-writing-modes/srl-alongside-vrl-floats-expected.html:
  • web-platform-tests/css/css-writing-modes/srl-alongside-vrl-floats.html:
  • web-platform-tests/css/css-writing-modes/support/WidthTest-Regular.otf: Added.
  • web-platform-tests/css/css-writing-modes/support/tcy.css: Added.

(.tcy):
(.fake-tcy):

  • web-platform-tests/css/css-writing-modes/support/w3c-import.log:
  • web-platform-tests/css/css-writing-modes/support/width-test.css: Added.

(@font-face):
(.test):

  • web-platform-tests/css/css-writing-modes/text-combine-upright-break-inside-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-break-inside-001.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-break-inside-001a-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-break-inside-001a.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-001.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-002-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-002.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-003-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-003.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-004-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-004.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-005-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-005.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-005a-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-005a.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-006-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-006.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-006a-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-006a.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-007-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-combine-upright-compression-007.html: Added.
  • web-platform-tests/css/css-writing-modes/text-orientation-upright-directionality-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-orientation-upright-directionality-001.html: Added.
  • web-platform-tests/css/css-writing-modes/text-shadow-orientation-upright-001-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/text-shadow-orientation-upright-001.html: Added.
  • web-platform-tests/css/css-writing-modes/vlr-text-orientation-sideways-alongside-vlr-floats-expected.html:
  • web-platform-tests/css/css-writing-modes/vlr-text-orientation-sideways-alongside-vlr-floats.html:
  • web-platform-tests/css/css-writing-modes/vrl-inline-paint-invalidation-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/vrl-inline-paint-invalidation.html: Added.
  • web-platform-tests/css/css-writing-modes/vrl-text-orientation-sideways-alongside-vrl-floats-expected.html:
  • web-platform-tests/css/css-writing-modes/vrl-text-orientation-sideways-alongside-vrl-floats.html:
  • web-platform-tests/css/css-writing-modes/w3c-import.log:
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-computed-direction-001-expected.txt: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-computed-direction-001.html: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-computed-direction-002-expected.txt: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-computed-direction-002.html: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-contain-root-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-contain-root.html: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-001.html:
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-002-expected.html:
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-002.html:
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-003-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-body-dynamic-change-003.html: Added.
  • web-platform-tests/css/css-writing-modes/wm-propagation-svg-root-scrollbar.svg:

LayoutTests:

Dec 31, 2021:

10:03 PM Changeset in webkit [287498] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

Reduce repetition in Internals "set page activity state" methods
https://bugs.webkit.org/show_bug.cgi?id=234768

Reviewed by Darin Adler.

setPageVisibility, setPageIsFocusedAndActive, and
setPageIsInWindow all modify page activity state, and repeat a lot
of the same logic to do so. This patch refactors this into a common
updatePageActivityState method.

  • testing/Internals.cpp:

(WebCore::Internals::setPageVisibility):
(WebCore::Internals::setPageIsFocusedAndActive):
(WebCore::Internals::setPageIsInWindow):
Refactor to use the new updatePageActivityState method.
(WebCore::Internals::updatePageActivityState):
Added.

  • testing/Internals.h:
4:22 PM Changeset in webkit [287497] by Wenson Hsieh
  • 4 edits in trunk

Include a few more tag names to search when running modal container detection
https://bugs.webkit.org/show_bug.cgi?id=234652

Reviewed by Darin Adler.

Source/WebCore:

Broaden the list of tag names that we heuristically scan for the search term. This particular modal container
detection failure was due to the search term appearing inside a b element, though I'm adding a few additional
types just to be safe. Since we're checking more than just few tag names, we also take this opportunity to
convert this into a compact AtomString hashtable of tag names that we should scan in the process of detecting
modal containers.

Test: ModalContainerObservation.DetectSearchTermInBoldTag

  • page/ModalContainerObserver.cpp:

(WebCore::matchesSearchTerm):

Tools:

Add an API test that's representative of the website where modal container observation failed (due to the search
term being inside a b element).

  • TestWebKitAPI/Tests/WebKitCocoa/ModalContainerObservation.mm:

(TestWebKitAPI::TEST):

3:33 PM Changeset in webkit [287496] by Wenson Hsieh
  • 20 edits
    1 move in trunk/Source

Refactor some Cocoa-specific code in WebCore::FontAttributes to be platform-agnostic
https://bugs.webkit.org/show_bug.cgi?id=234757

Source/WebCore:

Reviewed by Darin Adler.

Replace the UIFont/NSFont currently in WebCore::FontAttributes with a WebCore::Font instead. This removes a bit
of platform-specific logic in an otherwise platform-agnostic class (with the exception of a couple Cocoa-
specific helper methods). This additionally lets us remove some platform-specific logic for computing font
attributes (i.e. platformFontAttributesAtSelectionStart) below.

  • WebCore.xcodeproj/project.pbxproj:
  • editing/Editor.cpp:

(WebCore::Editor::fontAttributesAtSelectionStart):
(WebCore::Editor::platformFontAttributesAtSelectionStart const): Deleted.

  • editing/Editor.h:
  • editing/FontAttributes.h:

(WebCore::TextList::encode const):
(WebCore::TextList::decode):

Drive-by fix: instead of static_cast-ing to a uint8_t and encoding/decoding the raw value, encode and decode
the ListStyleType as a normal enum instead. This also ensures that we validate the enum value upon decoding.

(WebCore::FontAttributes::encodingRequiresPlatformData const): Deleted.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::platformFontAttributesAtSelectionStart const): Deleted.

  • editing/cocoa/FontAttributesCocoa.mm:

(WebCore::FontAttributes::createDictionary const):

Only grab the NSFont or UIFont from the WebCore::Font object once we're in this Cocoa-specific helper.

  • platform/graphics/cocoa/FontCocoa.h: Added.

Moved here from CocoaFont.h in WebKit. See WebKit/ChangeLog for more details.

  • rendering/style/RenderStyleConstants.h:

Add EnumTraits for ListStyleType, so that it can be encoded/decoded.

Source/WebKit:

See comments below (as well as WebCore/ChangeLog) for more details.

Reviewed by Darin Adler.

  • Platform/cocoa/CocoaFont.h: Removed.

Move this file into WebCore, as FontCocoa.h.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:
  • Shared/Cocoa/CoreTextHelpers.h:
  • Shared/Cocoa/CoreTextHelpers.mm:

Adjust a few places that currently import CocoaFont.h to import WebCore/FontCocoa.h instead. Additonally, change
CocoaFont to WebCore::CocoaFont where necessary.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::FontAttributes>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<WebCore::FontAttributes>::decodePlatformData): Deleted.

Remove platform-specific FontAttributes encoding/decoding logic. This is no longer needed, since we just
propagate a Font instead of an NSFont or UIFont.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<RefPtr<Font>>::encode):
(IPC::ArgumentCoder<RefPtr<Font>>::decode):

Add argument coders for RefPtr<Font> that encode the font only if it's non-null.

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

Remove the calls to encodePlatformData/decodePlatformData, and instead encode the RefPtr<WebCore::Font>.

  • Shared/WebCoreArgumentCoders.h:
  • Shared/playstation/WebCoreArgumentCodersPlayStation.cpp:

(IPC::ArgumentCoder<FontAttributes>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<FontAttributes>::decodePlatformData): Deleted.

  • Shared/soup/WebCoreArgumentCodersSoup.cpp:

(IPC::ArgumentCoder<FontAttributes>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<FontAttributes>::decodePlatformData): Deleted.

  • Shared/win/WebCoreArgumentCodersWin.cpp:

(IPC::ArgumentCoder<FontAttributes>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<FontAttributes>::decodePlatformData): Deleted.

Remove some method stubs that are now unnecessary.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(fontOfSize):

  • WebKit.xcodeproj/project.pbxproj:
12:08 PM Changeset in webkit [287495] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION (r287028): Incorrect root inline box horizontal position when text-align offset is present
https://bugs.webkit.org/show_bug.cgi?id=234767

Reviewed by Antti Koivisto.

Source/WebCore:

Display line has the content's visual left (rtl vs ltr) which should be used to position the root inline box.
We use the same offset when construcing the non-root display boxes.

Test: fast/text/root-inline-box-offset-with-text-align.html

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

(WebCore::Layout::InlineDisplayContentBuilder::build):

LayoutTests:

  • fast/text/root-inline-box-offset-with-text-align-expected.html: Added.
  • fast/text/root-inline-box-offset-with-text-align.html: Added.
11:46 AM Changeset in webkit [287494] by Wenson Hsieh
  • 6 edits in trunk

Updating the file name of attachment-backed images should automatically set the alt attribute
https://bugs.webkit.org/show_bug.cgi?id=234747
rdar://85899879

Reviewed by Darin Adler.

Source/WebCore:

Make a small adjustment when updating attachment attributes for attachment-backed images (i.e. when using
-[_WKAttachmentInfo setFileWrapper:contentType:completion:]), such that the alt attribute of the image is
set to the attachment element's title. While convenient for all internal clients of the _WKAttachment SPI
(i.e. Mail, Notes), this has the added benefit of preserving the attachment's file name when copying and pasting
across different web views (where a new API::Attachment is generated on paste), instead of defaulting to the
last path component of the blob URL corresponding to the image data in the web archive.

Test: WKAttachmentTests.CopyAndPasteImageBetweenWebViews

  • editing/Editor.cpp:

(WebCore::Editor::notifyClientOfAttachmentUpdates):

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::enclosingImageElement const):
(WebCore::HTMLAttachmentElement::updateAttributes):
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
(WebCore::HTMLAttachmentElement::hasEnclosingImage const): Deleted.

Replace hasEnclosingImage() with enclosingImageElement(), a helper that returns the enclosing image element
(or null if there is none). We use the latter in a couple of places above, where we modify some attributes on
the enclosing image in response to attribute and data updates.

  • html/HTMLAttachmentElement.h:

Tools:

Add a new API test to exercise this scenario -- i.e. copying an attachment-backed image in one web view, pasting
it into another web view, and confirming that the pasted attachment preserves the _WKAttachment file name.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(-[TestWKWebView ensureAttachmentForImageElement]):
(TestWebKitAPI::TEST):

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

[LFC][IFC] Take grapheme clusters into account when keeping the first "character" on the line
https://bugs.webkit.org/show_bug.cgi?id=234758

Reviewed by Antti Koivisto.

When dealing with complex fonts, we have to start looking beyond code points and taking
larger cluster of code units into account.

This patch is in preparation for enabling complex font codepath.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

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

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

(WebCore::Layout::TextUtil::firstUserPerceivedCharacterLength): user-perceived character is a unicode term.
see https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries

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

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

  • layout/layouttree/LayoutInlineTextBox.cpp:

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

  • layout/layouttree/LayoutInlineTextBox.h:

(WebCore::Layout::InlineTextBox::canUseSimpleFontCodePath const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

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

  • layout/layouttree/LayoutTreeBuilder.h:
2:11 AM Changeset in webkit [287492] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Unreviewed test gardening, move several fast/scrolling tests failures to GLIB
https://bugs.webkit.org/show_bug.cgi?id=234759

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
1:13 AM Changeset in webkit [287491] by ntim@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: fix assert text in Gradient.js

Unreviewed.

Wrong assert text was added in r287409, it should be radial instead of conic gradients.

  • UserInterface/Models/Gradient.js:

(WI.RadialGradient.prototype.set angleValue):
(WI.RadialGradient.prototype.set angleUnits):

Dec 30, 2021:

8:46 PM Changeset in webkit [287490] by Diego Pino Garcia
  • 3 edits
    4 deletes in trunk/LayoutTests

[GLIB] Unreviewed test gardening, update state of flakey tests
https://bugs.webkit.org/show_bug.cgi?id=234749

Remove tests that have been constantly passing for the last 4000 revisions, as well as update state of tests
that have been constantly failing with a single state.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.https.any.worker-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.any-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.worker-expected.txt: Removed.
  • platform/glib/media/context-menu-actions-expected.txt: Removed.
  • platform/gtk/TestExpectations:
7:20 PM Changeset in webkit [287489] by Jean-Yves Avenard
  • 4 edits in trunk

SharedBuffer::takeData() is still dangerous
https://bugs.webkit.org/show_bug.cgi?id=234724
rdar://problem/86957233

Reviewed by Darin Adler.

Source/WebCore:

Similar to bug 228161; however we only take the content of the DataSegment
if its refcount is 1.
DataSegments can be shared across multiple SharedBuffer and so we can't
assume that when the SharedBuffer refcount is 1 that it is safe to use
the DataSegment.
This use of SharedBuffer::extractData will need to be revisited when
SharedBuffer are used across different threads as the operation isn't
thread-safe.

API tests added.

  • platform/SharedBuffer.cpp:

(WebCore::FragmentedSharedBuffer::takeData):

Tools:

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):

5:32 PM Changeset in webkit [287488] by ntim@apple.com
  • 4 edits in trunk

REGRESSION(r286955): Fix painting text-decorations with combined text
https://bugs.webkit.org/show_bug.cgi?id=234707

Reviewed by Dean Jackson.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-writing-modes/text-combine-upright-decorations-001.html

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::createDecorationPainter):
(WebCore::TextBoxPainter::paintBackgroundDecorations):
(WebCore::TextBoxPainter::paintForegroundDecorations):

LayoutTests:

4:26 PM Changeset in webkit [287487] by ntim@apple.com
  • 39 edits in trunk

Implement text-combine-upright property
https://bugs.webkit.org/show_bug.cgi?id=150821

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-expected.txt:
  • web-platform-tests/css/css-pseudo/parsing/marker-supported-properties-in-animation-expected.txt:
  • web-platform-tests/css/css-writing-modes/inheritance-expected.txt:
  • web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-computed-expected.txt:
  • web-platform-tests/css/css-writing-modes/parsing/text-combine-upright-valid-expected.txt:
  • web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-001-expected.txt:
  • web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-digits-002-expected.txt:
  • web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-001-expected.txt:
  • web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-invalid-002-expected.txt:
  • web-platform-tests/css/css-writing-modes/text-combine-upright-parsing-valid-001-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

webkit.org/b/234694 and webkit.org/b/234707 are landed for this initial version of text-combine-upright.

To reach Chrome parity, layout needs to be tweaked (webkit.org/b/234704), and pseudo elements need to be properly supported (webkit.org/b/234705).

To reach standards parity, it also needs the digits syntax to be implemented (webkit.org/b/234706), which no browser implements yet.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextCombine const):

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

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

  • rendering/LegacyLineLayout.cpp:

(WebCore::expansionBehaviorForInlineTextBox):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

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

(WebCore::Style::isValidMarkerStyleProperty):
Allow setting text-combine-upright on ::marker.

LayoutTests:

  • TestExpectations:
  • fast/css/getComputedStyle/computed-style-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-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/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
2:33 PM Changeset in webkit [287486] by Adrian Perez de Castro
  • 12 edits in trunk/Source

Non-unified build fixes, end-of-year 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=234755

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • runtime/DeferredWorkTimer.h: Add missing JSCast.h header.

Source/WebCore:

No new tests needed.

  • bindings/js/JSExecState.cpp:

(WebCore::executionContext): Add missing namespace prefix in usage of JSC::jsCast() function.

  • bindings/js/SerializedScriptValue.cpp: Add missing JSExecState.h header.
  • inspector/InspectorFrontendHost.cpp: Add missing ScriptController.h header.
  • inspector/WebInjectedScriptManager.cpp: Add missing DOMWindow.h and JSExecState.h headers.
  • inspector/agents/InspectorTimelineAgent.cpp: Add missing JSExecState.h header.
  • inspector/agents/WebConsoleAgent.cpp: Add missing InspectorWebAgentBase.h and

JSExecState.h headers.

  • inspector/agents/WebConsoleAgent.h: Add missing forward declaration of struct

WebAgentContext.

  • layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: Add missing

LayoutBoxGeometry.h header.

  • loader/CrossOriginAccessControl.cpp: Add missing DocumentLoader.h header.
12:32 PM Changeset in webkit [287485] by Alan Bujtas
  • 35 edits in trunk

[IFC][Integration] Enable RTL inline base direction
https://bugs.webkit.org/show_bug.cgi?id=234736

Reviewed by Antti Koivisto.

Source/WebCore:

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

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

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForStyle):

LayoutTests:

  • platform/ios-wk2/fast/text/international/rtl-white-space-pre-wrap-expected.txt:
  • platform/ios/fast/block/basic/016-expected.txt:
  • platform/ios/fast/borders/rtl-border-04-expected.txt:
  • platform/ios/fast/css/text-overflow-ellipsis-bidi-expected.txt:
  • platform/ios/fast/css/text-overflow-input-expected.txt:
  • platform/ios/fast/dom/34176-expected.txt:
  • platform/ios/fast/dom/52776-expected.txt:
  • platform/ios/fast/dom/HTMLElement/bdo-expected.txt:
  • platform/ios/fast/forms/input-text-scroll-left-on-blur-expected.txt:
  • platform/ios/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/ios/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/ios/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/ios/fast/text/international/rtl-white-space-pre-wrap-expected.txt:
  • platform/mac-bigsur/fast/dom/52776-expected.txt:
  • platform/mac-bigsur/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/mac-catalina/fast/css/text-overflow-input-expected.txt:
  • platform/mac/fast/block/basic/016-expected.txt:
  • platform/mac/fast/borders/rtl-border-05-expected.txt:
  • platform/mac/fast/css/text-overflow-ellipsis-bidi-expected.txt:
  • platform/mac/fast/css/text-overflow-input-expected.txt:
  • platform/mac/fast/dom/34176-expected.txt:
  • platform/mac/fast/dom/52776-expected.txt:
  • platform/mac/fast/dom/HTMLElement/bdo-expected.txt:
  • platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt:
  • platform/mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
  • platform/mac/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/mac/fast/text/international/bidi-override-expected.txt:
  • platform/mac/fast/text/international/rtl-white-space-pre-wrap-expected.txt:
  • platform/mac/fast/text/text-letter-spacing-expected.txt:
6:32 AM Changeset in webkit [287484] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Non-empty inline boxes construction should be driven by their content
https://bugs.webkit.org/show_bug.cgi?id=234744

Reviewed by Antti Koivisto.

At bidi paragraph processing, we assign bidi levels to inline items. Normally only content type
of inline items need bidi levels as inline box start(end) visual order is driven by their content.
However there are 2 cases when inline box start require bidi level

  • empty inline boxes (1<span></span>2) -so that we can find out their position.
  • inline boxes with unicode-bidi style -they change their content's bidi behavior.

In this patch we ignore the second type of inline boxes at display box construction
as they may trigger redundant inline boxes on the line (as we create them for their content).

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

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

Dec 29, 2021:

5:29 PM Changeset in webkit [287483] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Add support for -webkit-rtl-ordering
https://bugs.webkit.org/show_bug.cgi?id=234715

Reviewed by Antti Koivisto.

"-webkit-rtl-ordering: visual" introduces EUnicodeBidi::Override on the block level
(apparently it has no effect on inline boxes).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::handleEnterExitBidiContext):
(WebCore::Layout::buildBidiParagraph):

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForStyle):

  • layout/integration/LayoutIntegrationCoverage.h:
1:07 PM Changeset in webkit [287482] by Alan Bujtas
  • 8 edits
    2 adds in trunk

[LFC][IFC] Collapsed trailing whitespace may introduce stray inline box
https://bugs.webkit.org/show_bug.cgi?id=234735

Reviewed by Antti Koivisto.

Source/WebCore:

See the comment in LineBuilder::handleInlineContent.

Test: fast/inline/inline-box-with-collapsed-whitespace.html

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

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

LayoutTests:

  • fast/inline/inline-box-with-collapsed-whitespace-expected.html: Added.
  • fast/inline/inline-box-with-collapsed-whitespace.html: Added.
12:20 PM Changeset in webkit [287481] by weinig@apple.com
  • 11 edits in trunk/Source

Add additional named color spaces for extended rgb color types and HSL/HWB in preparation for out of gamut and missing component support
https://bugs.webkit.org/show_bug.cgi?id=234741

Reviewed by Dean Jackson.

Source/WebCore:

Adds named color space support, which provides the ability for a color type to live
in a Color, for the following color spaces:

ExtendedA98RGB
ExtendedDisplayP3
ExtendedLinearSRGB
ExtendedProPhotoRGB
ExtendedRec2020
ExtendedSRGB
HSL
HWB

This is going to be needed to add support for out of gamut color() function support
and support for the new missing component syntax.

The extended variants serialize identically to their bounded counterparts, HSL/HWB
serialize as they do today, by converting to 8-bit sRGB and serializing as it.

  • platform/graphics/ColorConversion.cpp:

(WebCore::convertColorComponents):

  • platform/graphics/ColorSerialization.cpp:

(WebCore::serialization):
(WebCore::serializationForRenderTreeAsText):
(WebCore::serializationForCSS):
(WebCore::serializationForHTML):

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):

  • platform/graphics/ColorSpace.h:

(WebCore::callWithColorType):

  • platform/graphics/ColorTypes.h:
  • platform/graphics/ColorUtilities.h:
  • platform/graphics/cg/ColorSpaceCG.cpp:

(WebCore::extendedNamedColorSpace):
(WebCore::extendedAdobeRGB1998ColorSpaceRef):
(WebCore::extendedDisplayP3ColorSpaceRef):
(WebCore::extendedITUR_2020ColorSpaceRef):
(WebCore::extendedLinearSRGBColorSpaceRef):
(WebCore::extendedROMMRGBColorSpaceRef):
(WebCore::colorSpaceForCGColorSpace):
(WebCore::labColorSpaceRef): Deleted.

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedNullableCGColorSpace):

Source/WTF:

  • wtf/PlatformHave.h:

Add new HAVE macros for additional CoreGraphics named color spaces and the CGColorSpaceCreateExtended function.

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

Unreviewed, reverting r287478.
https://bugs.webkit.org/show_bug.cgi?id=234742

causes debug failures

Reverted changeset:

"[LFC][IFC] Collapsed trailing whitespace may introduce stray
inline box"
https://bugs.webkit.org/show_bug.cgi?id=234735
https://commits.webkit.org/r287478

8:35 AM Changeset in webkit [287479] by Antti Koivisto
  • 8 edits in trunk/Source/WebCore

Make MatchElement in RuleFeature non-optional
https://bugs.webkit.org/show_bug.cgi?id=234738

Reviewed by Sam Weinig.

Split no-MatchElement case into a separate RuleAndSelector struct.

Also make MediaQueryCollector collect whole StyleRules instead of using RuleFeature/RuleAndSelector for simplicity
and better logic. Media queries always affect all of a StyleRule, not some invidiual selectors.

  • style/RuleFeature.cpp:

(WebCore::Style::RuleAndSelector::RuleAndSelector):
(WebCore::Style::RuleFeature::RuleFeature):

  • style/RuleFeature.h:

(WebCore::Style::RuleFeatureWithInvalidationSelector::RuleFeatureWithInvalidationSelector):

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::evaluateDynamicMediaQueryRules):

Use RuleSetBuilder to build the media query invalidation ruleset. It also does shrink-to-fit for us.

  • style/RuleSet.h:

(WebCore::Style::RuleSet::DynamicMediaQueryRules::shrinkToFit):

  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::MediaQueryCollector::pop):
(WebCore::Style::RuleSetBuilder::MediaQueryCollector::addRuleIfNeeded):

  • style/RuleSetBuilder.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::makeRuleSet):
(WebCore::Style::ensureInvalidationRuleSets):

8:33 AM Changeset in webkit [287478] by Alan Bujtas
  • 8 edits
    2 adds in trunk

[LFC][IFC] Collapsed trailing whitespace may introduce stray inline box
https://bugs.webkit.org/show_bug.cgi?id=234735

Reviewed by Antti Koivisto.

Source/WebCore:

See the comment in LineBuilder::handleInlineContent.

Test: fast/inline/inline-box-with-collapsed-whitespace.html

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

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

LayoutTests:

  • fast/inline/inline-box-with-collapsed-whitespace-expected.html: Added.
  • fast/inline/inline-box-with-collapsed-whitespace.html: Added.
Note: See TracTimeline for information about the timeline view.