[webkit-changes] [289164] trunk

2022-02-05 Thread shvaikalesh
Title: [289164] trunk








Revision 289164
Author shvaikal...@gmail.com
Date 2022-02-05 16:14:49 -0800 (Sat, 05 Feb 2022)


Log Message
Attempting to [[Set]] JSArray's read-only "length" should throw even with current [[Value]]
https://bugs.webkit.org/show_bug.cgi?id=221177

Reviewed by Saam Barati.

JSTests:

* stress/array-prototype-methods-set-length.js: Added.

Source/_javascript_Core:

As per OrdinarySet algorithm [1]. To achieve that, while ensuring no error is thrown
if read-only "length" isn't actually changed via [[DefineOwnProperty]] [2], this patch
moves `newLength == oldLength` check to JSArray::defineOwnProperty().

That is guaranteed to be correct because:
  a) it's the only caller of setLengthWithArrayStorage() that performs [[DefineOwnProperty]],
 while others implement [[Set]];
  b) there can't possibly be array indices that JSArray::defineOwnProperty() has to remove,
 and even the spec a shortcut here [3].

All code paths in pop() / shift() / push() / unshift() are covered by the newly added test,
as well as JSArray's [[DefineOwnProperty]], while slice() / splice() / etc were vetted to
[[Set]] "length" according to the spec.

Aligns JSC with SpiderMonkey and partly with V8, which is correct for Object.freeze()
but not for `Object.defineProperty(array, "length", { writable: false })`.

[1]: https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor (step 2.a)
[2]: https://tc39.es/ecma262/#sec-validateandapplypropertydescriptor (step 5 and 7)
[3]: https://tc39.es/ecma262/#sec-arraysetlength (step 11)

* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::setLengthWithArrayStorage):

Modified Paths

trunk/JSTests/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/JSArray.cpp


Added Paths

trunk/JSTests/stress/array-prototype-methods-set-length.js




Diff

Modified: trunk/JSTests/ChangeLog (289163 => 289164)

--- trunk/JSTests/ChangeLog	2022-02-05 23:42:27 UTC (rev 289163)
+++ trunk/JSTests/ChangeLog	2022-02-06 00:14:49 UTC (rev 289164)
@@ -1,3 +1,12 @@
+2022-02-05  Alexey Shvayka  
+
+Attempting to [[Set]] JSArray's read-only "length" should throw even with current [[Value]]
+https://bugs.webkit.org/show_bug.cgi?id=221177
+
+Reviewed by Saam Barati.
+
+* stress/array-prototype-methods-set-length.js: Added.
+
 2022-02-04  Yusuke Suzuki  
 
 WeakRef deref can return null instead of undefined


Added: trunk/JSTests/stress/array-prototype-methods-set-length.js (0 => 289164)

