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

Timeline



May 18, 2021:

10:21 PM Changeset in webkit [277716] by Ross Kirsling
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Prune CommonSlowPaths of JITPropertyAccess functions
https://bugs.webkit.org/show_bug.cgi?id=225953

Reviewed by Mark Lam.

A few bytecode operations with slow paths in JITPropertyAccess appear to have either redundant or unnecessary
"common" slow paths; namely, get_private_name and del_by_val already have LLInt slow paths, while in_by_id
and get_by_id_with_this can have their "common" slow path moved to be LLInt-specific.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:
  • runtime/CommonSlowPaths.h:
9:21 PM Changeset in webkit [277715] by Cameron McCormack
  • 12 edits in trunk

Record gradient and pattern filled canvas text in the correct coordinate system.
https://bugs.webkit.org/show_bug.cgi?id=222881
<rdar://75155310>

Reviewed by Myles C. Maxfield.

Source/WebCore:

When we draw canvas text with a gradient or pattern, we use
GraphicsContext::clipToDrawingCommands to set up a mask, which
we then draw a filled rectangle with. When GPUP canvas rendering is
enabled, Recorder::clipToDrawingCommands needs to ensure that the
commands that draw the text are recorded in a coordinate system that
matches the one that will be used to draw into the mask ImageBuffer
during replaying. (And for complete correctness, an otherwise fresh
GraphicsContext must be used for recording the text drawing commands,
since it's possible other GraphicsContext state could be
introspected.)

So we handle this by setting up a nested display list recorder,
targeting the same DisplayList but with a fresh GraphicsContext with
the right initial CTM, to record the nested drawing commands into.

The refactoring in https://trac.webkit.org/changeset/273291/webkit
dropped some code that set up the CTM for the nested drawing commands,
which is restored here.

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

  • platform/graphics/displaylists/DisplayListDrawGlyphsRecorder.h:

(WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphsDeconstruction const):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::Recorder):
(WebCore::DisplayList::Recorder::~Recorder):
(WebCore::DisplayList::Recorder::clipToDrawingCommands):

  • platform/graphics/displaylists/DisplayListRecorder.h:

LayoutTests:

Re-enable GPUP canvas rendering in the affected tests.

  • http/tests/canvas/color-fonts/fill-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-4.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-4.html:
8:24 PM Changeset in webkit [277714] by rmorisset@apple.com
  • 13 edits
    1 copy
    1 move
    3 adds
    1 delete in trunk

Make AirAllocateRegistersByGraphColoring use less memory
https://bugs.webkit.org/show_bug.cgi?id=225848

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We've had some jetsam problems caused by the main Air register allocator, which caused us to lower Options::maximumTmpsForGraphColoring.
Hence this patch tries to improve the memory usage of the allocator. It includes several changes:

  • Change the datastructure used for representing the interference graph. Before it was effectively a HashSet<std::pair<uint16_t, uint16_t>. Now, it is either a Bitvector (for n < 400 for now, can be tweaked easily), or a Vector<LikelyDenseUnsignedIntegerSet<uint16_t>> otherwise.

LikelyDenseUnsignedIntegerSet is a new datastructure introduced by this patch, it is either a HashSet if very sparse, or a BitVector + an amount to shift it by.
This is by far the largest memory reduction in this patch, it reduces the maximum memory used for an interference graph in tsf-wasm in JetStream2 from 16MB to 700kB, and in mruby-wasm.aotoki.dev from 262MB to 20MB (the later only happen when we increase Options::maximumTmpsForGraphColoring.. this is the exact function which caused us to lower it).
Its effect on smaller functions in JetStream2 is rarely as dramatic but always an improvement, and improvements between 2x and 5x are extremely common (10x to 30x are significantly rarer but do occur).

  • In order to easily test this change and any further change to this datastructure, the old approach was preserved as InterferenceHashSet, and a template to run two such datastructures in parallel, checking their equivalence was added: InstrumentedInterferenceGraph. Running with it and reportInterferenceGraphMemoryUse set to true was used to compute the numbers given above.
  • There was already some template parameter to change the size of the tmp indices from unsigned to uint16_t but the code failed to compile unless it was unsigned. I fixed this, made more consistent use of it, and switched to uint16_t in the very common case that we have less than 65k Tmps (we can have more despite the option because of spilling). This halved the memory usage of various other datastructures in the register allocator
  • unspillableTmps was a HashSet<unsigned>. Since it is often quite dense (often around 20% on JetStream2), I replaced it by a Bitvector instead
  • m_biases was a HashMap<IndexType, HashSet<IndexType>>. Since it is extremely rare that the sets have more than 8 elements (from looking at some instrumented run of JetStream2), I replaced it by HashMap<IndexType, SmallSet<IndexType>>. This not only significantly reduces memory, but nearly halves the time spent in assignColors(around 80ms -> 40ms in JetStream 2)
  • UseCounts was needlessly general: it is only used by the register allocator (all other references to UseCounts refer to the completely different B3::UseCounts), so there is no point in it computing, and then storing lots of irrelevant data. A float is also more than enough precision (especially since it is pretty much always 1, 10, 100, or 1000 in practice…). Also, since we only need it indexed by Tmps, we can use a Vector with AbsoluteTmpMapper instead of its HashMap. These changes are not just memory savings, they also make selectSpill way faster (570ms -> 250ms on my machine on JetStream2)
  • While I was at it, I did a couple of other tweaks to the logic of selectSpill. In particular, instead of having to check for isFastTmp every time, I just put the fast tmps directly in unspillableTmps, which prevents them from getting added to m_spillWorklist in the first place. This + a bit of clean-up (for example putting an early exit instead of setting score to infinity in the case of dead tmps) resulted in a further perf win (to roughly 200ms spent in selectSpill() on JetStream2)

All together, this patch reduces the time spent in the register allocator by roughly 15 to 20% in JetStream2 (tested both with the Briggs and the IRC allocators on my MBP 2019).

I do not yet have precise performance numbers for this exact patch, but benchmarking a previous version of it (with a less optimized interference graph) resulted in significant RAMification improvements (around 1%), and more surprisingly some JetStream2 improvements on weaker machines (e.g. an iPhone 7 gained > 1%). I believe these gains come either from less trashing of the caches, or less contention caused by the memory traffic.
I will try to update the bugzilla with more up-to-date thorough results when I get them.

This patch does not increase Options::maximumTmpsForGraphColoring, I intend to do that in a separate patch to make it easier to revert in case of a problem.

  • b3/B3ReduceLoopStrength.cpp:

(JSC::B3::ReduceLoopStrength::reduceByteCopyLoopsToMemcpy):

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

(JSC::B3::Air::allocateRegistersByGraphColoring):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::forEachFastTmp const):

  • b3/air/AirUseCounts.h:

(JSC::B3::Air::UseCounts::UseCounts):
(JSC::B3::Air::UseCounts::isConstDef const):
(JSC::B3::Air::UseCounts::numWarmUsesAndDefs const):
(JSC::B3::Air::UseCounts::dump const):

  • parser/Nodes.h:

Source/WTF:

Two changes: the addition of LikelyDenseUnsignedIntegerSet, and various improvements to Small(Ptr)Set.

The latter include:

  • Renaming SmallPtrSet into SmallSet, as it now supports integers as well as pointers.
  • Reducing its size by sharing the same storage for m_buffer and for m_smallStorage.

This is safe to do, because all operations branch on isSmall() which depends purely on m_capacity.

  • Adding trivial size(), isEmpty() and memoryUse() methods
  • Adding a comment at the top of the file explaining when to use, and (more importantly) not to use SmallSet.

LikelyDenseUnsignedIntegerSet is an even more specialized data structure, that can represent sets of unsigned integers very compactly if they are clustered.

Finally I added an outOfLineMemoryUse() method to BitVector, making it more convenient to compare the memory consumption of different data structures in the register allocator.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/BitVector.h:
  • wtf/CMakeLists.txt:
  • wtf/LikelyDenseUnsignedIntegerSet.cpp: Copied from Source/WTF/wtf/SmallPtrSet.cpp.
  • wtf/LikelyDenseUnsignedIntegerSet.h: Added.

(WTF::LikelyDenseUnsignedIntegerSet::LikelyDenseUnsignedIntegerSet):
(WTF::LikelyDenseUnsignedIntegerSet::~LikelyDenseUnsignedIntegerSet):
(WTF::LikelyDenseUnsignedIntegerSet::contains const):
(WTF::LikelyDenseUnsignedIntegerSet::add):
(WTF::LikelyDenseUnsignedIntegerSet::size const):
(WTF::LikelyDenseUnsignedIntegerSet::iterator::iterator):
(WTF::LikelyDenseUnsignedIntegerSet::iterator::m_shift):
(WTF::LikelyDenseUnsignedIntegerSet::iterator::operator++):
(WTF::LikelyDenseUnsignedIntegerSet::iterator::operator* const):
(WTF::LikelyDenseUnsignedIntegerSet::iterator::operator== const):
(WTF::LikelyDenseUnsignedIntegerSet::iterator::operator!= const):
(WTF::LikelyDenseUnsignedIntegerSet::begin const):
(WTF::LikelyDenseUnsignedIntegerSet::end const):
(WTF::LikelyDenseUnsignedIntegerSet::memoryUse const):
(WTF::LikelyDenseUnsignedIntegerSet::validate const):
(WTF::LikelyDenseUnsignedIntegerSet::isBitVector const):
(WTF::LikelyDenseUnsignedIntegerSet::isValidValue const):
(WTF::LikelyDenseUnsignedIntegerSet::transitionToHashSet):
(WTF::LikelyDenseUnsignedIntegerSet::transitionToBitVector):

  • wtf/SmallPtrSet.h: Removed.
  • wtf/SmallSet.cpp: Renamed from Source/WTF/wtf/SmallPtrSet.cpp.
  • wtf/SmallSet.h: Added.

Tools:

Simply added some tests for SmallSet.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/SmallSet.cpp: Added.

(TestWebKitAPI::testSmallSetOfUnsigned):
(TestWebKitAPI::testSmallSetOfPointers):
(TestWebKitAPI::testVectorsOfSmallSetsOfUnsigned):
(TestWebKitAPI::TEST):

8:10 PM Changeset in webkit [277713] by timothy_horton@apple.com
  • 3 edits in trunk

allowsContentJavaScript API not applied from defaultWebpagePreferences
https://bugs.webkit.org/show_bug.cgi?id=225957

Reviewed by Wenson Hsieh.

New API test: WebKit.AllowsContentJavaScriptFromDefaultPreferences

  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):
allowsContentJavaScript works fine on the per-navigation-level WKWebpagePreferences,
but is ignored if applied on the WKWebViewConfiguration's defaultWebpagePreferences,
because it is not copied in copy(). Copy it!

8:03 PM Changeset in webkit [277712] by Kocsen Chung
  • 1 copy in tags/Safari-612.1.15.1.2

Tag Safari-612.1.15.1.2.

7:59 PM Changeset in webkit [277711] by Kocsen Chung
  • 8 edits in branches/safari-612.1.15.1-branch/Source

Versioning.

WebKit-7612.1.15.1.2

6:57 PM Changeset in webkit [277710] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r277683): WebContent process crashing in unit tests
https://bugs.webkit.org/show_bug.cgi?id=225955
rdar://78184041

Unreviewed partial revert.

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

(WebKit::XPCServiceInitializer):
Revert the CRASH() part of r277683 because it is causing mysterious unit testing failures.

6:51 PM Changeset in webkit [277709] by Chris Dumez
  • 15 edits in trunk/Source

Use WTF::Locker for locking BaseAudioContext's graph lock
https://bugs.webkit.org/show_bug.cgi?id=225935

Reviewed by Sam Weinig.

Source/WebCore:

Use WTF::Locker for locking BaseAudioContext's graph lock instead of our own AutoLocker.
Also use WTF::RecursiveLock instead of duplicating the recursive locking logic inside
BaseAudioContext. This means we no longer need lock() / tryLock() / unlock() functions
on BaseAudioContext. We now expose the BaseAudioContext's RecursiveLock via a graphLock()
getter and the caller sites can just use a Locker.

  • Modules/webaudio/AudioBufferSourceNode.cpp:

(WebCore::AudioBufferSourceNode::setBuffer):

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::connect):
(WebCore::AudioNode::disconnect):
(WebCore::AudioNode::setChannelCount):
(WebCore::AudioNode::setChannelCountMode):
(WebCore::AudioNode::setChannelInterpretation):
(WebCore::AudioNode::enableOutputsIfNecessary):
(WebCore::AudioNode::decrementConnectionCount):
(WebCore::AudioNode::deref):

  • Modules/webaudio/AudioWorkletNode.cpp:

(WebCore::AudioWorkletNode::create):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::uninitialize):
(WebCore::BaseAudioContext::refSourceNode):
(WebCore::BaseAudioContext::addDeferredDecrementConnectionCount):
(WebCore::BaseAudioContext::handlePreRenderTasks):
(WebCore::BaseAudioContext::outputPosition):
(WebCore::BaseAudioContext::handlePostRenderTasks):
(WebCore::BaseAudioContext::deleteMarkedNodes):
(WebCore::BaseAudioContext::removeMarkedSummingJunction):
(WebCore::BaseAudioContext::handleDirtyAudioSummingJunctions):
(WebCore::BaseAudioContext::handleDirtyAudioNodeOutputs):

  • Modules/webaudio/BaseAudioContext.h:

(WebCore::BaseAudioContext::graphLock):
(WebCore::BaseAudioContext::isGraphOwner const):

  • Modules/webaudio/ChannelMergerNode.cpp:

(WebCore::ChannelMergerNode::ChannelMergerNode):

  • Modules/webaudio/ConvolverNode.cpp:

(WebCore::ConvolverNode::setBuffer):

  • Modules/webaudio/MediaElementAudioSourceNode.cpp:

(WebCore::MediaElementAudioSourceNode::setFormat):

  • Modules/webaudio/MediaStreamAudioSourceNode.cpp:

(WebCore::MediaStreamAudioSourceNode::setFormat):

  • Modules/webaudio/OfflineAudioContext.cpp:

(WebCore::OfflineAudioContext::suspendRendering):
(WebCore::OfflineAudioContext::shouldSuspend):
(WebCore::OfflineAudioContext::didSuspendRendering):

  • Modules/webaudio/OfflineAudioContext.h:
  • Modules/webaudio/WaveShaperNode.cpp:

(WebCore::WaveShaperNode::setOversample):

Source/WTF:

  • wtf/RecursiveLockAdapter.h:

(WTF::RecursiveLockAdapter::isOwner const):
Add isOwner() function that returns true if the current thread is holding the lock.
This is needed for WebAudio purposes.

6:47 PM Changeset in webkit [277708] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, reverting r277675.
https://bugs.webkit.org/show_bug.cgi?id=225954

Broke Mac API tests trying to fix iOS

Reverted changeset:

"[webkitpy] Forward booted simulators to children processes"
https://bugs.webkit.org/show_bug.cgi?id=225933
https://trac.webkit.org/changeset/277675

6:24 PM Changeset in webkit [277707] by Alan Coon
  • 1 copy in tags/Safari-612.1.15.1.1

Tag Safari-612.1.15.1.1.

6:07 PM Changeset in webkit [277706] by Alan Coon
  • 1 copy in tags/Safari-612.1.15.0.1

Tag Safari-612.1.15.0.1.

5:49 PM Changeset in webkit [277705] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.15.2.1

Tag Safari-612.1.15.2.1.

5:46 PM Changeset in webkit [277704] by Ruben Turcios
  • 8 edits in branches/safari-612.1.15.2-branch/Source

Versioning.

WebKit-7612.1.15.2.1

5:42 PM Changeset in webkit [277703] by Alan Coon
  • 1 copy in tags/Safari-612.1.15.3.1

Tag Safari-612.1.15.3.1.

5:41 PM Changeset in webkit [277702] by Ruben Turcios
  • 5 edits
    2 adds in branches/safari-612.1.15.2-branch

Cherry-pick r277452. rdar://problem/78181636

REGRESSION (r276945): [iOS] Focus rings are too large
https://bugs.webkit.org/show_bug.cgi?id=225778
<rdar://problem/77858341>

Reviewed by Tim Horton.

Source/WebCore:

r276945 updated scaling logic to ensure that the scale of the base CTM
matches the device scale factor. The change itself makes our base CTM
more correct, but exposed a longstanding bug with our focus ring
implementation.