--- trunk/JSTests/stress/array-prototype-methods-set-length.js	(rev 0)
+++ trunk/JSTests/stress/array-prototype-methods-set-length.js	2022-02-06 00:14:49 UTC (rev 289164)
@@ -0,0 +1,144 @@
+function shouldBe(actual, expected) {
+if (actual !== expected)
+throw new Error(`Bad value: ${actual}!\ncreateTestObject:\n${createTestObject}\nmakeLengthReadOnly: ${makeLengthReadOnly}`);
+};
+
+function shouldThrow(func, reExpectedError) {
+let errorThrown = false;
+try {
+func();
+} catch (error) {
+errorThrown = true;
+if (!reExpectedError.test(error.toString()))
+throw new Error(`Bad error: ${error}!\ncreateTestObject:\n${createTestObject}\nmakeLengthReadOnly: ${makeLengthReadOnly}`);
+}
+if (!errorThrown)
+throw new Error(`Didn't throw!\ncreateTestObject: ${createTestObject}\nmakeLengthReadOnly: ${makeLengthReadOnly}`);
+};
+
+var createTestObject;
+const createTestObjectFunctions = [
+len => new Array(len),
+len => new Proxy(new Array(len), {}),
+len => { const obj = Object.create(Array.prototype); obj.length = len; return obj; },
+];
+
+var makeLengthReadOnly;
+const makeLengthReadOnlyFunctions = [
+arr => { Object.freeze(arr); },
+arr => { Object.defineProperty(arr, "length", { writable: false }); },
+];
+
+var testObject;
+const expectedTypeError = /^TypeError:.+/;
+
+for (createTestObject of createTestObjectFunctions) {
+for (makeLengthReadOnly of makeLengthReadOnlyFunctions) {
+
+testObject = createTestObject(0);
+makeLengthReadOnly(testObject);
+shouldThrow(() => { "use strict"; testObject.length = 0; }, expectedTypeError);
+shouldBe(testObject.length, 0);
+
+testObject = createTestObject(0);
+makeLengthReadOnly(testObject);
+shouldThrow(() => { testObject.pop(); }, expectedTypeError);
+shouldBe(testObject.length, 0);
+
+testObject = createTestObject(1);
+testObject[0] = 1;
+makeLengthReadOnly(testObject);
+shouldThrow(() => { testObject.pop(); }, expectedTypeError);
+shouldBe(testObject.length, 1);
+
+testObject = createTestObject(0);
+makeLengthReadOnly(testObject);
+shouldThrow(() => { testObject.push(); }, expectedTypeError);
+shouldBe(testObject.length, 0);
+
+testObject = createTestObject(0);
+makeLengthReadOnly(testObject);
+shouldThrow(() => { testObject.push(1); }, expectedTypeError);
+

[webkit-changes] [289163] trunk/Source/WebCore

2022-02-05 Thread zimmermann
Title: [289163] trunk/Source/WebCore








Revision 289163
Author zimmerm...@webkit.org
Date 2022-02-05 15:42:27 -0800 (Sat, 05 Feb 2022)


Log Message
[LBSE] Handle RenderSVGShape in SVGRenderSupport::applyStrokeStyleToContext()
https://bugs.webkit.org/show_bug.cgi?id=236077

Reviewed by Darin Adler.

Activate path length calculation for RenderSVGShape -- this bit
was missing when the layer-aware RenderSVGShape implementation was
upstreamed in r287832.

Currently the functionality is not observable, as we don't create
LBSE renderers yet.

Covered by existing tests, no change in behaviour.

* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (289162 => 289163)

--- trunk/Source/WebCore/ChangeLog	2022-02-05 23:39:04 UTC (rev 289162)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 23:42:27 UTC (rev 289163)
@@ -1,3 +1,22 @@
+2022-02-03  Nikolas Zimmermann  
+
+[LBSE] Handle RenderSVGShape in SVGRenderSupport::applyStrokeStyleToContext()
+https://bugs.webkit.org/show_bug.cgi?id=236077
+
+Reviewed by Darin Adler.
+
+Activate path length calculation for RenderSVGShape -- this bit
+was missing when the layer-aware RenderSVGShape implementation was
+upstreamed in r287832.
+
+Currently the functionality is not observable, as we don't create
+LBSE renderers yet.
+
+Covered by existing tests, no change in behaviour.
+
+* rendering/svg/SVGRenderSupport.cpp:
+(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
+
 2022-02-05  Antoine Quint  
 
 [CSS transition] can't use CSS logical properties in transition syntax


Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (289162 => 289163)

--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp	2022-02-05 23:39:04 UTC (rev 289162)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp	2022-02-05 23:42:27 UTC (rev 289163)
@@ -42,6 +42,7 @@
 #include "RenderSVGResourceMarker.h"
 #include "RenderSVGResourceMasker.h"
 #include "RenderSVGRoot.h"
+#include "RenderSVGShape.h"
 #include "RenderSVGText.h"
 #include "RenderSVGTransformableContainer.h"
 #include "RenderSVGViewportContainer.h"
@@ -486,7 +487,10 @@
 if (float pathLength = downcast(element)->pathLength()) {
 if (is(renderer))
 scaleFactor = downcast(renderer).getTotalLength() / pathLength;
-// FIXME: [LBSE] Upstream RenderSVGShape
+#if ENABLE(LAYER_BASED_SVG_ENGINE)
+else if (is(renderer))
+scaleFactor = downcast(renderer).getTotalLength() / pathLength;
+#endif
 }
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [289162] trunk/Source/WTF

2022-02-05 Thread ddkilzer
Title: [289162] trunk/Source/WTF








Revision 289162
Author ddkil...@apple.com
Date 2022-02-05 15:39:04 -0800 (Sat, 05 Feb 2022)


Log Message
[WTF] Fix clang tidy bugprone-move-forwarding-reference static analyzer warnings in CompletionHandler.h



Reviewed by Chris Dumez.

* wtf/CompletionHandler.h:
(WTF::CompletionHandler().

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/CompletionHandler.h




Diff

Modified: trunk/Source/WTF/ChangeLog (289161 => 289162)

--- trunk/Source/WTF/ChangeLog	2022-02-05 21:25:27 UTC (rev 289161)
+++ trunk/Source/WTF/ChangeLog	2022-02-05 23:39:04 UTC (rev 289162)
@@ -1,3 +1,16 @@
+2022-02-05  David Kilzer  
+
+[WTF] Fix clang tidy bugprone-move-forwarding-reference static analyzer warnings in CompletionHandler.h
+
+
+
+Reviewed by Chris Dumez.
+
+* wtf/CompletionHandler.h:
+(WTF::CompletionHandler().
+
 2022-02-05  Yusuke Suzuki  
 
 Thread suspend and resume should take a global lock to avoid deadlock


Modified: trunk/Source/WTF/wtf/CompletionHandler.h (289161 => 289162)

--- trunk/Source/WTF/wtf/CompletionHandler.h	2022-02-05 21:25:27 UTC (rev 289161)
+++ trunk/Source/WTF/wtf/CompletionHandler.h	2022-02-05 23:39:04 UTC (rev 289162)
@@ -43,7 +43,7 @@
 
 template::value>::type>
 CompletionHandler(CallableType&& callable, CompletionHandlerCallThread callThread = CompletionHandlerCallThread::ConstructionThread)
-: m_function(WTFMove(callable))
+: m_function(std::forward(callable))
 #if ASSERT_ENABLED
 , m_shouldBeCalledOnMainThread(callThread == CompletionHandlerCallThread::MainThread || isMainThread())
 #endif
@@ -85,7 +85,7 @@
 public:
 template::value>::type>
 CompletionHandlerWithFinalizer(CallableType&& callable, Function&)>&& finalizer)
-: m_function(WTFMove(callable))
+: m_function(std::forward(callable))
 , m_finalizer(WTFMove(finalizer))
 {
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [289161] trunk

2022-02-05 Thread graouts
Title: [289161] trunk








Revision 289161
Author grao...@webkit.org
Date 2022-02-05 13:25:27 -0800 (Sat, 05 Feb 2022)


Log Message
[CSS transition] can't use CSS logical properties in transition syntax
https://bugs.webkit.org/show_bug.cgi?id=232361


Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark some WPT progressions. The new FAIL result isn't a real regression, that test
simply passed by virtue of not ever starting a transition for a logical property.

* web-platform-tests/css/css-logical/animation-004-expected.txt:

Source/WebCore:

Resolve logical properties when considering properties that should trigger a transition.
To do so, we must pass the newly-set style to some methods such that they may be able to
reolve logical properties as well.

* style/Styleable.cpp:
(WebCore::keyframeEffectForElementAndProperty):
(WebCore::transitionMatchesProperty):
(WebCore::updateCSSTransitionsForStyleableAndProperty):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/Styleable.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289160 => 289161)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-05 19:44:48 UTC (rev 289160)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-05 21:25:27 UTC (rev 289161)
@@ -1,3 +1,16 @@
+2022-02-05  Antoine Quint  
+
+[CSS transition] can't use CSS logical properties in transition syntax
+https://bugs.webkit.org/show_bug.cgi?id=232361
+
+
+Reviewed by Dean Jackson.
+
+Mark some WPT progressions. The new FAIL result isn't a real regression, that test
+simply passed by virtue of not ever starting a transition for a logical property.
+
+* web-platform-tests/css/css-logical/animation-004-expected.txt:
+
 2022-02-04  Chris Dumez  
 
 Unreviewed, land missing baseline for Shared Worker test.


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt (289160 => 289161)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt	2022-02-05 19:44:48 UTC (rev 289160)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-004-expected.txt	2022-02-05 21:25:27 UTC (rev 289161)
@@ -1,20 +1,18 @@
 
-Harness Error (TIMEOUT), message = null
-
-FAIL Logical properties can be transitioned assert_equals: expected "50px" but got "100px"
-FAIL Logical properties in transitions respect the writing-mode assert_equals: expected "50px" but got "100px"
-FAIL Logical properties in transitions respect the direction assert_equals: expected "50px" but got "100px"
+PASS Logical properties can be transitioned
+PASS Logical properties in transitions respect the writing-mode
+PASS Logical properties in transitions respect the direction
 PASS Declaration order is respected within declaration blocks
 PASS Logical properties are able to override physical properties in declaration blocks
 PASS Declaration order is respected amongst logical properties within declaration blocks
 PASS Physical properties and logical properties can be mixed
 PASS Declaration order is respected on each keyframe individually
-FAIL Transitions update when the writing-mode is changed assert_equals: expected "50px" but got "100px"
-TIMEOUT Filling transitions update when the writing-mode is changed Test timed out
-FAIL The number of interpolating properties can be increased when the writing-mode is changed assert_equals: expected "50px" but got "100px"
-FAIL The number of interpolating properties can be decreased when the writing-mode is changed assert_equals: expected "150px" but got "200px"
-FAIL Transitions update when the writing-mode is changed through a CSS variable assert_equals: expected "50px" but got "100px"
-FAIL Transitions update when the direction is changed assert_equals: expected "50px" but got "100px"
-PASS Transitions from logical to physical update when the direction is changed
-FAIL Transitions from physical to logical update when the direction is changed assert_equals: expected "150px" but got "100px"
+FAIL Transitions update when the writing-mode is changed assert_equals: expected "0px" but got "50px"
+PASS Filling transitions update when the writing-mode is changed
+FAIL The number of interpolating properties can be increased when the writing-mode is changed assert_equals: expected "0px" but got "50px"
+FAIL The number of interpolating properties can be decreased when the writing-mode is changed assert_equals: expected "300px" but got "275px"
+FAIL Transitions update when the writing-mode is changed through a CSS variable assert_equals: expected "50px" but got "0px"
+FAIL Transitions update when the direction is changed assert_equals: expected "0px" but got "50px"
+FAIL Transitions from logical to physical update when the direction is changed assert_equals: 

[webkit-changes] [289160] trunk/Source/WebKit

2022-02-05 Thread simon . fraser
Title: [289160] trunk/Source/WebKit








Revision 289160
Author simon.fra...@apple.com
Date 2022-02-05 11:44:48 -0800 (Sat, 05 Feb 2022)


Log Message
Refactor RemoteLayerBackingStoreCollection to have a single backing store traversal function
https://bugs.webkit.org/show_bug.cgi?id=236040

Reviewed by Tim Horton.

Instead of traversing m_liveBackingStore and m_unparentedBackingStore in two places (from the volatilityTimerFired()
and from tryMarkAllBackingStoreVolatile()), factor into a single function with two behavior flags.

Also make VolatilityMarkingFlags an OptionSet<> and add an option to consider last display time.

* Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
* Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
* Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):
(WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::tryMarkAllBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately): Deleted.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (289159 => 289160)

--- trunk/Source/WebKit/ChangeLog	2022-02-05 18:06:02 UTC (rev 289159)
+++ trunk/Source/WebKit/ChangeLog	2022-02-05 19:44:48 UTC (rev 289160)
@@ -1,3 +1,28 @@
+2022-02-05  Simon Fraser  
+
+Refactor RemoteLayerBackingStoreCollection to have a single backing store traversal function
+https://bugs.webkit.org/show_bug.cgi?id=236040
+
+Reviewed by Tim Horton.
+
+Instead of traversing m_liveBackingStore and m_unparentedBackingStore in two places (from the volatilityTimerFired()
+and from tryMarkAllBackingStoreVolatile()), factor into a single function with two behavior flags.
+
+Also make VolatilityMarkingFlags an OptionSet<> and add an option to consider last display time.
+
+* Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
+* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
+* Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
+(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
+* Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
+(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
+(WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):
+(WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatile):
+(WebKit::RemoteLayerBackingStoreCollection::tryMarkAllBackingStoreVolatile):
+(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
+(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately): Deleted.
+
 2022-02-05  Brady Eidson  
 
 Notification refactoring


Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h (289159 => 289160)

--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h	2022-02-05 18:06:02 UTC (rev 289159)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h	2022-02-05 19:44:48 UTC (rev 289160)
@@ -113,8 +113,8 @@
 PlatformCALayerRemote* m_layer;
 
 WebCore::FloatSize m_size;
-float m_scale;
-bool m_isOpaque;
+float m_scale { 1.0f };
+bool m_isOpaque { false };
 
 WebCore::Region m_dirtyRegion;
 


Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (289159 => 289160)

--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2022-02-05 18:06:02 UTC (rev 289159)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2022-02-05 19:44:48 UTC (rev 289160)
@@ -57,7 +57,6 @@
 
 RemoteLayerBackingStore::RemoteLayerBackingStore(PlatformCALayerRemote* layer)
 : m_layer(layer)
-, m_isOpaque(false)
 , m_lastDisplayTime(-MonotonicTime::infinity())
 {
 if (!m_layer)


Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h (289159 => 289160)

--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h	2022-02-05 18:06:02 UTC (rev 289159)
+++ 

[webkit-changes] [289159] trunk

2022-02-05 Thread ysuzuki
Title: [289159] trunk








Revision 289159
Author ysuz...@apple.com
Date 2022-02-05 10:06:02 -0800 (Sat, 05 Feb 2022)


Log Message
Thread suspend and resume should take a global lock to avoid deadlock
https://bugs.webkit.org/show_bug.cgi?id=236159

Reviewed by Geoffrey Garen.

Source/bmalloc:

Introduce pas_thread_suspend_lock and take it when suspending and resuming threads.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* libpas/src/libpas/pas_scavenger.c:
(scavenger_thread_main):
(pas_scavenger_clear_all_caches):
* libpas/src/libpas/pas_thread_local_cache.c:
(pas_thread_local_cache_for_all):
* libpas/src/libpas/pas_thread_local_cache.h:
* libpas/src/libpas/pas_thread_suspend_lock.c: Copied from Source/WTF/wtf/ThreadMessage.cpp.
* libpas/src/libpas/pas_thread_suspend_lock.h: Copied from Source/WTF/wtf/ThreadMessage.cpp.

Source/_javascript_Core:

* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::tryCopyOtherThreadStack):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
* heap/MachineStackMarker.h:
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::takeSample):
* runtime/VMTraps.cpp:
* wasm/WasmMachineThreads.cpp:
(JSC::Wasm::resetInstructionCacheOnAllThreads):

Source/WTF:

This patch introduces a global lock which should be taken while suspending and resuming a thread.
It is possible that two different threads suspend and resume threads. And if threads suspend
each other without critical section, it can cause a dead lock.

To avoid this problem, we introduce a global lock which should be taken when suspending and resuming
threads. Since libpas is also using thread suspension, we expose a global pas_thread_suspend_lock
when libpas is used, and we use this lock in WTF's Thread suspension code.

* wtf/ThreadMessage.cpp:
(WTF::sendMessageScoped):
* wtf/ThreadMessage.h:
(WTF::sendMessage):
* wtf/Threading.cpp:
(WTF::ThreadSuspendLocker::ThreadSuspendLocker):
(WTF::ThreadSuspendLocker::~ThreadSuspendLocker):
* wtf/Threading.h:
* wtf/posix/ThreadingPOSIX.cpp:
(WTF::Thread::suspend):
(WTF::Thread::resume):
(WTF::Thread::getRegisters):
* wtf/win/ThreadingWin.cpp:
(WTF::Thread::suspend):
(WTF::Thread::resume):
(WTF::Thread::getRegisters):

Tools:

* TestWebKitAPI/Tests/WTF/ThreadMessages.cpp:
(runThreadMessageTest):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp
trunk/Source/_javascript_Core/heap/MachineStackMarker.h
trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp
trunk/Source/_javascript_Core/runtime/VMTraps.cpp
trunk/Source/_javascript_Core/wasm/WasmMachineThreads.cpp
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/ThreadMessage.cpp
trunk/Source/WTF/wtf/ThreadMessage.h
trunk/Source/WTF/wtf/Threading.cpp
trunk/Source/WTF/wtf/Threading.h
trunk/Source/WTF/wtf/posix/ThreadingPOSIX.cpp
trunk/Source/WTF/wtf/win/ThreadingWin.cpp
trunk/Source/bmalloc/CMakeLists.txt
trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj
trunk/Source/bmalloc/libpas/src/libpas/pas_scavenger.c
trunk/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c
trunk/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WTF/ThreadMessages.cpp


Added Paths

trunk/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.c
trunk/Source/bmalloc/libpas/src/libpas/pas_thread_suspend_lock.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (289158 => 289159)

--- trunk/Source/_javascript_Core/ChangeLog	2022-02-05 17:51:40 UTC (rev 289158)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-02-05 18:06:02 UTC (rev 289159)
@@ -1,3 +1,20 @@
+2022-02-05  Yusuke Suzuki  
+
+Thread suspend and resume should take a global lock to avoid deadlock
+https://bugs.webkit.org/show_bug.cgi?id=236159
+
+Reviewed by Geoffrey Garen.
+
+* heap/MachineStackMarker.cpp:
+(JSC::MachineThreads::tryCopyOtherThreadStack):
+(JSC::MachineThreads::tryCopyOtherThreadStacks):
+* heap/MachineStackMarker.h:
+* runtime/SamplingProfiler.cpp:
+(JSC::SamplingProfiler::takeSample):
+* runtime/VMTraps.cpp:
+* wasm/WasmMachineThreads.cpp:
+(JSC::Wasm::resetInstructionCacheOnAllThreads):
+
 2022-02-04  Yusuke Suzuki  
 
 WeakRef deref can return null instead of undefined


Modified: trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp (289158 => 289159)

--- trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp	2022-02-05 17:51:40 UTC (rev 289158)
+++ trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp	2022-02-05 18:06:02 UTC (rev 289159)
@@ -105,10 +105,10 @@
 // significant performance loss as tryCopyOtherThreadStack is only called as part of an O(heapsize)
 // operation. As the heap is generally much larger than the stack the performance hit is minimal.
 // See: https://bugs.webkit.org/show_bug.cgi?id=146297
-void MachineThreads::tryCopyOtherThreadStack(Thread& thread, void* 

[webkit-changes] [289158] trunk/Source/WebCore

2022-02-05 Thread graouts
Title: [289158] trunk/Source/WebCore








Revision 289158
Author grao...@webkit.org
Date 2022-02-05 09:51:40 -0800 (Sat, 05 Feb 2022)


Log Message
[Web Animations] Address KeyframeEffect::isAboutToRunAccelerated() FIXME
https://bugs.webkit.org/show_bug.cgi?id=236178

Reviewed by Dean Jackson.

The canBeAccelerated() function catches all the cases to determine whether an effect
can be accelerated prior to being committed to a GraphicsLayerCA animation.

* animation/KeyframeEffect.h:
(WebCore::KeyframeEffect::isAboutToRunAccelerated const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/animation/KeyframeEffect.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289157 => 289158)

--- trunk/Source/WebCore/ChangeLog	2022-02-05 16:37:37 UTC (rev 289157)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 17:51:40 UTC (rev 289158)
@@ -1,3 +1,16 @@
+2022-02-05  Antoine Quint  
+
+[Web Animations] Address KeyframeEffect::isAboutToRunAccelerated() FIXME
+https://bugs.webkit.org/show_bug.cgi?id=236178
+
+Reviewed by Dean Jackson.
+
+The canBeAccelerated() function catches all the cases to determine whether an effect
+can be accelerated prior to being committed to a GraphicsLayerCA animation.
+
+* animation/KeyframeEffect.h:
+(WebCore::KeyframeEffect::isAboutToRunAccelerated const):
+
 2022-02-05  Alan Bujtas  
 
 [RenderTreeBuilder] Clean up column spanners when style change affects containing block


Modified: trunk/Source/WebCore/animation/KeyframeEffect.h (289157 => 289158)

--- trunk/Source/WebCore/animation/KeyframeEffect.h	2022-02-05 16:37:37 UTC (rev 289157)
+++ trunk/Source/WebCore/animation/KeyframeEffect.h	2022-02-05 17:51:40 UTC (rev 289158)
@@ -135,8 +135,7 @@
 bool triggersStackingContext() const { return m_triggersStackingContext; }
 bool isRunningAccelerated() const { return m_runningAccelerated == RunningAccelerated::Yes; }
 
-// FIXME: These ignore the fact that some timing functions can prevent acceleration.
-bool isAboutToRunAccelerated() const { return m_acceleratedPropertiesState != AcceleratedProperties::None && m_lastRecordedAcceleratedAction != AcceleratedAction::Stop; }
+bool isAboutToRunAccelerated() const { return canBeAccelerated() && m_lastRecordedAcceleratedAction != AcceleratedAction::Stop; }
 
 bool filterFunctionListsMatch() const override { return m_filterFunctionListsMatch; }
 bool transformFunctionListsMatch() const override { return m_transformFunctionListsMatch; }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [289157] trunk

2022-02-05 Thread zalan
Title: [289157] trunk








Revision 289157
Author za...@apple.com
Date 2022-02-05 08:37:37 -0800 (Sat, 05 Feb 2022)


Log Message
[RenderTreeBuilder] Clean up column spanners when style change affects containing block
https://bugs.webkit.org/show_bug.cgi?id=236042


Reviewed by Antti Koivisto.

Source/WebCore:

In addition to removing the leftover spanners after style change, this patch also expands on the type of style changes that may affect
subtree state inside a multicolumn flow.

Tests: fast/multicol/leftover-spanner-on-style-change-crash.html
   fast/multicol/leftover-spanner-on-style-change-crash2.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded):
* rendering/RenderElement.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):

LayoutTests:

* fast/multicol/leftover-spanner-on-style-change-crash-expected.txt: Added.
* fast/multicol/leftover-spanner-on-style-change-crash.html: Added.
* fast/multicol/leftover-spanner-on-style-change-crash2-expected.txt: Added.
* fast/multicol/leftover-spanner-on-style-change-crash2.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderBlock.cpp
trunk/Source/WebCore/rendering/RenderElement.cpp
trunk/Source/WebCore/rendering/RenderElement.h
trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp


Added Paths

trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash-expected.txt
trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash.html
trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2-expected.txt
trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2.html




Diff

Modified: trunk/LayoutTests/ChangeLog (289156 => 289157)

--- trunk/LayoutTests/ChangeLog	2022-02-05 16:35:53 UTC (rev 289156)
+++ trunk/LayoutTests/ChangeLog	2022-02-05 16:37:37 UTC (rev 289157)
@@ -1,3 +1,16 @@
+2022-02-05  Alan Bujtas  
+
+[RenderTreeBuilder] Clean up column spanners when style change affects containing block
+https://bugs.webkit.org/show_bug.cgi?id=236042
+
+
+Reviewed by Antti Koivisto.
+
+* fast/multicol/leftover-spanner-on-style-change-crash-expected.txt: Added.
+* fast/multicol/leftover-spanner-on-style-change-crash.html: Added.
+* fast/multicol/leftover-spanner-on-style-change-crash2-expected.txt: Added.
+* fast/multicol/leftover-spanner-on-style-change-crash2.html: Added.
+
 2022-02-04  Yusuke Suzuki  
 
 WeakRef deref can return null instead of undefined


Added: trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash-expected.txt (0 => 289157)

--- trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash-expected.txt	2022-02-05 16:37:37 UTC (rev 289157)
@@ -0,0 +1 @@
+


Added: trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash.html (0 => 289157)

--- trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash.html	(rev 0)
+++ trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash.html	2022-02-05 16:37:37 UTC (rev 289157)
@@ -0,0 +1,31 @@
+
+  html {
+columns: 1px;
+  }
+  div::before {
+content: url();
+  }
+  frame {
+column-span: all;
+  }
+  :first-child {
+position: absolute;
+rotate: 0deg;
+  }
+  :read-only {
+translate: 0;
+  }
+
+
+
+  if (window.testRunner)
+testRunner.dumpAsText();
+  internals.settings.setTextAutosizingEnabled(true);
+  _onload_ = () => {
+let div0 = document.createElement('div');
+document.body.appendChild(div0);
+div0.appendChild(document.createElement('frame'));
+document.body.offsetTop;
+document.designMode = 'on';
+  };
+


Added: trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2-expected.txt (0 => 289157)

--- trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2-expected.txt	2022-02-05 16:37:37 UTC (rev 289157)
@@ -0,0 +1 @@
+


Added: trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2.html (0 => 289157)

--- trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2.html	(rev 0)
+++ trunk/LayoutTests/fast/multicol/leftover-spanner-on-style-change-crash2.html	2022-02-05 16:37:37 UTC (rev 289157)
@@ -0,0 +1,28 @@
+
+  html {
+columns: 1px;
+  }
+  div {
+position: absolute;
+  }
+  table {
+column-span: all;
+  }
+  :read-only {
+translate: 0;
+  }
+
+
+
+  
+  if 

[webkit-changes] [289156] trunk/Source/WebCore

2022-02-05 Thread graouts
Title: [289156] trunk/Source/WebCore








Revision 289156
Author grao...@webkit.org
Date 2022-02-05 08:35:53 -0800 (Sat, 05 Feb 2022)


Log Message
[Web Animations] DocumentTimeline::getAnimatedStyle() should be on Styleable
https://bugs.webkit.org/show_bug.cgi?id=236176

Reviewed by Dean Jackson.

There is no need to go through the DocumentTimeline to compute the animated
style for a renderer. Styleable is a more appropriate place for this.

* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::animatedStyleForRenderer): Deleted.
* animation/DocumentTimeline.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::animatedStyle):
* style/Styleable.cpp:
(WebCore::Styleable::computeAnimatedStyle const):
* style/Styleable.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/animation/DocumentTimeline.cpp
trunk/Source/WebCore/animation/DocumentTimeline.h
trunk/Source/WebCore/rendering/RenderElement.cpp
trunk/Source/WebCore/style/Styleable.cpp
trunk/Source/WebCore/style/Styleable.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289155 => 289156)

--- trunk/Source/WebCore/ChangeLog	2022-02-05 16:28:36 UTC (rev 289155)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 16:35:53 UTC (rev 289156)
@@ -1,3 +1,22 @@
+2022-02-05  Antoine Quint  
+
+[Web Animations] DocumentTimeline::getAnimatedStyle() should be on Styleable
+https://bugs.webkit.org/show_bug.cgi?id=236176
+
+Reviewed by Dean Jackson.
+
+There is no need to go through the DocumentTimeline to compute the animated
+style for a renderer. Styleable is a more appropriate place for this.
+
+* animation/DocumentTimeline.cpp:
+(WebCore::DocumentTimeline::animatedStyleForRenderer): Deleted.
+* animation/DocumentTimeline.h:
+* rendering/RenderElement.cpp:
+(WebCore::RenderElement::animatedStyle):
+* style/Styleable.cpp:
+(WebCore::Styleable::computeAnimatedStyle const):
+* style/Styleable.h:
+
 2022-02-05  Alan Bujtas  
 
 [LFC][IFC] Move all the line box vertical alignment logic to LineBoxVerticalAligner


Modified: trunk/Source/WebCore/animation/DocumentTimeline.cpp (289155 => 289156)

--- trunk/Source/WebCore/animation/DocumentTimeline.cpp	2022-02-05 16:28:36 UTC (rev 289155)
+++ trunk/Source/WebCore/animation/DocumentTimeline.cpp	2022-02-05 16:35:53 UTC (rev 289156)
@@ -387,26 +387,6 @@
 return false;
 }
 
-std::unique_ptr DocumentTimeline::animatedStyleForRenderer(RenderElement& renderer)
-{
-auto styleable = Styleable::fromRenderer(renderer);
-if (!styleable)
-return RenderStyle::clonePtr(renderer.style());
-
-auto* effectStack = styleable->keyframeEffectStack();
-if (!effectStack)
-return RenderStyle::clonePtr(renderer.style());
-
-std::unique_ptr result;
-for (const auto& effect : effectStack->sortedEffects())
-effect->getAnimatedStyle(result);
-
-if (!result)
-result = RenderStyle::clonePtr(renderer.style());
-
-return result;
-}
-
 void DocumentTimeline::animationAcceleratedRunningStateDidChange(WebAnimation& animation)
 {
 m_acceleratedAnimationsPendingRunningStateChange.add();


Modified: trunk/Source/WebCore/animation/DocumentTimeline.h (289155 => 289156)

--- trunk/Source/WebCore/animation/DocumentTimeline.h	2022-02-05 16:28:36 UTC (rev 289155)
+++ trunk/Source/WebCore/animation/DocumentTimeline.h	2022-02-05 16:35:53 UTC (rev 289156)
@@ -64,7 +64,6 @@
 // using the given rect, returning the result in the rect. Return false if there is some
 // transform animation but we were unable to cheaply compute its effect on the extent.
 bool computeExtentOfAnimation(RenderElement&, LayoutRect&) const;
-std::unique_ptr animatedStyleForRenderer(RenderElement& renderer);
 bool isRunningAcceleratedAnimationOnRenderer(RenderElement&, CSSPropertyID) const;
 void animationAcceleratedRunningStateDidChange(WebAnimation&);
 bool runningAnimationsForRendererAreAllAccelerated(const RenderBoxModelObject&) const;


Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (289155 => 289156)

--- trunk/Source/WebCore/rendering/RenderElement.cpp	2022-02-05 16:28:36 UTC (rev 289155)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2022-02-05 16:35:53 UTC (rev 289156)
@@ -84,6 +84,7 @@
 #include "ShadowRoot.h"
 #include "StylePendingResources.h"
 #include "StyleResolver.h"
+#include "Styleable.h"
 #include "TextAutoSizing.h"
 #include 
 #include 
@@ -2394,8 +2395,8 @@
 {
 std::unique_ptr result;
 
-if (auto* timeline = documentTimeline())
-result = timeline->animatedStyleForRenderer(*this);
+if (auto styleable = Styleable::fromRenderer(*this))
+result = styleable->computeAnimatedStyle();
 
 if (!result)
 result = RenderStyle::clonePtr(style());


Modified: trunk/Source/WebCore/style/Styleable.cpp (289155 => 289156)

--- trunk/Source/WebCore/style/Styleable.cpp	2022-02-05 16:28:36 UTC (rev 

[webkit-changes] [289155] trunk/Source/WebCore

2022-02-05 Thread zalan
Title: [289155] trunk/Source/WebCore








Revision 289155
Author za...@apple.com
Date 2022-02-05 08:28:36 -0800 (Sat, 05 Feb 2022)


Log Message
[LFC][IFC] Move all the line box vertical alignment logic to LineBoxVerticalAligner
https://bugs.webkit.org/show_bug.cgi?id=236171

Reviewed by Antti Koivisto.

This patch is in preparation for adding ideographic baseline support (vertical writing mode).

LineBoxBuilder::constructAndAlignInlineLevelBoxes has grown large and it's time to move some
code out of this function (the "align" part). Now all the vertical alignment logic, including
the check for simplified vertical alignment is part of the LineBoxVerticalAligner class.
While in this patch we initiate an extra loop on LineBox::nonRootInlineLevelBoxes(), it may very well be a
perf win for the most common cases where the root inline box has no child inline boxes at all
(as previously we called updateCanUseSimplifiedAlignment() on every text run by passing in the parent inline box).

* layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::build):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes): Deleted.
* layout/formattingContexts/inline/InlineLineBoxBuilder.h:
* layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
(WebCore::Layout::LineBoxVerticalAligner::LineBoxVerticalAligner):
(WebCore::Layout::LineBoxVerticalAligner::computeLogicalHeightAndAlign const):
(WebCore::Layout::LineBoxVerticalAligner::canUseSimplifiedAlignmentForInlineLevelBox): Deleted.
* layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h:
(WebCore::Layout::LineBoxVerticalAligner::formattingContext const):
(WebCore::Layout::LineBoxVerticalAligner::layoutState const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289154 => 289155)

--- trunk/Source/WebCore/ChangeLog	2022-02-05 09:25:12 UTC (rev 289154)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 16:28:36 UTC (rev 289155)
@@ -1,3 +1,32 @@
+2022-02-05  Alan Bujtas  
+
+[LFC][IFC] Move all the line box vertical alignment logic to LineBoxVerticalAligner
+https://bugs.webkit.org/show_bug.cgi?id=236171
+
+Reviewed by Antti Koivisto.
+
+This patch is in preparation for adding ideographic baseline support (vertical writing mode).
+
+LineBoxBuilder::constructAndAlignInlineLevelBoxes has grown large and it's time to move some
+code out of this function (the "align" part). Now all the vertical alignment logic, including
+the check for simplified vertical alignment is part of the LineBoxVerticalAligner class.
+While in this patch we initiate an extra loop on LineBox::nonRootInlineLevelBoxes(), it may very well be a
+perf win for the most common cases where the root inline box has no child inline boxes at all
+(as previously we called updateCanUseSimplifiedAlignment() on every text run by passing in the parent inline box).
+
+* layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
+(WebCore::Layout::LineBoxBuilder::build):
+(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
+(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes): Deleted.
+* layout/formattingContexts/inline/InlineLineBoxBuilder.h:
+* layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
+(WebCore::Layout::LineBoxVerticalAligner::LineBoxVerticalAligner):
+(WebCore::Layout::LineBoxVerticalAligner::computeLogicalHeightAndAlign const):
+(WebCore::Layout::LineBoxVerticalAligner::canUseSimplifiedAlignmentForInlineLevelBox): Deleted.
+* layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h:
+(WebCore::Layout::LineBoxVerticalAligner::formattingContext const):
+(WebCore::Layout::LineBoxVerticalAligner::layoutState const):
+
 2022-02-05  Philippe Normand  
 
 [Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases


Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp (289154 => 289155)

--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp	2022-02-05 09:25:12 UTC (rev 289154)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp	2022-02-05 16:28:36 UTC (rev 289155)
@@ -109,7 +109,8 @@
 auto rootInlineBoxAlignmentOffset = valueOrDefault(Layout::horizontalAlignmentOffset(rootStyle.textAlign(), lineContent, lineContent.inlineBaseDirection == TextDirection::LTR));
 // FIXME: The 

[webkit-changes] [289154] trunk

2022-02-05 Thread commit-queue
Title: [289154] trunk








Revision 289154
Author commit-qu...@webkit.org
Date 2022-02-05 01:25:12 -0800 (Sat, 05 Feb 2022)


Log Message
[Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases
https://bugs.webkit.org/show_bug.cgi?id=236136

Patch by Philippe Normand  on 2022-02-05
Reviewed by Adrian Perez de Castro.

Source/WebCore:

Switch GStreamer 1.19 version checks to 1.20 now that it is officially released. Also
include a couple fixes that are needed with GStreamer 1.20 and one that is useful whatever
the GStreamer version:

- GStreamer 1.20 ships a vp8alphadecodebin element able to handle video/x-vp8 caps, so our
  libwebrtc decoder factory needs to account for its presence, in addition to vp8dec.
- With GStreamer 1.20 media/media-source/media-source-seek-back.html started racy crashing
  in the VideoTrackPrivateGStreamer configuration update, where the track was disconnected
  (hence its stream was cleared) and then a GObject notification was emitted by decodebin3. We
  should actually disconnect the GObject signal handlers before clearing the stream, to
  prevent potential null pointer access.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::handleNewDeinterleavePad):
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::AudioTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/GStreamerCommon.h:
* platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::VideoTrackPrivateGStreamer::disconnect):
* platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:
(WebCore::VP8Decoder::Create):

Tools/buildstream:

Update from GStreamer 1.18.5 to 1.20.0, along with the FDO SDK 21.08.10 release, allowing us
to remove 3 vendored patches, all upstreamed.

* elements/freedesktop-sdk.bst:
* elements/sdk/gst-libav.bst:
* elements/sdk/gst-plugins-bad.bst:
* elements/sdk/gst-plugins-base.bst:
* elements/sdk/gst-plugins-good.bst:
* elements/sdk/gst-plugins-ugly.bst:
* elements/sdk/gstreamer.bst:
* patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch: Removed.
* patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch: Removed.
* patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch: Removed.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
trunk/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp
trunk/Tools/buildstream/ChangeLog
trunk/Tools/buildstream/elements/freedesktop-sdk.bst
trunk/Tools/buildstream/elements/sdk/gst-libav.bst
trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst
trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst
trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst
trunk/Tools/buildstream/elements/sdk/gst-plugins-ugly.bst
trunk/Tools/buildstream/elements/sdk/gstreamer.bst


Removed Paths

trunk/Tools/buildstream/patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch
trunk/Tools/buildstream/patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch
trunk/Tools/buildstream/patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch




Diff

Modified: trunk/Source/WebCore/ChangeLog (289153 => 289154)

--- trunk/Source/WebCore/ChangeLog	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,3 +1,38 @@
+2022-02-05  Philippe Normand  
+
+[Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases
+https://bugs.webkit.org/show_bug.cgi?id=236136
+
+Reviewed by Adrian Perez de Castro.
+
+Switch GStreamer 1.19 version checks to 1.20 now that it is officially released. Also
+include a couple fixes that are needed with GStreamer 1.20 and one that is useful whatever
+the GStreamer version:
+
+- GStreamer 1.20 ships a vp8alphadecodebin element able to handle video/x-vp8 caps, so our
+  libwebrtc decoder factory needs to account for its presence, in addition to vp8dec.
+- With GStreamer 1.20 media/media-source/media-source-seek-back.html started racy crashing
+  in the 

[webkit-changes] [289153] trunk/Source

2022-02-05 Thread beidson
Title: [289153] trunk/Source








Revision 289153
Author beid...@apple.com
Date 2022-02-05 00:10:36 -0800 (Sat, 05 Feb 2022)


Log Message
Notification refactoring
https://bugs.webkit.org/show_bug.cgi?id=236169

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No behavior change)

Some "no behavior change" refactors broken out from an upcoming larger patch, including:
- Make Notification objects reliant on ScriptExecutionContext instead of Document
- Give them a direct path to a NotificationClient instead of having to go through a Page's NotificationController
- Give ScriptExecutionContext's a sessionID() accessor for future use
- Some Notification object threading hardening

* Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
(WebCore::Notification::Notification):
(WebCore::Notification::show):
(WebCore::Notification::close):
(WebCore::Notification::clientFromContext):
(WebCore::Notification::stop):
(WebCore::Notification::dispatchErrorEvent):
(WebCore::Notification::permission):
(WebCore::Notification::requestPermission):
(WebCore::Notification::data const):
(WebCore::Notification::document const): Deleted.
* Modules/notifications/Notification.h:

* Modules/notifications/NotificationClient.h:

* Modules/notifications/NotificationData.h:
(WebCore::NotificationData::encode const):
(WebCore::NotificationData::decode):

* dom/Document.cpp:
(WebCore::Document::notificationClient):
(WebCore::Document::sessionID const):
* dom/Document.h:

* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::isServiceWorkerGlobalScope const):
(WebCore::ScriptExecutionContext::notificationClient):
(WebCore::ScriptExecutionContext::sessionID const):

* workers/WorkerThread.h:

* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::create):
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
* workers/service/ServiceWorkerGlobalScope.h:

* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::generateWorkerParameters):
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::m_notificationClient):
(WebCore::ServiceWorkerThread::createWorkerGlobalScope):
* workers/service/context/ServiceWorkerThread.h:

* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
* workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/notifications/Notification.cpp
trunk/Source/WebCore/Modules/notifications/Notification.h
trunk/Source/WebCore/Modules/notifications/NotificationClient.h
trunk/Source/WebCore/Modules/notifications/NotificationData.h
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/dom/Document.h
trunk/Source/WebCore/dom/ScriptExecutionContext.h
trunk/Source/WebCore/workers/WorkerThread.cpp
trunk/Source/WebCore/workers/WorkerThread.h
trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.h
trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.cpp
trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h
trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (289152 => 289153)

--- trunk/Source/WebCore/ChangeLog	2022-02-05 07:26:52 UTC (rev 289152)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 08:10:36 UTC (rev 289153)
@@ -1,3 +1,66 @@
+2022-02-05  Brady Eidson  
+
+Notification refactoring
+https://bugs.webkit.org/show_bug.cgi?id=236169
+
+Reviewed by Alex Christensen.
+
+No new tests (No behavior change)
+
+Some "no behavior change" refactors broken out from an upcoming larger patch, including:
+- Make Notification objects reliant on ScriptExecutionContext instead of Document
+- Give them a direct path to a NotificationClient instead of having to go through a Page's NotificationController
+- Give ScriptExecutionContext's a sessionID() accessor for future use
+- Some Notification object threading hardening
+
+* Modules/notifications/Notification.cpp:
+(WebCore::Notification::create):
+(WebCore::Notification::Notification):
+(WebCore::Notification::show):
+(WebCore::Notification::close):
+(WebCore::Notification::clientFromContext):
+(WebCore::Notification::stop):
+(WebCore::Notification::dispatchErrorEvent):
+(WebCore::Notification::permission):
+(WebCore::Notification::requestPermission):
+(WebCore::Notification::data const):
+