Focus rings are drawn using CoreGraphics, using CGFocusRingStyle. On
macOS, the style is initialized using NSInitializeCGFocusRingStyleForTime.
However, on iOS, we initialize the style ourselves, using UIKit constants.
Currently, the focus ring's style's radius is set to
+[UIFocusRingStyle cornerRadius], a constant of 8. This is the longstanding
issue. CGFocusRingStyle's radius is not a corner radius, but is the
width of the focus ring. In UIKit, this width is represented by
+[UIFocusRingStyle borderThickness], a constant of 3. WebKit has always
intended to match this width, as evidenced by the default outline-width
of 3px in the UA style sheet.

Considering the large disparity between the existing and expected radius
value, it may be surprising that this mistake has gone unnoticed since
2019, when focus rings were first introduced on iOS. This is where r276945
comes into play. Prior to r276945, the scale of the base CTM did not match
the device scale factor. This meant that CG scaled down the constant of 8
to 4 CSS pixels (1 (base CTM) / 2 (device scale factor)). After r276945,
the two scales are equal and the focus ring is drawn as 8 CSS pixels, much
larger than the expected 3px.

Test: fast/forms/ios/focus-ring-size.html

  • platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::drawFocusRingAtTime):

To fix, use the correct SPI to get the focus ring width,
+[UIFocusRingStyle borderThickness]. This ensures that focus rings have
the right width, following r276945.

The change also fixes focus ring repaint issues that arose from the
fact that the outline-width was 3px, but the painted width was 4px.

Source/WebCore/PAL:

  • pal/spi/ios/UIKitSPI.h:

LayoutTests:

Added a regression test to verify the size of the focus ring on iOS.
The test works by drawing an overlay on top of an input element, that
is just large enough to obscure the focus ring. If the focus ring is
too large, the ring will not obscured, leading to a mismatch failure.

  • fast/forms/ios/focus-ring-size-expected.html: Added.
  • fast/forms/ios/focus-ring-size.html: Added.

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

5:40 PM Changeset in webkit [277701] by Alan Coon
  • 5 edits
    2 adds in branches/safari-612.1.15.3-branch

Cherry-pick r277452. rdar://problem/78181647

REGRESSION (r276945): [iOS] Focus rings are too large
https://bugs.webkit.org/show_bug.cgi?id=225778
<rdar://problem/77858341>

Reviewed by Tim Horton.

Source/WebCore:

r276945 updated scaling logic to ensure that the scale of the base CTM
matches the device scale factor. The change itself makes our base CTM
more correct, but exposed a longstanding bug with our focus ring
implementation.

Focus rings are drawn using CoreGraphics, using CGFocusRingStyle. On
macOS, the style is initialized using NSInitializeCGFocusRingStyleForTime.
However, on iOS, we initialize the style ourselves, using UIKit constants.
Currently, the focus ring's style's radius is set to
+[UIFocusRingStyle cornerRadius], a constant of 8. This is the longstanding
issue. CGFocusRingStyle's radius is not a corner radius, but is the
width of the focus ring. In UIKit, this width is represented by
+[UIFocusRingStyle borderThickness], a constant of 3. WebKit has always
intended to match this width, as evidenced by the default outline-width
of 3px in the UA style sheet.

Considering the large disparity between the existing and expected radius
value, it may be surprising that this mistake has gone unnoticed since
2019, when focus rings were first introduced on iOS. This is where r276945
comes into play. Prior to r276945, the scale of the base CTM did not match
the device scale factor. This meant that CG scaled down the constant of 8
to 4 CSS pixels (1 (base CTM) / 2 (device scale factor)). After r276945,
the two scales are equal and the focus ring is drawn as 8 CSS pixels, much
larger than the expected 3px.

Test: fast/forms/ios/focus-ring-size.html

  • platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::drawFocusRingAtTime):

To fix, use the correct SPI to get the focus ring width,
+[UIFocusRingStyle borderThickness]. This ensures that focus rings have
the right width, following r276945.

The change also fixes focus ring repaint issues that arose from the
fact that the outline-width was 3px, but the painted width was 4px.

Source/WebCore/PAL:

  • pal/spi/ios/UIKitSPI.h:

LayoutTests:

Added a regression test to verify the size of the focus ring on iOS.
The test works by drawing an overlay on top of an input element, that
is just large enough to obscure the focus ring. If the focus ring is
too large, the ring will not obscured, leading to a mismatch failure.

  • fast/forms/ios/focus-ring-size-expected.html: Added.
  • fast/forms/ios/focus-ring-size.html: Added.

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

5:33 PM Changeset in webkit [277700] by Alan Coon
  • 8 edits in branches/safari-612.1.15.3-branch/Source

Versioning.

WebKit-7612.1.15.3.1

5:31 PM Changeset in webkit [277699] by Diego Pino Garcia
  • 4 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update two baselines of inspector test that were failing.

  • platform/gtk/TestExpectations:
  • platform/gtk/http/tests/inspector/network/resource-sizes-network-expected.txt:
  • platform/gtk/inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
5:26 PM Changeset in webkit [277698] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

The containing block for a fixed renderer has to be a type of RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=225924
<rdar://77968716>

Reviewed by Simon Fraser.

While an atomic inline level box with layout containment can certainly be the containing block for fixed (and absolute) boxes,
the current render tree logic requires a containing block to be the type of RenderBlock.

  • rendering/RenderElement.cpp:

(WebCore::nearestNonAnonymousContainingBlockIncludingSelf): make this function static so that we can call it from containingBlockForFixedPosition()
(WebCore::RenderElement::containingBlockForFixedPosition const):
(WebCore::RenderElement::containingBlockForAbsolutePosition const):

4:55 PM Changeset in webkit [277697] by Ruben Turcios
  • 5 edits
    2 adds in branches/safari-612.1.15.1-branch

Cherry-pick r277452. rdar://problem/78179698

REGRESSION (r276945): [iOS] Focus rings are too large
https://bugs.webkit.org/show_bug.cgi?id=225778
<rdar://problem/77858341>

Reviewed by Tim Horton.

Source/WebCore:

r276945 updated scaling logic to ensure that the scale of the base CTM
matches the device scale factor. The change itself makes our base CTM
more correct, but exposed a longstanding bug with our focus ring
implementation.

Focus rings are drawn using CoreGraphics, using CGFocusRingStyle. On
macOS, the style is initialized using NSInitializeCGFocusRingStyleForTime.
However, on iOS, we initialize the style ourselves, using UIKit constants.
Currently, the focus ring's style's radius is set to
+[UIFocusRingStyle cornerRadius], a constant of 8. This is the longstanding
issue. CGFocusRingStyle's radius is not a corner radius, but is the
width of the focus ring. In UIKit, this width is represented by
+[UIFocusRingStyle borderThickness], a constant of 3. WebKit has always
intended to match this width, as evidenced by the default outline-width
of 3px in the UA style sheet.

Considering the large disparity between the existing and expected radius
value, it may be surprising that this mistake has gone unnoticed since
2019, when focus rings were first introduced on iOS. This is where r276945
comes into play. Prior to r276945, the scale of the base CTM did not match
the device scale factor. This meant that CG scaled down the constant of 8
to 4 CSS pixels (1 (base CTM) / 2 (device scale factor)). After r276945,
the two scales are equal and the focus ring is drawn as 8 CSS pixels, much
larger than the expected 3px.

Test: fast/forms/ios/focus-ring-size.html

  • platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::drawFocusRingAtTime):

To fix, use the correct SPI to get the focus ring width,
+[UIFocusRingStyle borderThickness]. This ensures that focus rings have
the right width, following r276945.

The change also fixes focus ring repaint issues that arose from the
fact that the outline-width was 3px, but the painted width was 4px.

Source/WebCore/PAL:

  • pal/spi/ios/UIKitSPI.h:

LayoutTests:

Added a regression test to verify the size of the focus ring on iOS.
The test works by drawing an overlay on top of an input element, that
is just large enough to obscure the focus ring. If the focus ring is
too large, the ring will not obscured, leading to a mismatch failure.

  • fast/forms/ios/focus-ring-size-expected.html: Added.
  • fast/forms/ios/focus-ring-size.html: Added.

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

4:55 PM Changeset in webkit [277696] by Ruben Turcios
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Revert "Cherry-pick r277459. rdar://problem/78110796"

This reverts commit r277597.

4:55 PM Changeset in webkit [277695] by Ruben Turcios
  • 29 edits
    1 add
    1 delete in branches/safari-612.1.15.1-branch

Revert "Cherry-pick r277505. rdar://problem/78110796"

This reverts commit r277598.

4:55 PM Changeset in webkit [277694] by Ruben Turcios
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Revert "Cherry-pick r277594. rdar://problem/78130222"

This reverts commit r277621

4:55 PM Changeset in webkit [277693] by Ruben Turcios
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Revert "Cherry-pick r277603. rdar://problem/78130222"

This reverts commit r277623

4:55 PM Changeset in webkit [277692] by Simon Fraser
  • 10 edits in trunk/Source/WebCore

Layer names should not contain object addresses in release builds
https://bugs.webkit.org/show_bug.cgi?id=225926

Reviewed by Geoffrey Garen.

Avoid putting object addresses in layer name strings (which end up on CALayers)
to reduce string bloat.

RenderLayer::name() now calls a description() function on RenderObject, which
in turn calls the same on its Node. These description() functions don't put
object addresses in the string.

Alternatives considered: #ifdeffing in the debugDescription() implementations:
I decided not to because calling a function called debugFoo in release seems
wrong. It might also be useful to dump the string with addresses when debugging
in a release build.

Renaming debugDescription() to description() and passing a behavior enum:
Seems about as complicated as this change.

  • dom/Element.cpp:

(WebCore::appendAttributes):
(WebCore::Element::description const):
(WebCore::Element::debugDescription const):

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::description const):

  • dom/Node.h:
  • dom/Text.cpp:

(WebCore::appendTextRepresentation):
(WebCore::Text::description const):
(WebCore::Text::debugDescription const):

  • dom/Text.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::name const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::description const):

  • rendering/RenderObject.h:
4:34 PM Changeset in webkit [277691] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Disable WebSQL in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=224144

Unreviewed test gardening.

Disabling consant failing test for wk1. Test has already been disabled for wk2.

  • platform/mac-wk1/TestExpectations:
4:28 PM Changeset in webkit [277690] by Alan Coon
  • 17 edits in branches/safari-612.1.12-branch

Cherry-pick r277124. rdar://problem/78177934

Sampled Page Top Color: make hit tests consider elements with pointer-events: none
https://bugs.webkit.org/show_bug.cgi?id=225419

Reviewed by Tim Horton.

Source/WebCore:

Test: SampledPageTopColor.HitTestCSSPointerEventsNone

  • rendering/HitTestRequest.h: (WebCore::HitTestRequest::ignoreCSSPointerEventsProperty const): Added.
  • rendering/InlineBox.h: (WebCore::InlineBox::visibleToHitTesting const):
  • rendering/RenderElement.h: (WebCore::RenderElement::visibleToHitTesting const): Add RequestType::IgnoreCSSPointerEventsProperty that's used inside visibleToHitTesting to control whether style().pointerEvents() == PointerEvents::None is checked.
  • dom/Document.cpp: (WebCore::isValidPageSampleLocation): Include the new RequestType::IgnoreCSSPointerEventsProperty since we're not hit testing for interaction, rather we're hit testing in an attempt to see what will be painted.
  • rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint):
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint):
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint):
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint):
  • rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint):
  • rendering/RenderInline.cpp: (WebCore::RenderInline::hitTestCulledInline):
  • rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint):
  • rendering/RenderWidget.cpp: (WebCore::RenderWidget::nodeAtPoint):
  • rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint):
  • rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): Pass the HitTestRequest to visibleToHitTesting.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.HitTestCSSPointerEventsNone): Added.

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

4:28 PM Changeset in webkit [277689] by Alan Coon
  • 4 edits in branches/safari-612.1.12-branch

Cherry-pick r277123. rdar://problem/78177928

Sampled Page Top Color: don't snapshot if the hit test location is a canvas
https://bugs.webkit.org/show_bug.cgi?id=225418

Reviewed by Tim Horton.

Source/WebCore:

Tests: SampledPageTopColor.HitTestHTMLCanvasWithoutRenderingContext

SampledPageTopColor.HitTestHTMLCanvasWithRenderingContext

  • dom/Document.cpp: (WebCore::isValidPageSampleLocation):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.HitTestHTMLCanvasWithoutRenderingContext): Added. (TEST.SampledPageTopColor.HitTestHTMLCanvasWithRenderingContext): Added.

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

4:15 PM Changeset in webkit [277688] by Aditya Keerthi
  • 18 edits
    1 add in trunk

[macOS] Titlebar separator doesn't show when WKWebView is scrolled
https://bugs.webkit.org/show_bug.cgi?id=220633
<rdar://problem/71094055>

Reviewed by Darin Adler.

Source/WebKit:

Starting in Big Sur, NSWindows with a titlebar display a separator if
there is a scrolled NSScrollView adjacent to the titlebar. Since
WKWebViews are scrollable views, but not backed by NSScrollView, we
need to adopt SPI to support this functionality.

This patch updates WKWebView to conform to the NSScrollViewSeparatorTrackingAdapter
protocol, ensuring the titlebar separator is displayed when
necessary. Note that since WKWebViews are not actually NSScrollView's we
don't already have the scroll position of the view in the UIProcess. To
determine whether or not the view is scrolled, this patch adds plumbing
so that the WebProcess can tell the UIProcess the new scroll position
when a page is scrolled.

Tests: WKWebViewTitlebarSeparatorTests.BackForwardCache

WKWebViewTitlebarSeparatorTests.ChangeTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ChangeViewVisibility
WKWebViewTitlebarSeparatorTests.NavigationResetsTitlebarAppearance
WKWebViewTitlebarSeparatorTests.ParentWhileScrolled
WKWebViewTitlebarSeparatorTests.ScrollWithTitlebarAdjacency
WKWebViewTitlebarSeparatorTests.ScrollWithoutTitlebarAdjacency

  • Platform/spi/mac/AppKitSPI.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView scrollViewFrame]):
(-[WKView hasScrolledContentsUnderTitlebar]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView scrollViewFrame]):
(-[WKWebView hasScrolledContentsUnderTitlebar]):

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

(WebKit::WebViewImpl::updateWindowAndViewFrames):

If the WKWebView's frame changes, update the titlebar adjacency
state and notify observers of the change.

(WebKit::WebViewImpl::viewWillMoveToWindowImpl):

Unregister the WKWebView as an NSScrollViewSeparatorTrackingAdapter if
it is removed from the window.

(WebKit::WebViewImpl::viewDidHide):

Hidden views are not adjacent to the titlebar.

(WebKit::WebViewImpl::viewDidUnhide):

An unhidden view may be adjacent to the titlebar.

(WebKit::WebViewImpl::pageDidScroll):

Use the scroll position of the page to determine whether or not the
WKWebView is scrolled.

(WebKit::WebViewImpl::scrollViewFrame):

Needed to conform to NSScrollViewSeparatorTrackingAdapter.

(WebKit::WebViewImpl::hasScrolledContentsUnderTitlebar):

Needed to conform to NSScrollViewSeparatorTrackingAdapter. Returns true
if the view is registered as an NSScrollViewSeparatorTrackingAdapter
and is scrolled.

(WebKit::WebViewImpl::updateTitlebarAdjacencyState):

The WKWebView needs to be registered as an NSScrollViewSeparatorTrackingAdapter
if it's adjacent to the titlebar and unregistered otherwise.

  • UIProcess/PageClient.h:

(WebKit::PageClient::pageDidScroll):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::pageDidScroll):

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

(WebKit::PageClientImpl::didCommitLoadForMainFrame):

Reset the scroll position upon navigation, as pageDidScroll does not get
called when navigating.

(WebKit::PageClientImpl::pageDidScroll):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::pageDidScroll):

Pass the current scroll position when the page is scrolled, so that the
UIProcess knows whether or not the page has a non-zero scroll position.

Source/WTF:

  • wtf/PlatformHave.h: Defined HAVE_NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER.

Tools:

Added API tests to verify that the delegate implementation returns the
correct value for hasScrolledContentsUnderTitlebar depending on
the view's scroll position, visibility, and frame.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
  • TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm: Added.

(-[TitlebarSeparatorTestWKWebView initWithFrame:configuration:]):
(-[TitlebarSeparatorTestWKWebView separatorTrackingAdapter]):
(BackForwardCache):
(ChangeTitlebarAdjacency):
(ChangeViewVisibility):
(NavigationResetsTitlebarAppearance):
(ParentWhileScrolled):
(ScrollWithTitlebarAdjacency):
(ScrollWithoutTitlebarAdjacency):

4:08 PM Changeset in webkit [277687] by Ruben Turcios
  • 1 copy in branches/safari-612.1.15.3-branch

New branch.

4:08 PM Changeset in webkit [277686] by Ruben Turcios
  • 1 copy in branches/safari-612.1.15.2-branch

New branch.

4:07 PM Changeset in webkit [277685] by Alan Coon
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.11

4:05 PM Changeset in webkit [277684] by Alan Coon
  • 1 copy in tags/Safari-612.1.12.10

Tag Safari-612.1.12.10.

3:34 PM Changeset in webkit [277683] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r275013): Trying to navigate in a WKWebView from a command line tool crashes the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=225938
<rdar://problem/78029118>

Reviewed by Alex Christensen.

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

(WebKit::XPCServiceInitializer):
Some kinds of processes do not have a bundle identifier, so requiring one
is simply not going to work.

Also, make the other exit()s in this function use CRASH() instead, so
that they make traditional crash logs instead of just exiting with a
non-zero error code (which is much quieter).

3:24 PM Changeset in webkit [277682] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[BigSur] imported/w3c/web-platform-tests/css/css-counter-styles/tibetan/css3-counter-styles-156.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=222118

Unreviewed test gardening.

Removing test expectation no longer needed.

  • platform/mac/TestExpectations:
3:06 PM Changeset in webkit [277681] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.1-branch/Source/ThirdParty/ANGLE

Cherry-pick r277661. rdar://problem/78175007

Stop compiling ANGLE metal files twice
https://bugs.webkit.org/show_bug.cgi?id=225919
<rdar://78013511>

Reviewed by Dean Jackson.

ANGLE currently generates an unused default.metallib that conflicts with other default.metallibs being built.
Since it is unused, remove it.
What we currently do is put all the source bytes into gDefaultMetallibSrc and compile it at runtime.
This could be optimized to do it at compile time and use newLibraryWithData instead of newLibraryWithSource,
but that should be done separately.

  • ANGLE.xcodeproj/project.pbxproj:

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

2:30 PM Changeset in webkit [277680] by sbarati@apple.com
  • 25 edits in trunk/Source/JavaScriptCore

Add Data Call ICs that don't repatch and use them in the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=225321
<rdar://problem/77773796>

Reviewed by Michael Saboff.

This patch adds Data ICs for calls. Data ICs for calls work by loading a code
pointer from CallLinkInfo, and indirect calling that pointer. This means that
to repatch such an IC, all we need to do is replace a code pointer inside
CallLinkInfo. No need to repatch the JIT code.

The current implementation only does this for monomorphic calls. We still
repatch the JIT code for polymorphic calls. In a followup, we will also
opt polymorphic call ICs into data-based calls:
https://bugs.webkit.org/show_bug.cgi?id=225793

This patch only uses Data Call ICs for the Baseline JIT. Even with that, it
reduces the number of calls to cacheFlush by ~45% on JetStream2.

Performance is neutral on AS Macs, but it paves the way towards doing
unlinked JITting in JSC.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::addLateLinkTask):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::performFinalization):

  • assembler/LinkBuffer.h:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::unlink):
(JSC::CallLinkInfo::fastPathStart):
(JSC::CallLinkInfo::slowPathStart):
(JSC::CallLinkInfo::doneLocation):
(JSC::CallLinkInfo::setMonomorphicCallee):
(JSC::CallLinkInfo::clearCallee):
(JSC::CallLinkInfo::emitFirstInstructionForDataIC):
(JSC::CallLinkInfo::emitFastPathImpl):
(JSC::CallLinkInfo::emitFastPath):
(JSC::CallLinkInfo::emitTailCallFastPath):
(JSC::CallLinkInfo::emitSlowPath):
(JSC::CallLinkInfo::emitDirectFastPath):
(JSC::CallLinkInfo::emitDirectTailCallFastPath):
(JSC::CallLinkInfo::initializeDirectCall):
(JSC::CallLinkInfo::setDirectCallTarget):
(JSC::CallLinkInfo::setSlowPathCallDestination):
(JSC::CallLinkInfo::revertCallToStub):
(JSC::CallLinkInfo::setStub):
(JSC::CallLinkInfo::callReturnLocation): Deleted.
(JSC::CallLinkInfo::patchableJump): Deleted.
(JSC::CallLinkInfo::hotPathBegin): Deleted.
(JSC::CallLinkInfo::setCallee): Deleted.

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::calleeGPR const):
(JSC::CallLinkInfo::isDataIC const):
(JSC::CallLinkInfo::setUsesDataICs):
(JSC::CallLinkInfo::setCodeLocations):
(JSC::CallLinkInfo::offsetOfCallee):
(JSC::CallLinkInfo::offsetOfMonomorphicCallDestination):
(JSC::CallLinkInfo::offsetOfSlowPathCallDestination):
(JSC::CallLinkInfo::setCallLocations): Deleted.
(JSC::CallLinkInfo::hotPathOther): Deleted.
(JSC::CallLinkInfo::setStub): Deleted.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addJSCall):
(JSC::DFG::JITCompiler::addJSDirectCall):
(JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
(JSC::DFG::JITCompiler::JSDirectCallRecord::JSDirectCallRecord):
(JSC::DFG::JITCompiler::addJSDirectTailCall): Deleted.
(JSC::DFG::JITCompiler::JSDirectTailCallRecord::JSDirectTailCallRecord): Deleted.

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):

  • jit/CCallHelpers.cpp:

(JSC::CCallHelpers::emitJITCodeOver):

  • jit/CCallHelpers.h:
  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileTailCall):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/PolymorphicCallStubRoutine.cpp:

(JSC::PolymorphicCallNode::unlink):

  • jit/Repatch.cpp:

(JSC::linkSlowPathTo):
(JSC::linkSlowFor):
(JSC::linkMonomorphicCall):
(JSC::linkDirectCall):
(JSC::revertCall):
(JSC::unlinkCall):
(JSC::linkPolymorphicCall):
(JSC::linkFor): Deleted.
(JSC::linkDirectFor): Deleted.
(JSC::unlinkFor): Deleted.

  • jit/Repatch.h:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

2:25 PM Changeset in webkit [277679] by zhifei_fang@apple.com
  • 2 edits in trunk/Websites/perf.webkit.org

Clean up git svn mapping when git pull
https://bugs.webkit.org/show_bug.cgi?id=225934

Reviewed by Ryosuke Niwa.

  • tools/sync-commits.py:

(GitRepository._fetch_remote):

2:23 PM Changeset in webkit [277678] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Allow SafariForWebKitDevelopment to launch successfully
https://bugs.webkit.org/show_bug.cgi?id=223551

Suggested by BJ Burg. Reviewed by Tim Horton.

  • UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
2:04 PM Changeset in webkit [277677] by rniwa@webkit.org
  • 9 edits in trunk/Source/WebKit

Enabling IPC testing API should prevent WebContent process from getting terminated in more cases
https://bugs.webkit.org/show_bug.cgi?id=225906
<rdar://problem/78138794>

Rebaselined the tests.

  • Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:

(WebKit::TestWithIfMessage::didReceiveMessage):

  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:

(WebKit::TestWithImageData::didReceiveMessage):
(WebKit::TestWithImageData::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage):
(WebKit::TestWithLegacyReceiver::didReceiveSyncTestWithLegacyReceiverMessage):

  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:

(WebKit::TestWithSemaphore::didReceiveMessage):
(WebKit::TestWithSemaphore::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:

(WebKit::TestWithStreamBuffer::didReceiveMessage):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(WebKit::TestWithStream::didReceiveStreamMessage):

  • Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:

(WebKit::TestWithSuperclass::didReceiveSyncMessage):

  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(WebKit::TestWithoutAttributes::didReceiveMessage):
(WebKit::TestWithoutAttributes::didReceiveSyncMessage):

1:59 PM Changeset in webkit [277676] by jer.noble@apple.com
  • 6 edits
    2 adds in trunk/Source/WebCore

[GPUP] RemoteAudioSession calls into AVAudioSession when GPUP is enabled, causing hangs
https://bugs.webkit.org/show_bug.cgi?id=223564
<rdar://74750291>

Reviewed by Eric Carlson.

Now that AudioSession can have two different implementations at runtime, it should be an
actual virtual class, whose concrete, per-platform implementations are derivations of the
base class. Make AudioSessionIOS and AudioSessionMac true subclasses of AudioSession, and
allow RemoteAudioSession to derive from that same base class (rather than AudioSessionIOS
or AudioSessionMac).

Also ensure AudioSessionIOS or AudioSessionMac is not accidentally created when calling
AudioSession::setSharedSession() by making the NeverDestroyed object holding the session
an Optional, and only lazily creating the session from AudioSession::sharedSession() if
one has not been explicitly set already.

  • platform/audio/AudioSession.cpp:

(WebCore::sharedAudioSession):
(WebCore::AudioSession::create):
(WebCore::AudioSession::sharedSession):
(WebCore::AudioSession::addInterruptionObserver):
(WebCore::AudioSession::removeInterruptionObserver):
(WebCore::AudioSession::beginInterruption):
(WebCore::AudioSession::endInterruption):
(WebCore::AudioSession::setIsPlayingToBluetoothOverride):
(WebCore::AudioSession::AudioSession): Deleted.

  • platform/audio/AudioSession.h:
  • platform/audio/ios/AudioSessionIOS.h: Added.
  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionIOS::AudioSessionIOS):
(WebCore::AudioSessionIOS::~AudioSessionIOS):
(WebCore::AudioSessionIOS::setCategory):
(WebCore::AudioSessionIOS::category const):
(WebCore::AudioSessionIOS::routeSharingPolicy const):
(WebCore::AudioSessionIOS::routingContextUID const):
(WebCore::AudioSessionIOS::setCategoryOverride):
(WebCore::AudioSessionIOS::categoryOverride const):
(WebCore::AudioSessionIOS::sampleRate const):
(WebCore::AudioSessionIOS::bufferSize const):
(WebCore::AudioSessionIOS::numberOfOutputChannels const):
(WebCore::AudioSessionIOS::maximumNumberOfOutputChannels const):
(WebCore::AudioSessionIOS::tryToSetActiveInternal):
(WebCore::AudioSessionIOS::preferredBufferSize const):
(WebCore::AudioSessionIOS::setPreferredBufferSize):
(WebCore::AudioSessionIOS::isMuted const):
(WebCore::AudioSessionIOS::handleMutedStateChange):
(WebCore::AudioSessionIOS::addInterruptionObserver):
(WebCore::AudioSessionIOS::removeInterruptionObserver):
(WebCore::AudioSessionIOS::beginInterruption):
(WebCore::AudioSessionIOS::endInterruption):
(WebCore::AudioSessionPrivate::AudioSessionPrivate): Deleted.
(WebCore::AudioSessionPrivate::~AudioSessionPrivate): Deleted.
(WebCore::AudioSession::AudioSession): Deleted.
(WebCore::AudioSession::~AudioSession): Deleted.
(WebCore::AudioSession::setCategory): Deleted.
(WebCore::AudioSession::category const): Deleted.
(WebCore::AudioSession::routeSharingPolicy const): Deleted.
(WebCore::AudioSession::routingContextUID const): Deleted.
(WebCore::AudioSession::setCategoryOverride): Deleted.
(WebCore::AudioSession::categoryOverride const): Deleted.
(WebCore::AudioSession::sampleRate const): Deleted.
(WebCore::AudioSession::bufferSize const): Deleted.
(WebCore::AudioSession::numberOfOutputChannels const): Deleted.
(WebCore::AudioSession::maximumNumberOfOutputChannels const): Deleted.
(WebCore::AudioSession::tryToSetActiveInternal): Deleted.
(WebCore::AudioSession::preferredBufferSize const): Deleted.
(WebCore::AudioSession::setPreferredBufferSize): Deleted.
(WebCore::AudioSession::isMuted const): Deleted.
(WebCore::AudioSession::handleMutedStateChange): Deleted.
(WebCore::AudioSession::addInterruptionObserver): Deleted.
(WebCore::AudioSession::removeInterruptionObserver): Deleted.
(WebCore::AudioSession::beginInterruption): Deleted.
(WebCore::AudioSession::endInterruption): Deleted.

  • platform/audio/mac/AudioSessionMac.h: Added.
  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::AudioSessionMac::addSampleRateObserverIfNeeded const):
(WebCore::AudioSessionMac::handleSampleRateChange):
(WebCore::AudioSessionMac::addBufferSizeObserverIfNeeded const):
(WebCore::AudioSessionMac::handleBufferSizeChange):
(WebCore::AudioSessionMac::audioOutputDeviceChanged):
(WebCore::AudioSessionMac::setIsPlayingToBluetoothOverride):
(WebCore::AudioSessionMac::setCategory):
(WebCore::AudioSessionMac::setCategoryOverride):
(WebCore::AudioSessionMac::sampleRate const):
(WebCore::AudioSessionMac::bufferSize const):
(WebCore::AudioSessionMac::numberOfOutputChannels const):
(WebCore::AudioSessionMac::maximumNumberOfOutputChannels const):
(WebCore::AudioSessionMac::tryToSetActiveInternal):
(WebCore::AudioSessionMac::routeSharingPolicy const):
(WebCore::AudioSessionMac::routingContextUID const):
(WebCore::AudioSessionMac::preferredBufferSize const):
(WebCore::AudioSessionMac::setPreferredBufferSize):
(WebCore::AudioSessionMac::isMuted const):
(WebCore::AudioSessionMac::handleMutedStateChange):
(WebCore::AudioSessionMac::addMutedStateObserver):
(WebCore::AudioSessionMac::removeMutedStateObserver):
(): Deleted.
(WebCore::AudioSessionPrivate::addSampleRateObserverIfNeeded): Deleted.
(WebCore::AudioSessionPrivate::handleSampleRateChange): Deleted.
(WebCore::AudioSessionPrivate::addBufferSizeObserverIfNeeded): Deleted.
(WebCore::AudioSessionPrivate::handleBufferSizeChange): Deleted.
(WebCore::AudioSession::AudioSession): Deleted.
(WebCore::AudioSession::category const): Deleted.
(WebCore::AudioSession::audioOutputDeviceChanged): Deleted.
(WebCore::AudioSession::setIsPlayingToBluetoothOverride): Deleted.
(WebCore::AudioSession::setCategory): Deleted.
(WebCore::AudioSession::categoryOverride const): Deleted.
(WebCore::AudioSession::setCategoryOverride): Deleted.
(WebCore::AudioSession::sampleRate const): Deleted.
(WebCore::AudioSession::bufferSize const): Deleted.
(WebCore::AudioSession::numberOfOutputChannels const): Deleted.
(WebCore::AudioSession::maximumNumberOfOutputChannels const): Deleted.
(WebCore::AudioSession::tryToSetActiveInternal): Deleted.
(WebCore::AudioSession::routeSharingPolicy const): Deleted.
(WebCore::AudioSession::routingContextUID const): Deleted.
(WebCore::AudioSession::preferredBufferSize const): Deleted.
(WebCore::AudioSession::setPreferredBufferSize): Deleted.
(WebCore::AudioSession::isMuted const): Deleted.
(WebCore::AudioSession::handleMutedStateChange): Deleted.
(WebCore::AudioSession::addMutedStateObserver): Deleted.
(WebCore::AudioSession::removeMutedStateObserver): Deleted.

1:58 PM Changeset in webkit [277675] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Forward booted simulators to children processes
https://bugs.webkit.org/show_bug.cgi?id=225933
<rdar://problem/78169900>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/api_tests/runner.py:

(setup_shard): Set DeviceManager global variable from parent process.
(Runner.command_for_port): Use Port's device manager instead of simulated device manager.
(Runner.run): Pass DeviceManager details to children processes.

1:49 PM Changeset in webkit [277674] by Robert Jenner
  • 2 edits in trunk/LayoutTests

Disable WebSQL in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=224144

Unreviewed test gardening.

Remvoing test expectation that is causing this skipped test to run.

  • platform/mac-wk1/TestExpectations:
1:35 PM Changeset in webkit [277673] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Style fixes in steps_unittest.py
https://bugs.webkit.org/show_bug.cgi?id=225932

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps_unittest.py:
1:26 PM Changeset in webkit [277672] by achristensen@apple.com
  • 15 edits
    3 copies in trunk/Source/WebKit

Unreviewed, reverting r277614.
<rdar://78167889>

Broke Mail

Reverted changeset:

"Remove API::Object::Type::BundlePageGroup"
https://bugs.webkit.org/show_bug.cgi?id=225611
https://commits.webkit.org/r277614

12:56 PM Changeset in webkit [277671] by zhifei_fang@apple.com
  • 3 edits in trunk/Websites/perf.webkit.org

Commits updater should ignore null revision identifier
https://bugs.webkit.org/show_bug.cgi?id=225911

Reviewed by Ryosuke Niwa.

  • public/include/commit-updater.php:
  • server-tests/api-report-commits-tests.js:
12:52 PM Changeset in webkit [277670] by Russell Epstein
  • 5 edits in branches/safari-612.1.15.1-branch/Source

Apply patch. rdar://problem/77799537

12:46 PM Changeset in webkit [277669] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r276655.
https://bugs.webkit.org/show_bug.cgi?id=225930

caused a 2% PLT regression

Reverted changeset:

"StructureStubInfo and PolymorphicAccess should account for
their non-GC memory"
https://bugs.webkit.org/show_bug.cgi?id=225113
https://trac.webkit.org/changeset/276655

12:03 PM Changeset in webkit [277668] by Jonathan Bedard
  • 2 edits in trunk/Tools

[lint-test-expectations] Change shebang to Python 3
https://bugs.webkit.org/show_bug.cgi?id=225898
<rdar://problem/78130334>

Reviewed by Aakash Jain.

  • Scripts/lint-test-expectations: Change shebang, remove version check.
11:59 AM Changeset in webkit [277667] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Use UTF-8 internally from Strings inside SQLiteStatement
https://bugs.webkit.org/show_bug.cgi?id=225890

Reviewed by Darin Adler.

Use UTF-8 internally from Strings inside SQLiteStatement. Our SQLite databases use UTF-8
internally for text encoding (since we open the database with sqlite3_open_v2() and not
sqlite3_open16()).

Previously, we were providing UTF-16 strings to SQLite, which meant it had to convert it
internally to UTF-8. Also, whenever we were requesting a string from SQLite, it had to
convert it from UTF-8 to UTF-16 before returning it to us. Our String constructed from
returned from SQLiteStatement would also be 16-bit encoded, even if all ASCII so we were
potentially wasting memory too.

We now provide UTF-8 to SQLite by using StringView::utf8(). We also request UTF-8 strings
from SQLite and rely on String::fromUTF8() to convert it to a WTF::String. For all ASCII
characters, this means we'll end up with a 8-bit String and save memory.

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::bindText):
(WebCore::SQLiteStatement::getColumnName):
(WebCore::SQLiteStatement::getColumnText):

  • platform/sql/SQLiteStatement.h:
11:48 AM Changeset in webkit [277666] by Said Abou-Hallawa
  • 8 edits in trunk/Source

Allow logging minimal info about uploading media files
https://bugs.webkit.org/show_bug.cgi?id=225636
<rdar://problem/76639138>

Reviewed by Alex Christensen.

Source/WebCore:

Files can be uploaded to a server by many different ways: through a form
submit, an xhr, a file fetch or through a worker. r275103 handled the
form submit only. Instead of handling this case by case, we can add the
logging code in a shared place where all the file uploading goes through.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submit):
Delete the code which was part of r275103.

  • page/Page.cpp:

(WebCore::Page::logMediaDiagnosticMessage const):

  • page/Page.h:

Make the Page be responsible for logging the media files info.

  • platform/network/FormData.cpp:

(WebCore::FormData::imageOrMediaFilesCount const):

  • platform/network/FormData.h:

Make the FormData count how many images or media files it has.

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::addParametersShared):
Centralize logging uploading the images and media files.

11:01 AM Changeset in webkit [277665] by keith_miller@apple.com
  • 101 edits
    15 deletes in trunk

Temporarily revert r276592 as it breaks some native apps
https://bugs.webkit.org/show_bug.cgi?id=225917

JSTests:

Unreviewed, revert.

  • microbenchmarks/put-slow-no-cache-array.js: Removed.
  • microbenchmarks/put-slow-no-cache-function.js: Removed.
  • microbenchmarks/put-slow-no-cache-js-proxy.js: Removed.
  • microbenchmarks/put-slow-no-cache-long-prototype-chain.js: Removed.
  • microbenchmarks/put-slow-no-cache.js: Removed.
  • microbenchmarks/reflect-set-with-receiver.js: Removed.
  • stress/custom-get-set-proto-chain-put.js:

(getObjects):
(let.base.of.getBases):

  • stress/module-namespace-access-set-fails.js: Removed.
  • stress/put-non-reified-static-accessor-or-custom.js: Removed.
  • stress/put-non-reified-static-function-or-custom.js: Removed.
  • stress/put-to-primitive-non-reified-static-custom.js: Removed.
  • stress/put-to-primitive.js: Removed.
  • stress/put-to-proto-chain-overrides-put.js: Removed.
  • stress/typed-array-canonical-numeric-index-string-set.js: Removed.

LayoutTests/imported/w3c:

Unreviewed, revert.

  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver-expected.txt: Removed.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver.html: Removed.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html:

Source/JavaScriptCore:

Unreviewed, revert.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::put):

  • debugger/DebuggerScope.h:
  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.h:
  • runtime/CustomGetterSetter.cpp:

(JSC::callCustomSetter):

  • runtime/CustomGetterSetter.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.h:
  • runtime/GenericArguments.h:
  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::put):

  • runtime/GetterSetter.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::put):

  • runtime/JSArray.h:
  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::put):

  • runtime/JSArrayBufferView.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSCell.cpp:

(JSC::JSCell::doPutPropertySecurityCheck):

  • runtime/JSCell.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::put):

  • runtime/JSFunction.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::put):

  • runtime/JSGlobalObject.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSModuleEnvironment.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::doPutPropertySecurityCheck):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::prototypeChainMayInterceptStoreTo):
(JSC::definePropertyOnReceiverSlow): Deleted.
(JSC::JSObject::definePropertyOnReceiver): Deleted.
(JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::putByIndexInline):
(JSC::JSObject::doPutPropertySecurityCheck):
(JSC::JSObject::hasNonReifiedStaticProperties): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInlineExcludingProto):
(JSC::JSObject::putInlineForJSObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putInlineFast): Deleted.

  • runtime/JSProxy.h:
  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::overridesGetOwnPropertySlot const):
(JSC::TypeInfo::overridesAnyFormOfGetOwnPropertyNames const):
(JSC::TypeInfo::hasPutPropertySecurityCheck const):
(JSC::TypeInfo::hasStaticPropertyTable const): Deleted.
(JSC::TypeInfo::overridesPut const): Deleted.

  • runtime/Lookup.h:

(JSC::putEntry):
(JSC::lookupPut):

  • runtime/PropertySlot.h:
  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::put):

  • runtime/ProxyObject.h:
  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::context const):
(JSC::PutPropertySlot::type const):
(JSC::PutPropertySlot::isInitialization const):
(JSC::PutPropertySlot::isTaintedByOpaqueObject const): Deleted.
(JSC::PutPropertySlot::setIsTaintedByOpaqueObject): Deleted.

  • runtime/ReflectObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::put):

  • runtime/RegExpObject.h:
  • runtime/StringObject.cpp:

(JSC::StringObject::put):

  • runtime/StringObject.h:
  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::StringPrototype::create):

  • runtime/StringPrototype.h:
  • runtime/Structure.cpp:

(JSC::Structure::validateFlags):

  • runtime/Structure.h:

(JSC::Structure::takesSlowPathInDFGForImpureProperty):
(JSC::Structure::hasNonReifiedStaticProperties const): Deleted.

  • tools/JSDollarVM.cpp:

Source/WebCore:

Unreviewed, revert.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::doPutPropertySecurityCheck):
(WebCore::JSDOMWindow::put):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::doPutPropertySecurityCheck):

  • bindings/js/JSRemoteDOMWindowCustom.cpp:

(WebCore::JSRemoteDOMWindow::put):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut):
(GenerateHeader):

  • bindings/scripts/test/JS/JSTestDomainSecurity.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:

(WebCore::JSTestIndexedSetterNoIdentifier::put):

  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:

(WebCore::JSTestIndexedSetterThrowingException::put):

  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:

(WebCore::JSTestIndexedSetterWithIdentifier::put):

  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::put):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:

(WebCore::JSTestNamedAndIndexedSetterThrowingException::put):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::put):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedSetterNoIdentifier::put):

  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:

(WebCore::JSTestNamedSetterThrowingException::put):

  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedSetterWithIdentifier::put):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetter::put):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::put):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp:

(WebCore::JSTestNamedSetterWithLegacyOverrideBuiltIns::put):

  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp:

(WebCore::JSTestNamedSetterWithLegacyUnforgeableProperties::put):

  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h:
  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp:

(WebCore::JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns::put):

  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h:
  • bindings/scripts/test/JS/JSTestPluginInterface.cpp:

(WebCore::JSTestPluginInterface::put):

  • bindings/scripts/test/JS/JSTestPluginInterface.h:
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_object.h:

Source/WebKit:

Unreviewed, revert.

  • WebProcess/Plugins/Netscape/JSNPObject.h:

LayoutTests:

Unreviewed, revert

  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put-expected.txt:
  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html:
  • js/dom/reflect-set-onto-dom-expected.txt:
  • js/dom/script-tests/reflect-set-onto-dom.js:
10:55 AM Changeset in webkit [277664] by Alan Coon
  • 5 edits in branches/safari-612.1.12-branch

Cherry-pick r277044. rdar://problem/78160469

Sampled Page Top Color: don't snapshot if the hit test location is an image or has an animation
https://bugs.webkit.org/show_bug.cgi?id=225338

Reviewed by Tim Horton.

Source/WebCore:

Tests: SampledPageTopColor.HitTestHTMLImage

SampledPageTopColor.HitTestCSSBackgroundImage
SampledPageTopColor.HitTestCSSAnimation

  • dom/Document.h:
  • dom/Document.cpp: (WebCore::isValidPageSampleLocation): Added. (WebCore::samplePageColor): Added. (WebCore::Document::determineSampledPageTopColor): (WebCore::Document::isHitTestLocationThirdPartyFrame): Deleted. Refactor isHitTestLocationThirdPartyFrame (and the pixelColor lambda) into static functions that are right above Document::determineSampledPageTopColor for clarity and to allow for more flexibility. In order to check if the hit test node is an image (including having a CSS background-image) or has a CSS animation (or CSS transition), it's necessary to continue to hit test beyond one node as the image and/or node with the CSS animation may be an ancestor (or unrelated position: absolute node) to the HitTestResult::innerNode. `

<div style="background-image: url(...)">

<button>Lorum ipsum ... </button>

</div>

`

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (TEST.SampledPageTopColor.HitTestHTMLImage): (TEST.SampledPageTopColor.HitTestCSSBackgroundImage): (TEST.SampledPageTopColor.HitTestCSSAnimation):

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

10:55 AM Changeset in webkit [277663] by Alan Coon
  • 10 edits in branches/safari-612.1.12-branch

Cherry-pick r277030. rdar://problem/78160475

Sampled Page Top Color: take additional snapshots further down the page to see if the sampled top color is more than just a tiny strip
https://bugs.webkit.org/show_bug.cgi?id=225323

Reviewed by Beth Dakin.

Source/WebCore:

Add a SampledPageTopColorMinHeight setting that controls how far down the sampled page top
color needs to extend in order for us to not bail. If the value > 0, we take an additional
snapshot at (0, SampledPageTopColorMinHeight) and (width, SampledPageTopColorMinHeight),
comparing each to the snapshot directly above (e.g. (0, SampledPageTopColorMinHeight) is
compared to (0, 0)) using the SampledPageTopColorMaxDifference. Depending on the value, if
the color across the top of the page is only a small strip, these extra snapshot comparisons
will prevent a resulting color from being derived.

Tests: SampledPageTopColor.VerticalGradientBelowMaxDifference

SampledPageTopColor.VerticalGradientAboveMaxDifference

  • dom/Document.cpp: (WebCore::Document::determineSampledPageTopColor):

Source/WebKit:

Add a SampledPageTopColorMinHeight setting that controls how far down the sampled page top
color needs to extend in order for us to not bail. If the value > 0, we take an additional
snapshot at (0, SampledPageTopColorMinHeight) and (width, SampledPageTopColorMinHeight),
comparing each to the snapshot directly above (e.g. (0, SampledPageTopColorMinHeight) is
compared to (0, 0)) using the SampledPageTopColorMaxDifference. Depending on the value, if
the color across the top of the page is only a small strip, these extra snapshot comparisons
will prevent a resulting color from being derived.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _setSampledPageTopColorMinHeight:]): Added. (-[WKWebViewConfiguration _sampledPageTopColorMinHeight]): Added.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _setupPageConfiguration:]): Provide SPI to configure the SampledPageTopColorMinHeight preference when creating the WKWebView.

Source/WTF:

Add a SampledPageTopColorMinHeight setting that controls how far down the sampled page top
color needs to extend in order for us to not bail. If the value > 0, we take an additional
snapshot at (0, SampledPageTopColorMinHeight) and (width, SampledPageTopColorMinHeight),
comparing each to the snapshot directly above (e.g. (0, SampledPageTopColorMinHeight) is
compared to (0, 0)) using the SampledPageTopColorMaxDifference. Depending on the value, if
the color across the top of the page is only a small strip, these extra snapshot comparisons
will prevent a resulting color from being derived.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (createWebViewWithSampledPageTopColorMaxDifference): (createHTMLGradientWithColorStops): (TEST.SampledPageTopColor.ZeroMaxDifference): (TEST.SampledPageTopColor.NegativeMaxDifference): (TEST.SampledPageTopColor.SolidColor): (TEST.SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference): (TEST.SampledPageTopColor.VerticalGradientBelowMaxDifference): Added. (TEST.SampledPageTopColor.VerticalGradientAboveMaxDifference): Added. (TEST.SampledPageTopColor.DISABLED_DisplayP3): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor):

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

10:55 AM Changeset in webkit [277662] by Alan Coon
  • 2 edits in branches/safari-612.1.12-branch/Source/WebCore

Cherry-pick r276796. rdar://problem/78162377

Unreviewed, fix crashloop after r276744
<rdar://problem/77333886>

  • dom/Document.cpp: (WebCore::Document::determineSampledPageTopColor): Don't attempt to get the value from the Optional<Lab<float>> unless we know for sure that it's valid. This amounts to always making sure we either continue (or return if that snapshot is not an outlier) instead of only doing it if the snapshot is an outlier.

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

10:42 AM Changeset in webkit [277661] by achristensen@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Stop compiling ANGLE metal files twice
https://bugs.webkit.org/show_bug.cgi?id=225919
<rdar://78013511>

Reviewed by Dean Jackson.

ANGLE currently generates an unused default.metallib that conflicts with other default.metallibs being built.
Since it is unused, remove it.
What we currently do is put all the source bytes into gDefaultMetallibSrc and compile it at runtime.
This could be optimized to do it at compile time and use newLibraryWithData instead of newLibraryWithSource,
but that should be done separately.

  • ANGLE.xcodeproj/project.pbxproj:
10:33 AM Changeset in webkit [277660] by yoshiaki.jitsukawa@sony.com
  • 13 edits in trunk

[PlayStation] Fix PlayStation port
https://bugs.webkit.org/show_bug.cgi?id=225913

Reviewed by Don Olmstead.

Fix PlayStation port

.:

  • Source/cmake/OptionsPlayStation.cmake: Rename

PLAYSTATION_COPY_SHARED_LIBRARIES to PLAYSTATION_COPY_REQUIREMENTS and
let it copy more general files.
Touch ebootparam.ini by the playstation_tools_copy custom_target.

Source/JavaScriptCore:

  • jsc.cpp: Include LinkBuffer.h.

Source/WebCore:

  • PlatformPlayStation.cmake: Rename

PLAYSTATION_COPY_SHARED_LIBRARIES to PLAYSTATION_COPY_REQUIREMENTS.

  • accessibility/AccessibilityMenuList.cpp:

(WebCore::AccessibilityMenuList::didUpdateActiveOption):

  • platform/graphics/PixelBufferFormat.h: Include wtf/Optional.h.

Source/WTF:

  • wtf/PlatformPlayStation.cmake: Rename

PLAYSTATION_COPY_SHARED_LIBRARIES to PLAYSTATION_COPY_REQUIREMENTS.

Tools:

  • MiniBrowser/playstation/CMakeLists.txt: Rename

PLAYSTATION_COPY_SHARED_LIBRARIES to PLAYSTATION_COPY_REQUIREMENTS.

  • MiniBrowser/playstation/WebViewWindow.cpp:

(WebViewWindow::updateTitle): Add nullptr check.
(WebViewWindow::updateURL): Add nullptr check.

10:32 AM Changeset in webkit [277659] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Clean up code distinguishing between webgl/webgl2 contexts
https://bugs.webkit.org/show_bug.cgi?id=225887

Patch by Kenneth Russell <kbr@chromium.org> on 2021-05-18
Reviewed by Darin Adler.

Address code review feedback on earlier bug.

Covered by existing WebGL conformance tests.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::getContextWebGL):

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

Add nil checks for LAContexts before inserting them in the dictionaries.
https://bugs.webkit.org/show_bug.cgi?id=225897

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-05-18
Reviewed by Tim Horton.

In 225218 we stopped dropping requests that didn't have LAContexts. However, that let us
proceed only until we tried to put the (nil) LAContext in an NSDictionary to make a Sec*
call, which throws an exception. This patch adds proper nil checking before inserting the
contexts into the dictionaries.

Manually tested registration and assertion on macOS with and without LAContexts.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification):

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::createCredentialPrivateKey const):

10:03 AM Changeset in webkit [277657] by Russell Epstein
  • 1 copy in tags/Safari-611.3.4

Tag Safari-611.3.4.

9:52 AM Changeset in webkit [277656] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GLIB][GTK] Unreviewed test gardening. File several printing tests that were crashing under own bug.

Also updated baseline of tests that was failing.

  • platform/glib/fast/selectors/unqualified-hover-strict-expected.txt: Updated.
  • platform/gtk/TestExpectations:
9:07 AM Changeset in webkit [277655] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

ReadOnlySharedRingBufferStorage::updateFrameBounds() should validate boundsBufferSize
https://bugs.webkit.org/show_bug.cgi?id=225918

Reviewed by Youenn Fablet.

ReadOnlySharedRingBufferStorage::updateFrameBounds() should validate boundsBufferSize since the
process writing the buffer size on the other end may not be trusted.

  • Shared/Cocoa/SharedRingBufferStorage.cpp:

(WebKit::ReadOnlySharedRingBufferStorage::updateFrameBounds):

8:55 AM Changeset in webkit [277654] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Some mathml tests are failing in EWS GTK-WK2 but passing in post-commit bot.

  • platform/glib/TestExpectations:
8:35 AM Changeset in webkit [277653] by Chris Dumez
  • 6 edits in trunk/Source

Make sure SQLiteStatement objects get destroyed before the database is closed
https://bugs.webkit.org/show_bug.cgi?id=225881

Reviewed by Darin Adler.

Make sure SQLiteStatement objects get destroyed before the database is closed. There are 2 issues
with destroying a SQLiteStatement after a database is closed:

  1. The underlying call to close the sqlite database will fail if the database still has statements and we will leak the database.
  2. SQLiteStatement has a reference to the database so it cannot outlive the SQLiteDatabase.
  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::close):
(WebCore::SQLiteDatabase::incrementStatementCount):
(WebCore::SQLiteDatabase::decrementStatementCount):

  • platform/sql/SQLiteDatabase.h:
  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::SQLiteStatement):
(WebCore::SQLiteStatement::~SQLiteStatement):

7:34 AM Changeset in webkit [277652] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. fast/canvas/canvas-conic-gradient-angle.html is an image failure.

  • platform/glib/TestExpectations:
6:46 AM Changeset in webkit [277651] by Philippe Normand
  • 4 edits in trunk

[MediaStream][GStreamer] Flaky fast/mediastream/MediaStream-video-element-video-tracks-disabled.html
https://bugs.webkit.org/show_bug.cgi?id=225651

Reviewed by Alicia Boya Garcia.

Source/WebCore:

Push the black frame as soon as the corresponding track has been disabled. The black frame
is also now created once only and reused, instead of re-creating it 30 times per second (or
whatever the frame rate is). The cached frame is updated when the track dimensions change as
well.

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

LayoutTests:

  • fast/mediastream/MediaStream-video-element-video-tracks-disabled.html: Delay the

notifyDone call to give the video element some time to render the black frame corresponding
to the disabled track. This might still flake on the bots, if that is the case we might need
to reassess how the test behaves or decide to mark it as expected flaky on glib ports.

6:23 AM Changeset in webkit [277650] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Difficult to scroll calcalist.co.il webpage, scrolling gets 'stuck'
https://bugs.webkit.org/show_bug.cgi?id=225905
<rdar://77692680>

Reviewed by Simon Fraser.

Source/WebCore:

The (implicit) integral flooring on the line height may produce short containing block for the inline content.

Test: fast/inline/vertical-top-on-subpixel-makes-inline-box-overflow.html

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):

LayoutTests:

  • fast/inline/vertical-top-on-subpixel-makes-inline-box-overflow-expected.txt: Added.
  • fast/inline/vertical-top-on-subpixel-makes-inline-box-overflow.html: Added.
4:27 AM Changeset in webkit [277649] by Cameron McCormack
  • 2 edits
    6 adds in trunk/LayoutTests

Test expectation updates from bug 225728
https://bugs.webkit.org/show_bug.cgi?id=225902

Unreviewed test gardening.

  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Added.
  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt: Added.
  • platform/mac-wk2/TestExpectations:
4:10 AM Changeset in webkit [277648] by Adrian Perez de Castro
  • 4 edits in trunk/Source/JavaScriptCore

[JSCOnly] Non unified build fixes
https://bugs.webkit.org/show_bug.cgi?id=225872

Unreviewed non-unified build fixes.

  • jit/JITPropertyAccess.cpp: Add missing ThunkGenerators.h header.
  • jit/SlowPathCall.cpp: Add missing JITInlines.h and ThunkGenerators.h headers.
  • wasm/js/WebAssemblyFunctionBase.h: Add missing WasmFormat.h header.
3:01 AM Changeset in webkit [277647] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Use RefPtr for local ref counted objects of FrameSelection::setSelectionWithoutUpdatingAppearance
https://bugs.webkit.org/show_bug.cgi?id=225908

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-18
Reviewed by Ryosuke Niwa.

A previous patch modified setSelectionWithoutUpdatingAppearance to take into account one
possible DOM mutation after focus change. This is a follow-up patch applying recommendation
from https://lists.webkit.org/pipermail/webkit-dev/2020-September/031386.html event if it is
not obvious whether any of the current uses is dangerous.

No new tests.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Use RefPtr for the
following variables:

  • parent: used in the non-trivial setFocusedFrame function (where it is however immediately

stored in a RefPtr).

  • ownerElement: used in the non-trivial function computeNodeIndex (which however only

performs simple tree navigation).

  • ownerElementParent: used as a this of the non-trivial function hasEditableStyle (which

however does not update style when computing editability).

1:44 AM Changeset in webkit [277646] by rniwa@webkit.org
  • 5 edits in trunk

ASSERTION FAILED: isReactionAllowed() in enqueueDisconnectedCallbackIfNeeded during document teardown
https://bugs.webkit.org/show_bug.cgi?id=224033

Reviewed by Maciej Stachowiak.

Source/WebCore:

Moved the bug assertion to after an early exit for when we're in the middle of destorying the document.

enqueueDisconnectedCallbackIfNeeded will be called on custom elements in these circumstances
but there is no correctness issue here since we exit early.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):

LayoutTests:

Removed flaky test expectation.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
1:10 AM Changeset in webkit [277645] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Resurrect WKWebView media controls API removed in https://bugs.webkit.org/show_bug.cgi?id=221929
https://bugs.webkit.org/show_bug.cgi?id=225696
<rdar://77863194>

Reviewed by Alex Christensen.

Revert closeAllMediaPresentations, pauseAllMediaPlayback, resumeAllMediaPlayback, suspendAllMediaPlayback and requestMediaPlaybackState.
Mark them as deprecated in favor of the latest API versions and implement them based on the latest API versions.
No change of behavior.

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView closeAllMediaPresentations:]):
(-[WKWebView pauseAllMediaPlayback:]):
(-[WKWebView resumeAllMediaPlayback:]):
(-[WKWebView suspendAllMediaPlayback:]):
(-[WKWebView requestMediaPlaybackState:]):

12:01 AM Changeset in webkit [277644] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

SHOULD NEVER BE REACHED in FrameSelection::setSelectionWithoutUpdatingAppearance
https://bugs.webkit.org/show_bug.cgi?id=225219

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-18
Reviewed by Ryosuke Niwa.

Source/WebCore:

When FrameSelection::selectFrameElementInParentIfFullySelected sets focus on the parent
frame, that can trigger DOM events, possibly making orphan the newSelection prepared before.
This patch fixes that issue by clearing the selection on that parent frame in such a
situation.

Test: editing/selection/selection-in-iframe-removed-assert.html

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Check if the
newSelection became orphan and if so, clear it.

LayoutTests:

Add a regression test.

  • editing/selection/selection-in-iframe-removed-assert.html: Copied from

editing/selection/selection-in-iframe-removed-crash.html, with an additional
requestAnimationFrame.

  • editing/selection/selection-in-iframe-removed-assert-expected.txt: Added.

May 17, 2021:

11:34 PM Changeset in webkit [277643] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Drop unused SQLiteStatement::returnsAtLeastOneResult()
https://bugs.webkit.org/show_bug.cgi?id=225901

Reviewed by Darin Adler.

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::returnsAtLeastOneResult): Deleted.

  • platform/sql/SQLiteStatement.h:
10:36 PM Changeset in webkit [277642] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Drop SQLiteStatement::return*Results() functions
https://bugs.webkit.org/show_bug.cgi?id=225899

Reviewed by Alex Christensen.

Drop SQLiteStatement::return*Results() functions. All of them are unused
except for returnTextResults(), which is used only once in SQLiteDatabase.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::clearAllTables):

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::returnTextResults): Deleted.
(WebCore::SQLiteStatement::returnIntResults): Deleted.
(WebCore::SQLiteStatement::returnInt64Results): Deleted.
(WebCore::SQLiteStatement::returnDoubleResults): Deleted.

  • platform/sql/SQLiteStatement.h:
10:15 PM Changeset in webkit [277641] by rniwa@webkit.org
  • 6 edits in trunk/Source/WebKit

Enabling IPC testing API should prevent WebContent process from getting terminated in more cases
https://bugs.webkit.org/show_bug.cgi?id=225906

Reviewed by Wenson Hsieh.

Avoid hitting debug assertions in WebContent process when a dispatched message isn't processed
in a message receivers and don't kill WebContent process in GPU processs when RemoteRenderingBackend
receives a bad IPC message.

Also fixed a typo in encodeSharedMemory where we were exiting early when the protection was ReadWrite
instead of when it was not ReadWrite or ReadOnly.

These fixes are needed to land tests for recent GPU process fixes.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:
  • Scripts/webkit/messages.py:

(generate_message_handler):

  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::encodeSharedMemory):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensureGPUProcessConnection):

9:26 PM Changeset in webkit [277640] by Lauro Moura
  • 3 edits
    1 copy
    5 deletes in trunk/LayoutTests

[GLIB] Garden a few tests and unify some expectations

Unreviewed test gardening.

Removed some deprecated WPE baselines, moving expectations from GTK to
Glib.

  • platform/glib/TestExpectations:
  • platform/glib/security/block-test-expected.txt: Renamed from LayoutTests/platform/gtk/security/block-test-expected.txt.
  • platform/gtk/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-case.any.worker-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/mimesniff/mime-types/charset-parameter.window-expected.txt: Removed.
  • platform/wpe/security/block-test-expected.txt: Removed.
9:13 PM Changeset in webkit [277639] by Kocsen Chung
  • 2 edits in branches/safari-611-branch/Source/WebKit

Apply patch. rdar://problem/78137134

9:10 PM Changeset in webkit [277638] by Kocsen Chung
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.3.4

8:52 PM Changeset in webkit [277637] by Kocsen Chung
  • 1 copy in tags/Safari-611.2.7.0.4

Tag Safari-611.2.7.0.4.

8:49 PM Changeset in webkit [277636] by Kocsen Chung
  • 2 edits in branches/safari-611.2.7.0-branch/Source/WebKit

Apply patch. rdar://problem/78125245

8:45 PM Changeset in webkit [277635] by Kocsen Chung
  • 8 edits in branches/safari-611.2.7.0-branch/Source

Versioning.

WebKit-7611.2.7.0.4

8:39 PM Changeset in webkit [277634] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebCore

Remove SQLiteStatement::isColumnNull and its use
https://bugs.webkit.org/show_bug.cgi?id=225892

Reviewed by Chris Dumez.

SQLiteStatement::isColumnNull is only used in SQLiteIDBBackingStore and it is actually not needed, because
SQLiteIDBBackingStore can use getColumnText to evaluate the statement and get the result. So the check is
redundant.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::isColumnNull): Deleted.

  • platform/sql/SQLiteStatement.h:
7:35 PM Changeset in webkit [277633] by sbarati@apple.com
  • 4 edits in trunk/Source

Enable JS to emit sign posts and trace points under Options::exposeProfilersOnGlobalObject
https://bugs.webkit.org/show_bug.cgi?id=225895

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • runtime/JSGlobalObject.cpp:

(JSC::asTracePointInt):
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::asSignpostString):
(JSC::JSGlobalObject::init):

Source/WTF:

  • wtf/SystemTracing.h:
7:34 PM Changeset in webkit [277632] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. imported/w3c/web-platform-tests/eventsource/eventsource-close.htm is crashing since r277601.

  • platform/gtk/TestExpectations:
7:33 PM Changeset in webkit [277631] by Wenson Hsieh
  • 8 edits in trunk

[GPU Process] Object identifiers with the deleted value should cause MESSAGE_CHECKs
https://bugs.webkit.org/show_bug.cgi?id=225886
rdar://78114708

Reviewed by Chris Dumez.

Source/WebCore:

Implement some stricter validation around object identifiers in when decoding display list items in the GPU
Process. Currently, we only check for the empty value (i.e. raw identifier value of 0) when iterating over these
items, but treat an identifier with the deleted value as valid; instead, we should be treating items with either
empty or deleted identifiers as invalid.

To address this, we introduce a new helper method, ObjectIdentifier::isValid, and turn existing checks for
!!identifier into identifier.isValid().

Test: DisplayListTests.InlineItemValidationFailure

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::ClipToImageBuffer::isValid const):
(WebCore::DisplayList::DrawImageBuffer::isValid const):
(WebCore::DisplayList::DrawNativeImage::isValid const):
(WebCore::DisplayList::DrawPattern::isValid const):
(WebCore::DisplayList::PaintFrameForMedia::isValid const):
(WebCore::DisplayList::FlushContext::isValid const):
(WebCore::DisplayList::MetaCommandChangeItemBuffer::isValid const):
(WebCore::DisplayList::MetaCommandChangeDestinationImageBuffer::isValid const):

Source/WebKit:

See WebCore/ChangeLog for more details. Use ObjectIdentifier::isValid() instead of just checking for the empty
value, when determining whether an object identifier should trigger a message check to the web process.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

Source/WTF:

See WebCore/ChangeLog for more details. Add a helper method on ObjectIdentifier that returns true only if it
is the empty value or deleted value.

  • wtf/ObjectIdentifier.h:

(WTF::ObjectIdentifier::isValid const):

Tools:

Adjust an existing API test to verify that the deleted object identifier value triggers an inline item decoding
failure.

  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:

(TestWebKitAPI::TEST):

7:19 PM Changeset in webkit [277630] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. imported/w3c/web-platform-tests/resource-timing/resource_connection_reuse_mixed_content.html is failing.

  • platform/glib/TestExpectations:
7:14 PM Changeset in webkit [277629] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[Win] Unreviewed debug build fix for r277601.
https://bugs.webkit.org/show_bug.cgi?id=225855
<rdar://problem/78116715>

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::executeSQLStatement):

  • platform/win/SearchPopupMenuDB.cpp:

(WebCore::SearchPopupMenuDB::executeSQLStatement):
Removed the undefined variables from debug messages.

6:52 PM Changeset in webkit [277628] by Kate Cheney
  • 5 edits
    1 add in trunk

WebFrameLoaderClient::dispatchWillSendRequest sometimes resets app-bound value
https://bugs.webkit.org/show_bug.cgi?id=225829
<rdar://problem/78034595>

Reviewed by Alex Christensen.

Source/WebKit:

webPage->injectedBundleResourceLoadClient().willSendRequestForFrame
can sometimes return a completely new request. We should make sure the
app-bound value is kept when this happens.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):

Tools:

API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacyPlugIn.mm: Added.

(-[InAppBrowserPrivacyPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[InAppBrowserPrivacyPlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):

6:33 PM Changeset in webkit [277627] by achristensen@apple.com
  • 14 edits
    9 copies in trunk

Unreviewed, reverting r277605.

Broke iOS tests

Reverted changeset:

"Remove _WKUserContentFilter and _WKUserContentExtensionStore"
https://bugs.webkit.org/show_bug.cgi?id=224391
https://commits.webkit.org/r277605

6:15 PM Changeset in webkit [277626] by Diego Pino Garcia
  • 1 edit
    10 adds in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Reintroduce platform specific baselines removed in r277577 that are still needed.

  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-stretch-properties-dynamic-001-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-002-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-003-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Added.
  • platform/gtk/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Added.
6:06 PM Changeset in webkit [277625] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(r277116): [ macOS Release wk2 ] media/modern-media-controls/pip-support/pip-support-enabled.html (layout-test) is a flaky text failure
https://bugs.webkit.org/show_bug.cgi?id=225521

Unreviewed test gardening.

Updating expectations to Pass Failure while test is reviewed.

  • platform/mac-wk2/TestExpectations:
5:56 PM Changeset in webkit [277624] by Alan Coon
  • 2 edits in branches/safari-612.1.15.0-branch/Source/WebCore

Cherry-pick r277600. rdar://problem/78130123

REGRESSION(r277425): Crash in FrameSelection::selectFrameElementInParentIfFullySelected
https://bugs.webkit.org/show_bug.cgi?id=225795

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-17
Reviewed by Ryosuke Niwa.

r277425 claimed that in FrameSelection::setSelectionWithoutUpdatingAppearance,
!m_document->frame() was equivalent to !selectionEndpointsBelongToMultipleDocuments &&
!selectionIsInAnotherDocument && selectionIsInDetachedDocument, but it misses the case when
newSelection.document() is null. So this patch adds back this particular case to the
original "if" block. This patch also adds an ASSERT on m_document->frame().

No new tests.

  • editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Add back the case !m_document->frame() && !newSelection.document() to the first sanity check and ASSERT on m_document->frame() after the second sanity check.

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

5:44 PM Changeset in webkit [277623] by Alan Coon
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Cherry-pick r277603. rdar://problem/78130222

Null check m_resource in SubresourceLoader::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=225879

Reviewed by Chris Dumez.

Add ASSERT_NOT_REACHED and RELEASE_LOG_FAULT if m_resource is null.
This will help us notice this invalid state in debug builds and diagnose strange loading failures in simulated crash logs.
On further investigation, the crash fixed in r277594 was likely already fixed by something else, but that made it more robust.

  • loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):

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

5:44 PM Changeset in webkit [277622] by Alan Coon
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Cherry-pick r277600. rdar://problem/78130132

REGRESSION(r277425): Crash in FrameSelection::selectFrameElementInParentIfFullySelected
https://bugs.webkit.org/show_bug.cgi?id=225795

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-17
Reviewed by Ryosuke Niwa.

r277425 claimed that in FrameSelection::setSelectionWithoutUpdatingAppearance,
!m_document->frame() was equivalent to !selectionEndpointsBelongToMultipleDocuments &&
!selectionIsInAnotherDocument && selectionIsInDetachedDocument, but it misses the case when
newSelection.document() is null. So this patch adds back this particular case to the
original "if" block. This patch also adds an ASSERT on m_document->frame().

No new tests.

  • editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Add back the case !m_document->frame() && !newSelection.document() to the first sanity check and ASSERT on m_document->frame() after the second sanity check.

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

5:44 PM Changeset in webkit [277621] by Alan Coon
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Cherry-pick r277594. rdar://problem/78130222

Null check m_resource in SubresourceLoader::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=225879
<rdar://78084804>

Reviewed by Chris Dumez.

  • loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):

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

5:41 PM Changeset in webkit [277620] by ggaren@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

StructureRareData::m_replacementWatchpointSets should not be a pointer to a pointer
https://bugs.webkit.org/show_bug.cgi?id=225840

Reviewed by Mark Lam.

HashMap is already just one pointer. Making it a pointer to a pointer
causes heap fragmentation. Worth about 1MB on GMail.

  • runtime/Structure.cpp:

(JSC::Structure::ensurePropertyReplacementWatchpointSet):

  • runtime/StructureInlines.h:

(JSC::Structure::didReplaceProperty):
(JSC::Structure::propertyReplacementWatchpointSet):

  • runtime/StructureRareData.h:
5:26 PM Changeset in webkit [277619] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the internal macOS build

Add a missing WebCore:: namespace before TranslationContextMenuInfo.
This error was likely masked by a using namespace WebCore; present in an earlier unified source.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::handleContextMenuTranslation):

5:11 PM Changeset in webkit [277618] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Drop unnecessary SQLiteDatabase::updateLastChangesCount()
https://bugs.webkit.org/show_bug.cgi?id=225885

Reviewed by Alex Christensen.

Drop unnecessary SQLiteDatabase::updateLastChangesCount() and have SQLiteDatabase::lastChanges()
rely on sqlite3_changes() instead of sqlite3_total_changes(). We started using updateLastChangesCount()
+ sqlite3_total_changes() in https://commits.webkit.org/r130891 to address an issue in WebSQL
SQLResultSet.rowsAffected would not be 0 for SELECT statement. This patch reverts r130891 and instead
sets SQLResultSet.rowsAffected when the statement is not a read-only statement.

This is covered by storage/websql/execute-sql-rowsAffected.html which is still passing after
this change.

  • Modules/webdatabase/SQLStatement.cpp:

(WebCore::SQLStatement::execute):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::lastChanges):
(WebCore::SQLiteDatabase::updateLastChangesCount): Deleted.

  • platform/sql/SQLiteDatabase.h:
  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::step):
(WebCore::SQLiteStatement::isReadOnly):

  • platform/sql/SQLiteStatement.h:
5:09 PM Changeset in webkit [277617] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows debug build.
https://bugs.webkit.org/show_bug.cgi?id=225855

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::executeSQLStatement):

5:09 PM Changeset in webkit [277616] by Devin Rousso
  • 10 edits in trunk

[Modern Media Controls] promote submenus items if there is only one
https://bugs.webkit.org/show_bug.cgi?id=225883

Reviewed by Eric Carlson.

Source/WebCore:

As an example, if a <video> only has subtitles and not any other languages, the "Subtitles"
submenu should really be top-level (i.e. have "Subtitles" be the title of the entire
contextmenu instead of being a submenu of a title-less contextmenu) in the contextmenu shown
when tapping the tracks button.

Tests: media/modern-media-controls/tracks-support/auto-text-track.html

media/modern-media-controls/tracks-support/click-track-in-contextmenu.html
media/modern-media-controls/tracks-support/hidden-tracks.html
media/modern-media-controls/tracks-support/off-text-track.html
media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::showMediaControlsContextMenu):

Source/WebKit:

As an example, if a <video> only has subtitles and not any other languages, the "Subtitles"
submenu should really be top-level (i.e. have "Subtitles" be the title of the entire
contextmenu instead of being a submenu of a title-less contextmenu) in the contextmenu shown
when tapping the tracks button.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showMediaControlsContextMenu:items:completionHandler:]):

LayoutTests:

  • media/modern-media-controls/tracks-support/auto-text-track.html:
  • media/modern-media-controls/tracks-support/click-track-in-contextmenu.html:
  • media/modern-media-controls/tracks-support/hidden-tracks.html:
  • media/modern-media-controls/tracks-support/off-text-track.html:
  • media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html:
4:45 PM Changeset in webkit [277615] by Jonathan Bedard
  • 6 edits in trunk/Tools

[webkitscmpy] Support testing on machines without svn installed
https://bugs.webkit.org/show_bug.cgi?id=225891
<rdar://problem/78126369>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py:
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.executable): Ensure whichcraft import support mock.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:

(Git.enter): Mock git executable location.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:

(Svn.enter): Mock svn executable location.

4:24 PM Changeset in webkit [277614] by achristensen@apple.com
  • 20 edits
    3 deletes in trunk

Remove API::Object::Type::BundlePageGroup
https://bugs.webkit.org/show_bug.cgi?id=225611

Reviewed by Brady Eidson.

Source/WebKit:

Its last use was removed in rdar://77775952

  • Shared/API/APIObject.h:
  • Shared/API/APIPageGroupHandle.cpp: Removed.
  • Shared/API/APIPageGroupHandle.h: Removed.
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/Cocoa/SharedRingBufferStorage.cpp:

(WebKit::SharedRingBufferStorage::setStorage):
(WebKit::SharedRingBufferStorage::allocate):

  • Shared/UserData.cpp:

(WebKit::UserData::encode):
(WebKit::UserData::decode):

  • Shared/mac/MediaFormatReader/MediaSampleCursor.h:
  • Sources.txt:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::transformHandlesToObjects):
(WebKit::WebProcessProxy::transformObjectsToHandles):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:

(-[WKWebProcessPlugInPageGroup identifier]): Deleted.
(-[WKWebProcessPlugInPageGroup dealloc]): Deleted.
(-[WKWebProcessPlugInPageGroup _apiObject]): Deleted.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h: Removed.
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController pageGroup]): Deleted.

  • WebProcess/WebPage/WebPageGroupProxy.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::transformHandlesToObjects):
(WebKit::WebProcess::transformObjectsToHandles):

Tools:

Some tests were trying to encode a page group, but it was unused so I just removed them.

  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/DocumentStartUserScriptAlertCrash.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/InjectedBundleMakeAllShadowRootsOpen.cpp:

(TestWebKitAPI::TEST):

4:20 PM Changeset in webkit [277613] by Alexey Shvayka
  • 5 edits
    1 add in trunk

REGRESSION (r271119): Object methods defined with shorthand notation cannot access "caller" in non-strict mode
https://bugs.webkit.org/show_bug.cgi?id=225277

Reviewed by Darin Adler.

JSTests:

  • stress/caller-and-arguments-properties-for-functions-that-dont-have-them.js: Now covers #157461 and #157863.
  • stress/function-caller-cross-realm-via-call-apply.js: Added, coverage for #34553.
  • stress/function-hidden-as-caller.js: Also adds test case for #102276.

Source/JavaScriptCore:

This patch loosens function.caller to allow non-strict getters, setters, arrow functions,
and ES6 methods to be returned as callers, fixing web compatibility.

The intent of r230662 is preserved: generator / async functions are never exposed. There is
no good way to acquire wrapper function from the internal body one, nor from its arguments.
Also, this behavior is on standards track [1] (seems to be considered desirable).

[1]: https://github.com/claudepache/es-legacy-function-reflection/blob/master/spec.md#get-functionprototypecaller (step 14)

  • runtime/JSFunction.cpp:

(JSC::JSC_DEFINE_CUSTOM_GETTER):

4:12 PM Changeset in webkit [277612] by aakash_jain@apple.com
  • 7 edits
    1 add in trunk/Tools

Style checker should check for non-inclusive terminology
https://bugs.webkit.org/show_bug.cgi?id=213088

Reviewed by Jonathan Bedard.

Style checker should check for non-inclusive terminology so that we can avoid unintentional addition
of non-inclusive terminology in our codebase.

  • Scripts/webkitpy/style/checkers/inclusive_language.py: Added inclusive language checker.

(InclusiveLanguageChecker):
(InclusiveLanguageChecker.check):

  • Scripts/webkitpy/style/checkers/changelog.py: Check for inclusive language.
  • Scripts/webkitpy/style/checkers/cpp.py: Ditto.
  • Scripts/webkitpy/style/checkers/js.py: Ditto.
  • Scripts/webkitpy/style/checkers/python.py: Ditto.
  • Scripts/webkitpy/style/checkers/text.py: Ditto.
  • Scripts/report-non-inclusive-language: Ignore the newly added inclusive_language.py file.
4:03 PM Changeset in webkit [277611] by Alan Coon
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.10

4:00 PM Changeset in webkit [277610] by Alan Coon
  • 1 copy in tags/Safari-612.1.12.9

Tag Safari-612.1.12.9.

3:55 PM Changeset in webkit [277609] by berto@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] [2.33.1] Fails to build when HAVE_OPENGL_ES_3 is on
https://bugs.webkit.org/show_bug.cgi?id=225867

Reviewed by Adrian Perez de Castro.

Include GLES3/gl3.h if HAVE_OPENGL_ES_3 is set.

  • platform/graphics/opengl/ExtensionsGLOpenGLES.h:
3:11 PM Changeset in webkit [277608] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix clean build after r277606
https://bugs.webkit.org/show_bug.cgi?id=223658

  • TestWebKitAPI/Tests/WebKitCocoa/ContentSecurityPolicy.mm:

(TEST):
Use API instead of removed API.
Why EWS didn't find this, we may never know.

2:26 PM Changeset in webkit [277607] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Use kAudioObjectPropertyElementMain where available
https://bugs.webkit.org/show_bug.cgi?id=224635

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-17
Reviewed by Eric Carlson.

Source/WebCore:

  • platform/audio/mac/AudioHardwareListenerMac.cpp:

(WebCore::isAudioHardwareProcessRunning):
(WebCore::currentDeviceSupportedBufferSizes):
(WebCore::processIsRunningPropertyDescriptor):
(WebCore::outputDevicePropertyDescriptor):

  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::defaultDevice):
(WebCore::defaultDeviceTransportIsBluetooth):
(WebCore::AudioSessionPrivate::addSampleRateObserverIfNeeded):
(WebCore::AudioSessionPrivate::addBufferSizeObserverIfNeeded):
(WebCore::AudioSession::sampleRate const):
(WebCore::AudioSession::bufferSize const):
(WebCore::AudioSession::maximumNumberOfOutputChannels const):
(WebCore::AudioSession::setPreferredBufferSize):
(WebCore::AudioSession::isMuted const):
(WebCore::AudioSession::addMutedStateObserver):
(WebCore::AudioSession::removeMutedStateObserver):

  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp:

(WebCore::getDeviceInfo):
(WebCore::CoreAudioCaptureDevice::CoreAudioCaptureDevice):
(WebCore::CoreAudioCaptureDevice::relatedAudioDeviceIDs):

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::deviceHasInputStreams):
(WebCore::deviceHasOutputStreams):
(WebCore::isValidCaptureDevice):
(WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
(WebCore::computeAudioDeviceList):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::defaultOutputDevice):

Source/WTF:

  • wtf/PlatformHave.h:
2:21 PM Changeset in webkit [277606] by commit-queue@webkit.org
  • 5 edits in trunk

[Cocoa] Remove prototype loadSimulatedRequest methods
https://bugs.webkit.org/show_bug.cgi?id=223658

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-17
Reviewed by Geoffrey Garen.

Source/WebKit:

Now that rdar://75892301 is fixed we can remove the original API.

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView loadSimulatedRequest:withResponse:responseData:]): Deleted.
(-[WKWebView loadSimulatedRequest:withResponseHTMLString:]): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:

(TEST):

2:13 PM Changeset in webkit [277605] by commit-queue@webkit.org
  • 14 edits
    9 deletes in trunk

Remove _WKUserContentFilter and _WKUserContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=224391

Patch by Alex Christensen <achristensen@webkit.org> on 2021-05-17
Reviewed by Darin Adler.

Source/WebKit:

I removed their use in rdar://75889414
They were replaced by WKContentRuleList and WKContentRuleListStore.

  • UIProcess/API/Cocoa/WKUserContentController.mm:

(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):

  • UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
  • UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:

(+[_WKUserContentExtensionStore defaultStore]):
(+[_WKUserContentExtensionStore storeWithURL:]):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(toUserContentRuleListStoreError): Deleted.
(-[_WKUserContentExtensionStore _apiObject]): Deleted.
(-[_WKUserContentExtensionStore _removeAllContentExtensions]): Deleted.
(-[_WKUserContentExtensionStore _invalidateContentExtensionVersionForIdentifier:]): Deleted.
(-[_WKUserContentExtensionStore _initWithWKContentRuleListStore:]): Deleted.
(-[_WKUserContentExtensionStore _contentRuleListStore]): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Removed.
  • UIProcess/API/Cocoa/_WKUserContentExtensionStorePrivate.h: Removed.
  • UIProcess/API/Cocoa/_WKUserContentFilter.h:
  • UIProcess/API/Cocoa/_WKUserContentFilter.mm:

(-[_WKUserContentFilter _initWithWKContentRuleList:]):
(-[_WKUserContentFilter _apiObject]): Deleted.

  • UIProcess/API/Cocoa/_WKUserContentFilterInternal.h: Removed.
  • UIProcess/API/Cocoa/_WKUserContentFilterPrivate.h: Removed.
  • UIProcess/WebProcessPool.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • MiniBrowser/mac/ExtensionManagerWindowController.m:

(-[ExtensionManagerWindowController init]):
(-[ExtensionManagerWindowController add:]):
(-[ExtensionManagerWindowController remove:]):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/_WKUserContentExtensionStore.mm: Removed.

These tests had already been copied to a version that uses WKContentRuleList.

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::resetContentExtensions):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::configureContentExtensionForTest):

1:51 PM Changeset in webkit [277604] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Mac ] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=225882

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:27 PM Changeset in webkit [277603] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Null check m_resource in SubresourceLoader::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=225879

Reviewed by Chris Dumez.

Add ASSERT_NOT_REACHED and RELEASE_LOG_FAULT if m_resource is null.
This will help us notice this invalid state in debug builds and diagnose strange loading failures in simulated crash logs.
On further investigation, the crash fixed in r277594 was likely already fixed by something else, but that made it more robust.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse):

12:42 PM Changeset in webkit [277602] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[GPU Process] Validate DocumentMarkerLineStyle::Mode when decoding DrawDotsForDocumentMarker
https://bugs.webkit.org/show_bug.cgi?id=225874
rdar://77885775

Reviewed by Simon Fraser.

Add validation around the style mode enum in DrawDotsForDocumentMarker's DocumentMarkerLineStyle. To ensure
that these enum values are safely decoded when deserializing DrawDotsForDocumentMarker items from arbitrary
data, we store and read the style mode as DocumentMarkerLineStyle::Mode's underlying type: a uint8_t. Upon
item validation, we'll then return false from isValid() in the case where the underlying value is not a
valid DocumentMarkerLineStyle::Mode.

This is necessary because copying invalid enum class types triggers undefined behavior in C++, so we need to
avoid copying the enum value as a DocumentMarkerLineStyle::Mode prior to validation.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):
(WebCore::DisplayList::DrawDotsForDocumentMarker::isValid const):

  • platform/graphics/displaylists/DisplayListItems.h:
12:26 PM Changeset in webkit [277601] by Chris Dumez
  • 24 edits in trunk/Source

Avoid more String creations when preparing SQLite statements
https://bugs.webkit.org/show_bug.cgi?id=225855

Reviewed by Alex Christensen.

Avoid more String creations when preparing SQLite statements by using ASCIILiteral. Also rename the
Source/WebCore:

SQLiteDatabase::prepareStatement() / SQLiteDatabase::executeCommand() overloads that take in a
String to make sure they are not called by mistake.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::v3RecordsTableSchema):
(WebCore::IDBServer::v3RecordsTableSchemaAlternate):
(WebCore::IDBServer::v3IndexRecordsTableSchema):
(WebCore::IDBServer::v3IndexRecordsTableSchemaAlternate):
(WebCore::IDBServer::blobRecordsTableSchema):
(WebCore::IDBServer::blobRecordsTableSchemaAlternate):
(WebCore::IDBServer::blobFilesTableSchema):
(WebCore::IDBServer::blobFilesTableSchemaAlternate):
(WebCore::IDBServer::createOrMigrateRecordsTableIfNecessary):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidObjectStoreInfoTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::migrateIndexInfoTableForIDUpdate):
(WebCore::IDBServer::SQLiteIDBBackingStore::migrateIndexRecordsTableForIDUpdate):

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindPreIndexStatementIfNecessary):

  • Modules/webdatabase/Database.cpp:

(WebCore::setTextValueInDatabase):
(WebCore::retrieveTextResultFromDatabase):
(WebCore::Database::performOpenAndVerify):

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::openTrackerDatabase):
(WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):

  • Modules/webdatabase/SQLStatement.cpp:

(WebCore::SQLStatement::execute):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::executeSQLCommand):
(WebCore::ApplicationCacheStorage::verifySchemaVersion):
(WebCore::ApplicationCacheStorage::openDatabase):
(WebCore::ApplicationCacheStorage::empty):
(WebCore::ApplicationCacheStorage::checkForDeletedResources):

  • loader/appcache/ApplicationCacheStorage.h:
  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::verifySchemaVersion):
(WebCore::CookieJarDB::createPrepareStatement):
(WebCore::executeSQLStatement):
(WebCore::CookieJarDB::executeSqlSlow):
(WebCore::CookieJarDB::executeSql):

  • platform/network/curl/CookieJarDB.h:
  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::setMaximumSize):
(WebCore::SQLiteDatabase::setSynchronous):
(WebCore::SQLiteDatabase::executeCommandSlow):
(WebCore::SQLiteDatabase::tableExists):
(WebCore::SQLiteDatabase::clearAllTables):
(WebCore::SQLiteDatabase::prepareStatementSlow):
(WebCore::SQLiteDatabase::prepareHeapStatementSlow):

  • platform/sql/SQLiteDatabase.h:
  • platform/sql/SQLiteTransaction.cpp:

(WebCore::SQLiteTransaction::begin):
(WebCore::SQLiteTransaction::commit):
(WebCore::SQLiteTransaction::rollback):

  • platform/win/SearchPopupMenuDB.cpp:

(WebCore::SearchPopupMenuDB::verifySchemaVersion):
(WebCore::executeSQLStatement):
(WebCore::SearchPopupMenuDB::executeSimpleSql):

  • platform/win/SearchPopupMenuDB.h:

Source/WebKit:

SQLiteDatabase::prepareStatement() / SQLiteDatabase::executeCommand() overloads that take in a
String to make sure they are not called by mistake.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::currentTableAndIndexQueries):
(WebKit::insertDistinctValuesInTableStatement):
(WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::columnsForTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsToTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::renameColumnInTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList):
(WebKit::joinSubStatisticsForSorting):
(WebKit::ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData const):
(WebKit::ResourceLoadStatisticsDatabaseStore::incrementRecordsDeletedCountForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAsPrevalentIfHasRedirectedToPrevalent):
(WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources):
(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::setDomainsAsPrevalent):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearGrandfathering):
(WebKit::ResourceLoadStatisticsDatabaseStore::pruneStatisticsIfNeeded):
(WebKit::ResourceLoadStatisticsDatabaseStore::getSubStatisticStatement const):
(WebKit::ResourceLoadStatisticsDatabaseStore::appendSubStatisticList const):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/WebStorage/LocalStorageDatabase.cpp:

(WebKit::LocalStorageDatabase::openDatabase):
(WebKit::LocalStorageDatabase::migrateItemTableIfNeeded):

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::createTablesIfNeeded):
(WebKit::IconDatabase::populatePageURLToIconURLMap):

Source/WebKitLegacy:

SQLiteDatabase::prepareStatement() / SQLiteDatabase::executeCommand() overloads that take in a
String to make sure they are not called by mistake.

  • Storage/StorageAreaSync.cpp:

(WebKit::StorageAreaSync::openDatabase):
(WebKit::StorageAreaSync::migrateItemTableIfNeeded):

  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::openTrackerDatabase):

12:09 PM Changeset in webkit [277600] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r277425): Crash in FrameSelection::selectFrameElementInParentIfFullySelected
https://bugs.webkit.org/show_bug.cgi?id=225795

Patch by Frederic Wang <fwang@igalia.com> on 2021-05-17
Reviewed by Ryosuke Niwa.

r277425 claimed that in FrameSelection::setSelectionWithoutUpdatingAppearance,
!m_document->frame() was equivalent to !selectionEndpointsBelongToMultipleDocuments &&
!selectionIsInAnotherDocument && selectionIsInDetachedDocument, but it misses the case when
newSelection.document() is null. So this patch adds back this particular case to the
original "if" block. This patch also adds an ASSERT on m_document->frame().

No new tests.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): Add back the case
!m_document->frame() && !newSelection.document() to the first sanity check and ASSERT on
m_document->frame() after the second sanity check.

12:07 PM Changeset in webkit [277599] by dino@apple.com
  • 2 edits in trunk/LayoutTests

Skip WebXR tests again. They are flakey.

11:54 AM Changeset in webkit [277598] by Alan Coon
  • 29 edits
    1 add
    1 delete in branches/safari-612.1.15.1-branch

Cherry-pick r277505. rdar://problem/78110796

Promote -[WKWebView _pageExtendedBackgroundColor] SPI to -[WKWebView underPageBackgroundColor] API
https://bugs.webkit.org/show_bug.cgi?id=225615
<rdar://problem/76568094>

Reviewed by Wenson Hsieh.

Source/WebCore:

underPageBackgroundColor is a null_resettable property that will return (in order of validity)

  • the most recent non-null value provided
  • the CSS background-color of the <body> and/or <html> (this is the current value of _pageExtendedBackgroundColor)
  • the underlying platform view's background color

Modifications to this property will not have any effect until control is returned to the runloop.

Tests: WKWebViewUnderPageBackgroundColor.OnLoad

WKWebViewUnderPageBackgroundColor.SingleSolidColor
WKWebViewUnderPageBackgroundColor.SingleBlendedColor
WKWebViewUnderPageBackgroundColor.MultipleSolidColors
WKWebViewUnderPageBackgroundColor.MultipleBlendedColors
WKWebViewUnderPageBackgroundColor.KVO
WKWebViewUnderPageBackgroundColor.MatchesScrollView

  • page/Page.h: (WebCore::Page::underPageBackgroundColorOverride const): Added.
  • page/Page.cpp: (WebCore::Page::setUnderPageBackgroundColorOverride): Added. Hold the client-overriden value for underPageBackgroundColor so that it can be used when drawing the overscroll layer.
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor): Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColor and UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].
  • dom/Document.cpp: (WebCore::Document::themeColorChanged): It's no longer necessary to force the overscroll area to redraw since that'll be handled by a client calling -[WKWebView setUnderPageBackgroundColor:] (possibly in response to a -[WKWebView themeColor] KVO notification).

Source/WebKit:

underPageBackgroundColor is a null_resettable property that will return (in order of validity)

  • the most recent non-null value provided
  • the CSS background-color of the <body> and/or <html> (this is the current value of _pageExtendedBackgroundColor)
  • the underlying platform view's background color

Modifications to this property will not have any effect until control is returned to the runloop.

  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView underPageBackgroundColor]): Added. (-[WKWebView setUnderPageBackgroundColor:]): Added. (+[WKWebView automaticallyNotifiesObserversOfUnderPageBackgroundColor]): Added.
  • UIProcess/API/ios/WKWebViewIOS.mm: (baseScrollViewBackgroundColor): (scrollViewBackgroundColor): Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColor and UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::underPageBackgroundColor const): Added. (WebKit::WebPageProxy::setUnderPageBackgroundColorOverride): Added. (WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange): (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Added. (WebKit::WebPageProxy::scrollAreaBackgroundColor const): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Added.
  • UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::platformUnderPageBackgroundColor const): Added. Store the client-overriden value for underPageBackgroundColor and manage state changes.
  • UIProcess/PageClient.h: (WebKit::PageClient::underPageBackgroundColorWillChange): Added. (WebKit::PageClient::underPageBackgroundColorDidChange): Added.
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm: (WebKit::PageClientImplCocoa::underPageBackgroundColorWillChange): Added. (WebKit::PageClientImplCocoa::underPageBackgroundColorDidChange): Added. Add ObjC KVO support for -[WKWebView underPageBackgroundColor].
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::contentViewBackgroundColor): Added. Provide a way to get the backgroundColor of the WKContentView. This is needed on iOS because scrollViewBackgroundColor (now WebPageProxy::platformUnderPageBackgroundColor) would use this value before falling back to the underlying platform view's background color.
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setUnderPageBackgroundColorOverride): Added. Pass the client-overriden value for underPageBackgroundColor to the WebProcess so that it can be used when drawing the overscroll layer.
  • UIProcess/ViewSnapshotStore.cpp: (WebKit::ViewSnapshotStore::recordSnapshot): Go back to using the pageExtendedBackgroundColor (before r273083).

Source/WTF:

underPageBackgroundColor is a null_resettable property that will return (in order of validity)

  • the most recent non-null value provided
  • the CSS background-color of the <body> and/or <html> (this is the current value of _pageExtendedBackgroundColor)
  • the underlying platform view's background color

Modifications to this property will not have any effect until control is returned to the runloop.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColorand UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: Renamed from PageExtendedBackgroundColor.mm. (defaultBackgroundColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.OnLoad): (TEST.WKWebViewUnderPageBackgroundColor.SingleSolidColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.SingleBlendedColor): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleSolidColors): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleBlendedColors): Added. (-[WKWebViewUnderPageBackgroundColorObserver initWithWebView:]): Added. (-[WKWebViewUnderPageBackgroundColorObserver observeValueForKeyPath:ofObject:change:context:]): Added. (TEST.WKWebViewUnderPageBackgroundColor.KVO): (TEST.WKWebViewUnderPageBackgroundColor.MatchesScrollView): Added. (TEST.WKWebViewUnderPageBackgroundColor.MultipleStyles): Deleted. (-[WKWebViewPageExtendedBackgroundColorObserver initWithWebView:]): Deleted. (-[WKWebViewPageExtendedBackgroundColorObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: (createWebViewWithSampledPageTopColorMaxDifference): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor): Deleted.
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: (createWebView): Deleted. (TEST.WKWebView.ExperimentalUseThemeColorForScrollAreaBackgroundColor): Deleted. Remove the experimental settings UseSampledPageTopColorForScrollAreaBackgroundColor and UseThemeColorForScrollAreaBackgroundColor now that clients can override the default overscroll area background color using -[WKWebView setUnderPageBackgroundColor:].
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

11:54 AM Changeset in webkit [277597] by Alan Coon
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebCore

Cherry-pick r277459. rdar://problem/78110796

[macOS] experimental "Use theme color for scroll area background" isn't working
https://bugs.webkit.org/show_bug.cgi?id=225726
<rdar://problem/77933000>

Reviewed by Tim Horton.

  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Fix last remaining m_layerForOverhangAreas->setBackgroundColor to use the helper function RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor instead so that all paths that update the overscroll area color check the experimental settings too.

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

11:54 AM Changeset in webkit [277596] by Alan Coon
  • 2 edits in branches/safari-612.1.15.1-branch/Source/WebKit

Cherry-pick r277528. rdar://problem/78109685

REGRESSION (r269824): Random tile corruption when scrolling/zooming in macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=225837
<rdar://problem/75053997>

Reviewed by Simon Fraser.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): Mark the newly front buffer non-volatile before painting into it. This was lost in r269824. Oddly, this caused less trouble than one might expect, except on some particular hardware.

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

11:54 AM Changeset in webkit [277595] by Alan Coon
  • 35 edits in branches/safari-612.1.15.1-branch/Source

Cherry-pick r277453. rdar://problem/78108967

Add textIndicator bounce for AppHighlights on scroll.
https://bugs.webkit.org/show_bug.cgi?id=225727

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
  • loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::setTextIndicator const):
  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/TextIndicator.h:
  • page/cocoa/WebTextIndicatorLayer.h:
  • page/cocoa/WebTextIndicatorLayer.mm: (-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]): (createBounceAnimation): (-[WebTextIndicatorLayer _animationDuration]):
  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm: (WebCore::TextIndicatorWindow::~TextIndicatorWindow): (WebCore::TextIndicatorWindow::clearTextIndicator): (WebCore::TextIndicatorWindow::setTextIndicator):

Use factored out textIndicator code to add a bounce to an appHighlight
when it is scrolled to.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::clearTextIndicatorWithAnimation): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setTextIndicator): (WebKit::WebPageProxy::clearTextIndicator):
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpTextIndicator:]): (-[WKContentView clearTextIndicator:]): (-[WKContentView setTextIndicatorAnimationProgress:]): (-[WKContentView teardownTextIndicatorLayer]): (-[WKContentView startFadeOut]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::didPerformDictionaryLookup):
  • UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController _animationControllerForText]):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setTextIndicator const):
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator):
  • WebCoreSupport/WebChromeClient.h:

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

11:44 AM Changeset in webkit [277594] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Null check m_resource in SubresourceLoader::didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=225879
<rdar://78084804>

Reviewed by Chris Dumez.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse):

11:42 AM Changeset in webkit [277593] by Alan Coon
  • 8 edits in branches/safari-612.1.15.1-branch/Source

Versioning.

WebKit-7612.1.15.1.1

11:35 AM Changeset in webkit [277592] by Alan Coon
  • 35 edits in branches/safari-612.1.15.0-branch/Source

Cherry-pick r277453. rdar://problem/78112386

Add textIndicator bounce for AppHighlights on scroll.
https://bugs.webkit.org/show_bug.cgi?id=225727

Reviewed by Tim Horton.

  • Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
  • loader/EmptyClients.cpp: (WebCore::EmptyChromeClient::setTextIndicator const):
  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/TextIndicator.h:
  • page/cocoa/WebTextIndicatorLayer.h:
  • page/cocoa/WebTextIndicatorLayer.mm: (-[WebTextIndicatorLayer initWithFrame:textIndicator:margin:offset:]): (createBounceAnimation): (-[WebTextIndicatorLayer _animationDuration]):
  • page/mac/TextIndicatorWindow.h:
  • page/mac/TextIndicatorWindow.mm: (WebCore::TextIndicatorWindow::~TextIndicatorWindow): (WebCore::TextIndicatorWindow::clearTextIndicator): (WebCore::TextIndicatorWindow::setTextIndicator):

Use factored out textIndicator code to add a bounce to an appHighlight
when it is scrolled to.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]): (WebKit::WebViewImpl::setTextIndicator): (WebKit::WebViewImpl::clearTextIndicatorWithAnimation): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly): (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setTextIndicator): (WebKit::WebPageProxy::clearTextIndicator):
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setUpTextIndicator:]): (-[WKContentView clearTextIndicator:]): (-[WKContentView setTextIndicatorAnimationProgress:]): (-[WKContentView teardownTextIndicatorLayer]): (-[WKContentView startFadeOut]):
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::setTextIndicator): (WebKit::PageClientImpl::clearTextIndicator): (WebKit::PageClientImpl::didPerformDictionaryLookup):
  • UIProcess/mac/WKImmediateActionController.mm: (-[WKImmediateActionController _animationControllerForText]):
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setTextIndicator const):
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator):
  • WebCoreSupport/WebChromeClient.h:

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

11:35 AM Changeset in webkit [277591] by Alan Coon
  • 5 edits
    2 adds in branches/safari-612.1.15.0-branch

Cherry-pick r277452. rdar://problem/78109565

REGRESSION (r276945): [iOS] Focus rings are too large
https://bugs.webkit.org/show_bug.cgi?id=225778
<rdar://problem/77858341>

Reviewed by Tim Horton.

Source/WebCore:

r276945 updated scaling logic to ensure that the scale of the base CTM
matches the device scale factor. The change itself makes our base CTM
more correct, but exposed a longstanding bug with our focus ring
implementation.

Focus rings are drawn using CoreGraphics, using CGFocusRingStyle. On
macOS, the style is initialized using NSInitializeCGFocusRingStyleForTime.
However, on iOS, we initialize the style ourselves, using UIKit constants.
Currently, the focus ring's style's radius is set to
+[UIFocusRingStyle cornerRadius], a constant of 8. This is the longstanding
issue. CGFocusRingStyle's radius is not a corner radius, but is the
width of the focus ring. In UIKit, this width is represented by
+[UIFocusRingStyle borderThickness], a constant of 3. WebKit has always
intended to match this width, as evidenced by the default outline-width
of 3px in the UA style sheet.

Considering the large disparity between the existing and expected radius
value, it may be surprising that this mistake has gone unnoticed since
2019, when focus rings were first introduced on iOS. This is where r276945
comes into play. Prior to r276945, the scale of the base CTM did not match
the device scale factor. This meant that CG scaled down the constant of 8
to 4 CSS pixels (1 (base CTM) / 2 (device scale factor)). After r276945,
the two scales are equal and the focus ring is drawn as 8 CSS pixels, much
larger than the expected 3px.

Test: fast/forms/ios/focus-ring-size.html

  • platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::drawFocusRingAtTime):

To fix, use the correct SPI to get the focus ring width,
+[UIFocusRingStyle borderThickness]. This ensures that focus rings have
the right width, following r276945.

The change also fixes focus ring repaint issues that arose from the
fact that the outline-width was 3px, but the painted width was 4px.

Source/WebCore/PAL:

  • pal/spi/ios/UIKitSPI.h:

LayoutTests:

Added a regression test to verify the size of the focus ring on iOS.
The test works by drawing an overlay on top of an input element, that
is just large enough to obscure the focus ring. If the focus ring is
too large, the ring will not obscured, leading to a mismatch failure.

  • fast/forms/ios/focus-ring-size-expected.html: Added.
  • fast/forms/ios/focus-ring-size.html: Added.

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

11:28 AM Changeset in webkit [277590] by Alan Coon
  • 8 edits in branches/safari-612.1.15.0-branch/Source

Versioning.

WebKit-7612.1.15.0.1

11:19 AM Changeset in webkit [277589] by youenn@apple.com
  • 5 edits
    3 adds in trunk

[ BigSur Debug wk2 ARM64 ] imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-transform-readable.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=225534
<rdar://problem/77679466>

Reviewed by Eric Carlson.

Source/WebCore:

In case the transform is stopped, the pipeTo operation will propagate the error/closure to the ReadableStream.
In that case, we need to stop enqueuing or we end up hitting the assert.
Handle this by adding a boolean which is set to true when SimpleReadableStreamSource::doCancel is called.
Make close and enqueue as no-op if that boolean is true.
Covered by test no longer crashing.

In addition, make sure to skip frames for which the array buffer is null as it might trigger debug asserts in libwebrtc.
Add a test to cover that case.

Test: http/wpt/webrtc/video-script-transform-keyframe-only.html

  • Modules/mediastream/RTCRtpScriptTransformer.cpp:

(WebCore::RTCRtpScriptTransformer::writable):

  • Modules/streams/ReadableStreamSource.cpp:

(WebCore::SimpleReadableStreamSource::doCancel):
(WebCore::SimpleReadableStreamSource::close):
(WebCore::SimpleReadableStreamSource::enqueue):

  • Modules/streams/ReadableStreamSource.h:

LayoutTests:

  • http/wpt/webrtc/video-script-transform-keyframe-only-expected.txt: Added.
  • http/wpt/webrtc/video-script-transform-keyframe-only-worker.js: Added.
  • http/wpt/webrtc/video-script-transform-keyframe-only.html: Added.
11:12 AM Changeset in webkit [277588] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

MediaSession action handlers aren't treated as having a user gesture
https://bugs.webkit.org/show_bug.cgi?id=225875

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-session/user-gesture-action-handlers.html

We treat remote control commands as having a user gesture, but not when firing
a MediaSession action handler; we should treat them the same.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::callActionHandler):

LayoutTests:

  • media/media-session/user-gesture-action-handlers-expected.txt: Added.
  • media/media-session/user-gesture-action-handlers.html: Added.
10:59 AM Changeset in webkit [277587] by Simon Fraser
  • 5 edits in trunk/Source/WebKit

Allow wheel events to be coalesced during scroll deceleration
https://bugs.webkit.org/show_bug.cgi?id=225834
<rdar://70402512>

Reviewed by Tim Horton.

When scrolling slows down towards the tail end of a momentum scroll, we can reduce our
commit frequency to save power, but we only want to do this on displays whose refresh rate
is higher than the default "update rendering" frequency.

We do this by leveraging the existing WebWheelEventCoalescer, which coalesces events
in the UI process. It tracks time since previous event, and coalesces when the
instantaneous velocity is less than 320 points per second (matching other frameworks
on the system).

WebWheelEventCoalescer needs to know when to enable coalescing, which it computes
on creation, and when the window is moved to a different screen with potentially
a different refresh rate.

  • Shared/WebWheelEventCoalescer.cpp:

(WebKit::WebWheelEventCoalescer::isInMomentumPhase):
(WebKit::WebWheelEventCoalescer::shouldDispatchEvent):

  • Shared/WebWheelEventCoalescer.h:

(WebKit::WebWheelEventCoalescer::shouldCoalesceEventsDuringDeceleration const):
(WebKit::WebWheelEventCoalescer::setShouldCoalesceEventsDuringDeceleration):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::wheelEventCoalescer):
(WebKit::WebPageProxy::shouldCoalesceWheelEventsDuringDeceleration const):
(WebKit::WebPageProxy::windowScreenDidChange):

  • UIProcess/WebPageProxy.h:
9:53 AM Changeset in webkit [277586] by Chris Dumez
  • 11 edits in trunk/Source/WebCore

Move more logic from AudioDestinationNode to its subclasses
https://bugs.webkit.org/show_bug.cgi?id=225849

Reviewed by Sam Weinig.

Move more logic from AudioDestinationNode to its subclasses. In particular, AudioDestinationNode
contains a lot of things that are specific to real-time audio rendering and those should go to
DefaultAudioDestinationNode.

This allows us to move isPlayingAudioDidChange() from BaseAudioContext to AudioContext also.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::isPlayingAudioDidChange):

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

(WebCore::AudioDestinationNode::renderQuantum):

  • Modules/webaudio/AudioDestinationNode.h:
  • Modules/webaudio/BaseAudioContext.cpp:
  • Modules/webaudio/BaseAudioContext.h:
  • Modules/webaudio/DefaultAudioDestinationNode.cpp:

(WebCore::DefaultAudioDestinationNode::createDestination):
(WebCore::DefaultAudioDestinationNode::framesPerBuffer const):
(WebCore::DefaultAudioDestinationNode::render):
(WebCore::DefaultAudioDestinationNode::setIsSilent):
(WebCore::DefaultAudioDestinationNode::isPlayingDidChange):
(WebCore::DefaultAudioDestinationNode::updateIsEffectivelyPlayingAudio):

  • Modules/webaudio/DefaultAudioDestinationNode.h:
  • Modules/webaudio/OfflineAudioDestinationNode.cpp:

(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
(WebCore::OfflineAudioDestinationNode::startRendering):
(WebCore::OfflineAudioDestinationNode::renderOnAudioThread):

  • Modules/webaudio/OfflineAudioDestinationNode.h:
9:31 AM Changeset in webkit [277585] by Ruben Turcios
  • 1 copy in branches/safari-612.1.15.1-branch

New branch.

9:31 AM Changeset in webkit [277584] by Peng Liu
  • 27 edits in trunk/Source

[GPUP] WebContent process should not pull audio session category from the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=225826

Reviewed by Darin Adler.

Source/WebCore:

Change AudioSession::Category to be an enum class.

  • platform/audio/AudioSession.cpp:

(WebCore::AudioSession::categoryOverride const):
(WebCore::AudioSession::category const):

  • platform/audio/AudioSession.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::updateSessionState):

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSession::setCategory):
(WebCore::AudioSession::category const):

  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::AudioSession::setCategory):

  • platform/audio/mac/SharedRoutingArbitrator.h:
  • platform/audio/mac/SharedRoutingArbitrator.mm:

(WebCore::SharedRoutingArbitrator::beginRoutingArbitrationForToken):

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::startUnit):

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::startProducingData):

  • testing/Internals.cpp:

(WebCore::Internals::audioSessionCategory const):

Source/WebKit:

Remove category and routeSharingPolicy from RemoteAudioSessionConfiguration
because we should not pull these properties from the GPU process.

Remove IPC message RemoteAudioSession::ConfigurationChanged because it is not used.

  • GPUProcess/mac/LocalAudioSessionRoutingArbitrator.h:
  • GPUProcess/media/RemoteAudioSessionProxy.cpp:

(WebKit::RemoteAudioSessionProxy::configuration):

  • GPUProcess/media/RemoteAudioSessionProxy.h:
  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::categoryCanMixWithOthers):
(WebKit::RemoteAudioSessionProxyManager::updateCategory):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Media/AudioSessionRoutingArbitratorProxy.h:
  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::setCategory):
(WebKit::RemoteAudioSession::category const):
(WebKit::RemoteAudioSession::configurationChanged): Deleted.

  • WebProcess/GPU/media/RemoteAudioSession.h:
  • WebProcess/GPU/media/RemoteAudioSession.messages.in:
  • WebProcess/GPU/media/RemoteAudioSessionConfiguration.h:

(WebKit::RemoteAudioSessionConfiguration::encode const):
(WebKit::RemoteAudioSessionConfiguration::decode):

  • WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences setAudioSessionCategoryOverride:]):

9:31 AM Changeset in webkit [277583] by Ruben Turcios
  • 1 copy in branches/safari-612.1.15.0-branch

New branch.

8:30 AM Changeset in webkit [277582] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Several OffscreenCanvas tests are failing since r277543.

  • platform/glib/TestExpectations:
8:18 AM Changeset in webkit [277581] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Skip tests requiring support for 'display-p3'.

  • platform/glib/TestExpectations:
6:32 AM Changeset in webkit [277580] by commit-queue@webkit.org
  • 5 edits in trunk

will-change: contain should create a containing block
https://bugs.webkit.org/show_bug.cgi?id=225442

Patch by Rob Buis <rbuis@igalia.com> on 2021-05-17
Reviewed by Antti Koivisto.

Source/WebCore:

Make will-change: contain cause the element to be a containing block for both
position: fixed and position: absolute cases as well as create a CSS stacking
context for the element.

Tests: imported/w3c/web-platform-tests/css/css-contain/contain-paint-stacking-context-001b.html

imported/w3c/web-platform-tests/css/css-will-change/will-change-fixpos-cb-contain-1.html

  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::createsContainingBlockForOutOfFlowPositioned const):
(WebCore::WillChangeData::propertyCreatesStackingContext):

  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyValueWillChange):

LayoutTests:

Tests contain-paint-stacking-context-001b.html (testing
that will-change: contain creates a containing block) and
contain-paint-stacking-context-001b.html (which tests that
will-change: contain creates a CSS stacking context) now
pass, so no longer mark them as image failures.

3:09 AM Changeset in webkit [277579] by ntim@apple.com
  • 6 edits in trunk

will-change: position should not create a containing block for position: fixed elements
https://bugs.webkit.org/show_bug.cgi?id=225443

Reviewed by Antti Koivisto.

This partially undoes r276627 which made will-change: position create a CB for all out-of-flow elements:

  • Removed CSSPropertyPosition from createsContainingBlockForOutOfFlowPositioned() to not create a containing block

for position: fixed; children.

  • Added createsContainingBlockForAbsolutelyPositioned() with CSSPropertyPosition to still create a containing block

for position: absolute; children.

Enabled WPT (which covers both cases): css/css-will-change/will-change-fixpos-cb-position-1.html

Source/WebCore:

  • rendering/RenderElement.h:

(WebCore::RenderElement::canContainAbsolutelyPositionedObjects const):

  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::createsContainingBlockForAbsolutelyPositioned const):
(WebCore::WillChangeData::createsContainingBlockForOutOfFlowPositioned const):

  • rendering/style/WillChangeData.h:

LayoutTests:

1:56 AM Changeset in webkit [277578] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

REGRESSION(r277560): conditional attribute typos in IDLs for OffscreenCanvas, OffscreenCanvasRenderingContext2D
https://bugs.webkit.org/show_bug.cgi?id=225858

Unreviewed. Tweaking the for-worker conditional attribute values for the
OffscreenCanvas and OffscreenCanvasRenderingContext2D interfaces after
the r277560 refactoring. The mismatch in the conditional values left the
two interfaces outside any worker global space.

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-05-17

  • html/OffscreenCanvas.idl:
  • html/canvas/OffscreenCanvasRenderingContext2D.idl:
Note: See TracTimeline for information about the timeline view.