[webkit-changes] [295043] trunk/Source/bmalloc/libpas/src/libpas/pas_utils.c

2022-05-30 Thread brandonstewart
Title: [295043] trunk/Source/bmalloc/libpas/src/libpas/pas_utils.c








Revision 295043
Author brandonstew...@apple.com
Date 2022-05-30 22:49:51 -0700 (Mon, 30 May 2022)


Log Message
[libpas] Build fix macOS
https://bugs.webkit.org/show_bug.cgi?id=241116

Reviewed by Yusuke Suzuki.

Convert from int to uint64_t. Line should always be a positive number.

* Source/bmalloc/libpas/src/libpas/pas_utils.c:
(pas_assertion_failed_no_inline):
(pas_assertion_failed_no_inline_with_extra_detail):

Canonical link: https://commits.webkit.org/251138@main

Modified Paths

trunk/Source/bmalloc/libpas/src/libpas/pas_utils.c




Diff

Modified: trunk/Source/bmalloc/libpas/src/libpas/pas_utils.c (295042 => 295043)

--- trunk/Source/bmalloc/libpas/src/libpas/pas_utils.c	2022-05-31 04:50:57 UTC (rev 295042)
+++ trunk/Source/bmalloc/libpas/src/libpas/pas_utils.c	2022-05-31 05:49:51 UTC (rev 295043)
@@ -108,7 +108,7 @@
 {
 pas_log("[%d] pas assertion failed: ", getpid());
 pas_log("%s:%d: %s: assertion %s failed.\n", filename, line, function, _expression_);
-pas_crash_with_info_impl((uint64_t)filename, line, (uint64_t) function, (uint64_t) _expression_, 0xbeefbff0, 42, 1337);
+pas_crash_with_info_impl((uint64_t)filename, (uint64_t)line, (uint64_t)function, (uint64_t)_expression_, 0xbeefbff0, 42, 1337);
 }
 
 void pas_assertion_failed_no_inline_with_extra_detail(const char* filename, int line, const char* function, const char* _expression_, uint64_t extra)
@@ -115,7 +115,7 @@
 {
 pas_log("[%d] pas assertion failed (with extra detail): ", getpid());
 pas_log("%s:%d: %s: assertion %s failed. Extra data: %" PRIu64 ".\n", filename, line, function, _expression_, extra);
-pas_crash_with_info_impl((uint64_t)filename, line, (uint64_t) function, (uint64_t) _expression_, extra, 1337, 0xbeef0bff);
+pas_crash_with_info_impl((uint64_t)filename, (uint64_t)line, (uint64_t)function, (uint64_t)_expression_, extra, 1337, 0xbeef0bff);
 }
 
 void pas_panic_on_out_of_memory_error()






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


[webkit-changes] [295042] trunk/.clangd

2022-05-30 Thread ysuzuki
Title: [295042] trunk/.clangd








Revision 295042
Author ysuz...@apple.com
Date 2022-05-30 21:50:57 -0700 (Mon, 30 May 2022)


Log Message
Clangd should always interpret headers as C++
https://bugs.webkit.org/show_bug.cgi?id=241118

Reviewed by Saam Barati.

Attach `-xc++` flag to headers in .clangd to interpret all headers as C++ by default.

* .clangd:

Canonical link: https://commits.webkit.org/251137@main

Modified Paths

trunk/.clangd




Diff

Modified: trunk/.clangd (295041 => 295042)

--- trunk/.clangd	2022-05-31 04:18:39 UTC (rev 295041)
+++ trunk/.clangd	2022-05-31 04:50:57 UTC (rev 295042)
@@ -1,7 +1,7 @@
 If:
 PathMatch: [.*\.h]
 CompileFlags:
-Add: [--include=config.h]
+Add: [-xc++, --include=config.h]
 ---
 If:
 PathMatch: [.*\.cpp]






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


[webkit-changes] [295041] trunk/Source/WebCore/Modules/websockets/ ThreadableWebSocketChannel.cpp

2022-05-30 Thread Hironori . Fujii
Title: [295041] trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp








Revision 295041
Author hironori.fu...@sony.com
Date 2022-05-30 21:18:39 -0700 (Mon, 30 May 2022)


Log Message
REGRESSION(251043@main): "ASSERTION FAILED: channel" in WebCore::ThreadableWebSocketChannel::create
https://bugs.webkit.org/show_bug.cgi?id=241087

Reviewed by Don Olmstead.

Since 251043@main, WinCairo WK1 was crashing for WebSocket tests.
`channel` variable was null in `ThreadableWebSocketChannel::create`.
In the case, it should call WebSocketChannel::create like Mac port
does.

* Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):

Canonical link: https://commits.webkit.org/251136@main

Modified Paths

trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp




Diff

Modified: trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp (295040 => 295041)

--- trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp	2022-05-31 04:13:54 UTC (rev 295040)
+++ trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp	2022-05-31 04:18:39 UTC (rev 295041)
@@ -53,19 +53,21 @@
 
 Ref ThreadableWebSocketChannel::create(Document& document, WebSocketChannelClient& client, SocketProvider& provider)
 {
-#if USE(SOUP) || USE(CURL)
-auto channel = provider.createWebSocketChannel(document, client);
-ASSERT(channel);
-return channel.releaseNonNull();
+#if USE(CURL) || USE(SOUP)
+bool enabled = true;
+#elif HAVE(NSURLSESSION_WEBSOCKET)
+bool enabled = RuntimeEnabledFeatures::sharedFeatures().isNSURLSessionWebSocketEnabled();
 #else
-
-#if HAVE(NSURLSESSION_WEBSOCKET)
-if (RuntimeEnabledFeatures::sharedFeatures().isNSURLSessionWebSocketEnabled()) {
+bool enabled = false;
+#endif
+if (enabled) {
 if (auto channel = provider.createWebSocketChannel(document, client))
 return channel.releaseNonNull();
 }
-#endif
 
+#if USE(SOUP)
+RELEASE_ASSERT_NOT_REACHED();
+#else
 return WebSocketChannel::create(document, client, provider);
 #endif
 }






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


[webkit-changes] [295040] trunk/Source

2022-05-30 Thread ysuzuki
Title: [295040] trunk/Source








Revision 295040
Author ysuz...@apple.com
Date 2022-05-30 21:13:54 -0700 (Mon, 30 May 2022)


Log Message
[JSC] Make VMEntryScope cheap
https://bugs.webkit.org/show_bug.cgi?id=241091

Reviewed by Mark Lam.

This patch makes VMEntryScope cheap. In some microbenchmarks, we observe repeated execution of VMEntryScope
because of many ticks driven by microtasks. And currently VMEntryScope is designed to be non-cheap based on
the assumption that this is not frequently executed.

1. We add isJSThread flag to Thread so that we can skip some of unnecessary initializations.
2. Appropriately set UNLIKELY / LIKELY for the major path.
3. Make DateCache::resetIfNecessary fast path inlined.

ToT
Time(doxbee-async-es2017-native): 24 ms.
Time(doxbee-promises-es2015-native): 44.9 ms.
Time(fibonacci-async-es2017-native): 197.6 ms.
Time(parallel-async-es2017-native): 109.1 ms.
Time(parallel-promises-es2015-native): 80.4 ms.

Patched
Time(doxbee-async-es2017-native): 21.4 ms.
Time(doxbee-promises-es2015-native): 36.4 ms.
Time(fibonacci-async-es2017-native): 168.1 ms.
Time(parallel-async-es2017-native): 103.7 ms.
Time(parallel-promises-es2015-native): 70.9 ms.

* Source/_javascript_Core/runtime/JSDateMath.cpp:
(JSC::DateCache::resetIfNecessarySlow):
(JSC::DateCache::resetIfNecessary): Deleted.
* Source/_javascript_Core/runtime/JSDateMath.h:
(JSC::DateCache::resetIfNecessary):
* Source/_javascript_Core/runtime/VM.h:
(JSC::VM::firePrimitiveGigacageEnabledIfNecessary):
* Source/_javascript_Core/runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
* Source/WTF/wtf/Threading.cpp:
(WTF::Thread::registerJSThread):
* Source/WTF/wtf/Threading.h:

Canonical link: https://commits.webkit.org/251135@main

Modified Paths

trunk/Source/_javascript_Core/runtime/JSDateMath.cpp
trunk/Source/_javascript_Core/runtime/JSDateMath.h
trunk/Source/_javascript_Core/runtime/VM.h
trunk/Source/_javascript_Core/runtime/VMEntryScope.cpp
trunk/Source/WTF/wtf/Threading.cpp
trunk/Source/WTF/wtf/Threading.h




Diff

Modified: trunk/Source/_javascript_Core/runtime/JSDateMath.cpp (295039 => 295040)

--- trunk/Source/_javascript_Core/runtime/JSDateMath.cpp	2022-05-31 01:26:39 UTC (rev 295039)
+++ trunk/Source/_javascript_Core/runtime/JSDateMath.cpp	2022-05-31 04:13:54 UTC (rev 295040)
@@ -100,7 +100,7 @@
 namespace JSC {
 
 #if PLATFORM(COCOA)
-static std::atomic lastTimeZoneID { 1 };
+std::atomic lastTimeZoneID { 1 };
 #endif
 
 #if HAVE(ICU_C_TIMEZONE_API)
@@ -470,14 +470,8 @@
 #endif
 }
 
-void DateCache::resetIfNecessary()
+void DateCache::resetIfNecessarySlow()
 {
-#if PLATFORM(COCOA)
-if (m_cachedTimezoneID == lastTimeZoneID)
-return;
-m_cachedTimezoneID = lastTimeZoneID;
-#endif
-
 // FIXME: We should clear it only when we know the timezone has been changed on Non-Cocoa platforms.
 // https://bugs.webkit.org/show_bug.cgi?id=218365
 m_timeZoneCache.reset();


Modified: trunk/Source/_javascript_Core/runtime/JSDateMath.h (295039 => 295040)

--- trunk/Source/_javascript_Core/runtime/JSDateMath.h	2022-05-31 01:26:39 UTC (rev 295039)
+++ trunk/Source/_javascript_Core/runtime/JSDateMath.h	2022-05-31 04:13:54 UTC (rev 295040)
@@ -54,6 +54,10 @@
 
 static constexpr double minECMAScriptTime = -8.64E15;
 
+#if PLATFORM(COCOA)
+extern JS_EXPORT_PRIVATE std::atomic lastTimeZoneID;
+#endif
+
 // We do not expose icu::TimeZone in this header file. And we cannot use icu::TimeZone forward declaration
 // because icu namespace can be an alias to icu$verNum namespace.
 struct OpaqueICUTimeZoneDeleter {
@@ -77,8 +81,18 @@
 DateCache();
 ~DateCache();
 
-JS_EXPORT_PRIVATE void resetIfNecessary();
+void resetIfNecessary()
+{
+#if PLATFORM(COCOA)
+if (LIKELY(m_cachedTimezoneID == lastTimeZoneID))
+return;
+m_cachedTimezoneID = lastTimeZoneID;
+#endif
+resetIfNecessarySlow();
+}
 
+JS_EXPORT_PRIVATE void resetIfNecessarySlow();
+
 String defaultTimeZone();
 String timeZoneDisplayName(bool isDST);
 Ref cachedDateInstanceData(double millisecondsFromEpoch);


Modified: trunk/Source/_javascript_Core/runtime/VM.h (295039 => 295040)

--- trunk/Source/_javascript_Core/runtime/VM.h	2022-05-31 01:26:39 UTC (rev 295039)
+++ trunk/Source/_javascript_Core/runtime/VM.h	2022-05-31 04:13:54 UTC (rev 295040)
@@ -662,7 +662,7 @@
 
 void firePrimitiveGigacageEnabledIfNecessary()
 {
-if (m_needToFirePrimitiveGigacageEnabled) {
+if (UNLIKELY(m_needToFirePrimitiveGigacageEnabled)) {
 m_needToFirePrimitiveGigacageEnabled = false;
 m_primitiveGigacageEnabled.fireAll(*this, "Primitive gigacage disabled asynchronously");
 }


Modified: trunk/Source/_javascript_Core/runtime/VMEntryScope.cpp (295039 => 295040)

--- trunk/Source/_javascript_Core/runtime/VMEntryScope.cpp	2022-05-31 01:26:39 UTC (rev 295039)
+++ 

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

2022-05-30 Thread zalan
Title: [295039] trunk/Source/WebCore








Revision 295039
Author za...@apple.com
Date 2022-05-30 18:26:39 -0700 (Mon, 30 May 2022)


Log Message
Move core flex layout to FlexLayout
https://bugs.webkit.org/show_bug.cgi?id=241106

Reviewed by Antti Koivisto.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::convertFlexItemsToLogicalSpace):
(WebCore::Layout::FlexFormattingContext::setFlexItemsGeometry):
(WebCore::Layout::FlexFormattingContext::layoutInFlowContentForIntegration):
(WebCore::Layout::FlexFormattingContext::computeAvailableLogicalVerticalSpace const): Deleted.
(WebCore::Layout::FlexFormattingContext::computeAvailableLogicalHorizontalSpace const): Deleted.
(WebCore::Layout::FlexFormattingContext::computeLogicalWidthForShrinkingFlexItems): Deleted.
(WebCore::Layout::FlexFormattingContext::computeLogicalWidthForStretchingFlexItems): Deleted.
(WebCore::Layout::FlexFormattingContext::computeLogicalWidthForFlexItems): Deleted.
(WebCore::Layout::FlexFormattingContext::computeLogicalHeightForFlexItems): Deleted.
(WebCore::Layout::FlexFormattingContext::alignFlexItems): Deleted.
(WebCore::Layout::FlexFormattingContext::justifyFlexItems): Deleted.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h:
* Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp: Added.
(WebCore::Layout::FlexLayout::FlexLayout):
(WebCore::Layout::FlexLayout::computeAvailableLogicalVerticalSpace const):
(WebCore::Layout::FlexLayout::computeAvailableLogicalHorizontalSpace const):
(WebCore::Layout::FlexLayout::computeLogicalWidthForShrinkingFlexItems):
(WebCore::Layout::FlexLayout::computeLogicalWidthForStretchingFlexItems):
(WebCore::Layout::FlexLayout::computeLogicalWidthForFlexItems):
(WebCore::Layout::FlexLayout::computeLogicalHeightForFlexItems):
(WebCore::Layout::FlexLayout::alignFlexItems):
(WebCore::Layout::FlexLayout::justifyFlexItems):
(WebCore::Layout::FlexLayout::layout):
* Source/WebCore/layout/formattingContexts/flex/FlexLayout.h: Copied from Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h.
(WebCore::Layout::FlexLayout::formattingState const):
(WebCore::Layout::FlexLayout::flexBoxStyle const):

Canonical link: https://commits.webkit.org/251134@main

Modified Paths

trunk/Source/WebCore/Headers.cmake
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h


Added Paths

trunk/Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp
trunk/Source/WebCore/layout/formattingContexts/flex/FlexLayout.h




Diff

Modified: trunk/Source/WebCore/Headers.cmake (295038 => 295039)

--- trunk/Source/WebCore/Headers.cmake	2022-05-30 23:59:45 UTC (rev 295038)
+++ trunk/Source/WebCore/Headers.cmake	2022-05-31 01:26:39 UTC (rev 295039)
@@ -982,6 +982,7 @@
 
 layout/formattingContexts/flex/FlexFormattingConstraints.h
 layout/formattingContexts/flex/FlexFormattingState.h
+layout/formattingContexts/flex/FlexLayout.h
 
 layout/formattingContexts/inline/display/InlineDisplayBox.h
 layout/formattingContexts/inline/InlineRect.h


Modified: trunk/Source/WebCore/Sources.txt (295038 => 295039)

--- trunk/Source/WebCore/Sources.txt	2022-05-30 23:59:45 UTC (rev 295038)
+++ trunk/Source/WebCore/Sources.txt	2022-05-31 01:26:39 UTC (rev 295039)
@@ -1567,6 +1567,7 @@
 layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingQuirks.cpp
 layout/formattingContexts/flex/FlexFormattingContext.cpp
 layout/formattingContexts/flex/FlexFormattingGeometry.cpp
+layout/formattingContexts/flex/FlexLayout.cpp
 layout/formattingContexts/flex/FlexFormattingState.cpp
 layout/floats/FloatAvoider.cpp
 layout/floats/FloatingContext.cpp


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (295038 => 295039)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-05-30 23:59:45 UTC (rev 295038)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-05-31 01:26:39 UTC (rev 295039)
@@ -2220,6 +2220,7 @@
 		6ED878C5147493F4004C3597 /* RenderTableCaption.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ED878C3147493F4004C3597 /* RenderTableCaption.h */; };
 		6ED8C37A183BFF8C009E53BD /* BoxShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ED8C378183BFF8C009E53BD /* BoxShape.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */; };
+		6F047A9228453EDB00C25EE7 /* FlexLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F047A9128453EDB00C25EE7 /* FlexLayout.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		6F0B98B523F268EC00EEC2F2 

[webkit-changes] [295038] trunk/Source/WebCore/platform/graphics/cocoa/ FontCacheCoreText.cpp

2022-05-30 Thread mmaxfield
Title: [295038] trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp








Revision 295038
Author mmaxfi...@apple.com
Date 2022-05-30 16:59:45 -0700 (Mon, 30 May 2022)


Log Message
[Cocoa] Rename [de]normalizeWeight() to [de]normalizeGXWeight()
https://bugs.webkit.org/show_bug.cgi?id=241112

Reviewed by Alan Bujtas.

Weights are measured in 3 different scales:
1. CSS weights (1 - 999)
2. Core Text weights (-1.0 - 1.0)
3. TrueType GX weights (0.0ish to 2.0ish, it's not really defined, only the "default" value
   of 1.0 is defined).

Our current functions convert between CSS weights and TrueType GX weights, so this makes that more
clear. A subsequent patch will add conversions between CSS weights and Core Text weights.

No new tests because there is no behavior change.

* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::normalizeGXWeight):
(WebCore::denormalizeGXWeight):
(WebCore::preparePlatformFont):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::normalizeWeight): Deleted.
(WebCore::denormalizeWeight): Deleted.

Canonical link: https://commits.webkit.org/251132@main

Modified Paths

trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp




Diff

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (295037 => 295038)

--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2022-05-30 23:58:55 UTC (rev 295037)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2022-05-30 23:59:45 UTC (rev 295038)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -364,7 +364,7 @@
 
 // These values were calculated by performing a linear regression on the CSS weights/widths/slopes and Core Text weights/widths/slopes of San Francisco.
 // FIXME:  Get the real values from Core Text.
-static inline float normalizeWeight(float value)
+static inline float normalizeGXWeight(float value)
 {
 return 523.7 * value - 109.3;
 }
@@ -374,7 +374,7 @@
 return value * 300;
 }
 
-static inline float denormalizeWeight(float value)
+static inline float denormalizeGXWeight(float value)
 {
 return (value + 109.3) / 523.7;
 }
@@ -605,7 +605,7 @@
 if (auto slopeValue = fontCreationContext.fontFaceCapabilities().weight)
 slope = std::max(std::min(slope, static_cast(slopeValue->maximum)), static_cast(slopeValue->minimum));
 if (needsConversion) {
-weight = denormalizeWeight(weight);
+weight = denormalizeGXWeight(weight);
 width = denormalizeVariationWidth(width);
 slope = denormalizeSlope(slope);
 }
@@ -1064,7 +1064,7 @@
 
 if (FontType(font.get()).variationType == FontType::VariationType::TrueTypeGX && !optOutFromGXNormalization) {
 if (result.weight)
-result.weight = { { normalizeWeight(result.weight.value().minimum), normalizeWeight(result.weight.value().maximum) } };
+result.weight = { { normalizeGXWeight(result.weight.value().minimum), normalizeGXWeight(result.weight.value().maximum) } };
 if (result.width)
 result.width = { { normalizeVariationWidth(result.width.value().minimum), normalizeVariationWidth(result.width.value().maximum) } };
 if (result.slope)






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


[webkit-changes] [295037] trunk/Source/WTF/wtf/RAMSize.cpp

2022-05-30 Thread commit-queue
Title: [295037] trunk/Source/WTF/wtf/RAMSize.cpp








Revision 295037
Author commit-qu...@webkit.org
Date 2022-05-30 16:58:55 -0700 (Mon, 30 May 2022)


Log Message
Include  on FreeBSD too
https://bugs.webkit.org/show_bug.cgi?id=241099

Patch by Leonardo Taccari  on 2022-05-30
Reviewed by Fujii Hironori.

sysinfo(2)/sysinfo(3) is used also in FreeBSD, include corresponding
 header too.

* Source/WTF/wtf/RAMSize.cpp:

Canonical link: https://commits.webkit.org/251132@main

Modified Paths

trunk/Source/WTF/wtf/RAMSize.cpp




Diff

Modified: trunk/Source/WTF/wtf/RAMSize.cpp (295036 => 295037)

--- trunk/Source/WTF/wtf/RAMSize.cpp	2022-05-30 23:41:10 UTC (rev 295036)
+++ trunk/Source/WTF/wtf/RAMSize.cpp	2022-05-30 23:58:55 UTC (rev 295037)
@@ -31,11 +31,11 @@
 #if OS(WINDOWS)
 #include 
 #elif USE(SYSTEM_MALLOC)
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
 #include 
 #elif OS(UNIX)
 #include 
-#endif // OS(LINUX) || OS(UNIX)
+#endif // OS(LINUX) || OS(FREEBSD) || OS(UNIX)
 #else
 #include 
 #endif






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


[webkit-changes] [295036] trunk/Source/JavaScriptCore/heap

2022-05-30 Thread ysuzuki
Title: [295036] trunk/Source/_javascript_Core/heap








Revision 295036
Author ysuz...@apple.com
Date 2022-05-30 16:41:10 -0700 (Mon, 30 May 2022)


Log Message
[JSC] Make Strong::set cheap
https://bugs.webkit.org/show_bug.cgi?id=241090

Reviewed by Mark Lam.

HandleSet::writeBarrier is frequently called because it is called every time we set a value in Strong<>.
This patch optimizes it,

1. We should make it inline function since it has a super fast path major use can be covered. And this function is small.
2. We should not always remove a node from the list first. We should insert / remove it only when necessary.
3. Remove m_immediateList since it is not necessary.
4. Make HandleNode as a derived class of BasicRawSentinelNode to make implementation simpler.

This change improves promise benchmarks score since promise uses microtasks which hold values via Strong<>.

ToT
Time(doxbee-async-bluebird): 42.8 ms.
Time(doxbee-async-es2017-babel): 36.4 ms.
Time(doxbee-async-es2017-native): 28.3 ms.
Time(doxbee-promises-bluebird): 514.2 ms.
Time(doxbee-promises-es2015-native): 44.8 ms.
Time(fibonacci-async-es2017-babel): 380.5 ms.
Time(fibonacci-async-es2017-native): 218.2 ms.
Time(parallel-async-bluebird): 648.8 ms.
Time(parallel-async-es2017-babel): 116.9 ms.
Time(parallel-async-es2017-native): 115.6 ms.
Time(parallel-promises-bluebird): 638 ms.
Time(parallel-promises-es2015-native): 82 ms.

Patched
Time(doxbee-async-bluebird): 38 ms.
Time(doxbee-async-es2017-babel): 27 ms.
Time(doxbee-async-es2017-native): 19.5 ms.
Time(doxbee-promises-bluebird): 508.3 ms.
Time(doxbee-promises-es2015-native): 33.3 ms.
Time(fibonacci-async-es2017-babel): 349.1 ms.
Time(fibonacci-async-es2017-native): 151 ms.
Time(parallel-async-bluebird): 639.6 ms.
Time(parallel-async-es2017-babel): 100.9 ms.
Time(parallel-async-es2017-native): 101.9 ms.
Time(parallel-promises-bluebird): 614 ms.
Time(parallel-promises-es2015-native): 70.9 ms.

* Source/_javascript_Core/heap/HandleSet.cpp:
(JSC::HandleSet::writeBarrier): Deleted.
* Source/_javascript_Core/heap/HandleSet.h:
(JSC::HandleSet::heapFor):
(JSC::HandleSet::allocate):
(JSC::HandleSet::deallocate):
(JSC::HandleSet::writeBarrier):
(JSC::HandleSet::toHandle): Deleted.
(JSC::HandleSet::toNode): Deleted.
(JSC::HandleNode::HandleNode): Deleted.
(JSC::HandleNode::setPrev): Deleted.
(JSC::HandleNode::prev): Deleted.
(JSC::HandleNode::setNext): Deleted.
(JSC::HandleNode::next): Deleted.
* Source/_javascript_Core/heap/Strong.h:
(JSC::Strong::set):

Canonical link: https://commits.webkit.org/251131@main

Modified Paths

trunk/Source/_javascript_Core/heap/HandleSet.cpp
trunk/Source/_javascript_Core/heap/HandleSet.h
trunk/Source/_javascript_Core/heap/Strong.h




Diff

Modified: trunk/Source/_javascript_Core/heap/HandleSet.cpp (295035 => 295036)

--- trunk/Source/_javascript_Core/heap/HandleSet.cpp	2022-05-30 22:10:58 UTC (rev 295035)
+++ trunk/Source/_javascript_Core/heap/HandleSet.cpp	2022-05-30 23:41:10 UTC (rev 295036)
@@ -70,27 +70,6 @@
 template void HandleSet::visitStrongHandles(AbstractSlotVisitor&);
 template void HandleSet::visitStrongHandles(SlotVisitor&);
 
-void HandleSet::writeBarrier(HandleSlot slot, const JSValue& value)
-{
-if (!value == !*slot && slot->isCell() == value.isCell())
-return;
-
-Node* node = toNode(slot);
-#if ENABLE(GC_VALIDATION)
-RELEASE_ASSERT(isLiveNode(node));
-#endif
-SentinelLinkedList::remove(node);
-if (!value || !value.isCell()) {
-m_immediateList.push(node);
-return;
-}
-
-m_strongList.push(node);
-#if ENABLE(GC_VALIDATION)
-RELEASE_ASSERT(isLiveNode(node));
-#endif
-}
-
 unsigned HandleSet::protectedGlobalObjectCount()
 {
 unsigned count = 0;


Modified: trunk/Source/_javascript_Core/heap/HandleSet.h (295035 => 295036)

--- trunk/Source/_javascript_Core/heap/HandleSet.h	2022-05-30 22:10:58 UTC (rev 295035)
+++ trunk/Source/_javascript_Core/heap/HandleSet.h	2022-05-30 23:41:10 UTC (rev 295036)
@@ -39,24 +39,20 @@
 class VM;
 class JSValue;
 
-class HandleNode {
+class HandleNode final : public BasicRawSentinelNode {
 public:
-HandleNode(WTF::SentinelTag);
-HandleNode();
+HandleNode() = default;
 
 HandleSlot slot();
 HandleSet* handleSet();
 
-void setPrev(HandleNode*);
-HandleNode* prev();
+static HandleNode* toHandleNode(HandleSlot slot)
+{
+return bitwise_cast(bitwise_cast(slot) - OBJECT_OFFSETOF(HandleNode, m_value));
+}
 
-void setNext(HandleNode*);
-HandleNode* next();
-
 private:
-JSValue m_value;
-HandleNode* m_prev;
-HandleNode* m_next;
+JSValue m_value { };
 };
 
 class HandleSet {
@@ -74,7 +70,8 @@
 
 template void visitStrongHandles(Visitor&);
 
-JS_EXPORT_PRIVATE void writeBarrier(HandleSlot, 

[webkit-changes] [295034] trunk

2022-05-30 Thread Hironori . Fujii
Title: [295034] trunk








Revision 295034
Author hironori.fu...@sony.com
Date 2022-05-30 15:03:33 -0700 (Mon, 30 May 2022)


Log Message
WebKitTestRunner shouldn't link object files of _javascript_Core and WebCore
https://bugs.webkit.org/show_bug.cgi?id=241002

Reviewed by Don Olmstead.

243269@main removed `WebKit` from `WebKitTestRunner_FRAMEWORKS` for
WPE. But, it should be there not to link object files of
_javascript_Core and WebCore to WebKitTestRunner. In WPE builds,
_javascript_Core and WebCore API are exported from WebKit shared
library. WebKit consumers shouldn't link with object files of
_javascript_Core and WebCore.

However, adding `WebKit` to `WebKitTestRunner_FRAMEWORKS` introduced a
new problem that the object file of LowLevelInterpreter.cpp was linked
into WebKitTestRunner. This problem was fixed by changing
LowLevelInterpreterLib to a STATIC library.

* Source/_javascript_Core/CMakeLists.txt:
* Tools/WebKitTestRunner/CMakeLists.txt:
* Tools/WebKitTestRunner/PlatformGTK.cmake:
* Tools/WebKitTestRunner/PlatformWin.cmake:

Canonical link: https://commits.webkit.org/251129@main

Modified Paths

trunk/Source/_javascript_Core/CMakeLists.txt
trunk/Tools/WebKitTestRunner/CMakeLists.txt
trunk/Tools/WebKitTestRunner/PlatformGTK.cmake
trunk/Tools/WebKitTestRunner/PlatformWin.cmake




Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (295033 => 295034)

--- trunk/Source/_javascript_Core/CMakeLists.txt	2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2022-05-30 22:03:33 UTC (rev 295034)
@@ -463,7 +463,7 @@
 COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${_javascript_Core_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj ${_javascript_Core_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
 VERBATIM)
 list(APPEND _javascript_Core_SOURCES ${_javascript_Core_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj)
-add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp)
+add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp)
 else ()
 # As there's poor toolchain support for using `.file` directives in
 # inline asm (i.e. there's no way to avoid clashes with the `.file`
@@ -472,7 +472,7 @@
 # an object file. We only need to do this for LowLevelInterpreter.cpp
 # and cmake doesn't allow us to introduce a compiler wrapper for a
 # single source file, so we need to create a separate target for it.
-add_library(LowLevelInterpreterLib OBJECT llint/LowLevelInterpreter.cpp
+add_library(LowLevelInterpreterLib STATIC llint/LowLevelInterpreter.cpp
 ${_javascript_Core_DERIVED_SOURCES_DIR}/${LLIntOutput})
 endif ()
 
@@ -1489,13 +1489,7 @@
 COMPILE_OPTIONS "-fno-lto")
 endif ()
 
-# When building _javascript_Core as an object library, we need to make sure the
-# lowlevelinterpreter lib objects get propogated.
-if (${_javascript_Core_LIBRARY_TYPE} STREQUAL "OBJECT")
-list(APPEND _javascript_Core_PRIVATE_LIBRARIES $)
-else ()
-list(APPEND _javascript_Core_SOURCES $)
-endif ()
+list(APPEND _javascript_Core_PRIVATE_LIBRARIES LowLevelInterpreterLib)
 
 WEBKIT_COMPUTE_SOURCES(_javascript_Core)
 WEBKIT_FRAMEWORK(_javascript_Core)


Modified: trunk/Tools/WebKitTestRunner/CMakeLists.txt (295033 => 295034)

--- trunk/Tools/WebKitTestRunner/CMakeLists.txt	2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Tools/WebKitTestRunner/CMakeLists.txt	2022-05-30 22:03:33 UTC (rev 295034)
@@ -26,6 +26,7 @@
 _javascript_Core
 WebCore
 WebCoreTestSupport
+WebKit
 )
 
 if (COMPILER_IS_GCC_OR_CLANG)


Modified: trunk/Tools/WebKitTestRunner/PlatformGTK.cmake (295033 => 295034)

--- trunk/Tools/WebKitTestRunner/PlatformGTK.cmake	2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Tools/WebKitTestRunner/PlatformGTK.cmake	2022-05-30 22:03:33 UTC (rev 295034)
@@ -33,10 +33,6 @@
 GTK::GTK
 )
 
-list(APPEND WebKitTestRunner_FRAMEWORKS
-WebKit
-)
-
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
 InjectedBundle/atspi/AccessibilityControllerAtspi.cpp
 InjectedBundle/atspi/AccessibilityNotificationHandler.cpp


Modified: trunk/Tools/WebKitTestRunner/PlatformWin.cmake (295033 => 295034)

--- trunk/Tools/WebKitTestRunner/PlatformWin.cmake	2022-05-30 21:59:54 UTC (rev 295033)
+++ trunk/Tools/WebKitTestRunner/PlatformWin.cmake	2022-05-30 22:03:33 UTC (rev 295034)
@@ -30,10 +30,6 @@
 Oleacc
 )
 
-list(APPEND WebKitTestRunner_FRAMEWORKS
-WebKit
-)
-
 list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
 $
 )






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


[webkit-changes] [295033] trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp

2022-05-30 Thread commit-queue
Title: [295033] trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp








Revision 295033
Author commit-qu...@webkit.org
Date 2022-05-30 14:59:54 -0700 (Mon, 30 May 2022)


Log Message
Include  only on FreeBSD and Linux
https://bugs.webkit.org/show_bug.cgi?id=241077

Patch by Leonardo Taccari  on 2022-05-30
Reviewed by Fujii Hironori.

sysinfo(2)/sysinfo(3) is used only on FreeBSD and Linux and could be not
available in other Unix-like operating systems.

* Source/bmalloc/bmalloc/AvailableMemory.cpp:

Canonical link: https://commits.webkit.org/251128@main

Modified Paths

trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp




Diff

Modified: trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp (295032 => 295033)

--- trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp	2022-05-30 18:07:24 UTC (rev 295032)
+++ trunk/Source/bmalloc/bmalloc/AvailableMemory.cpp	2022-05-30 21:59:54 UTC (rev 295033)
@@ -44,7 +44,9 @@
 #import 
 #import 
 #elif BOS(UNIX)
+#if BOS(FREEBSD) || BOS(LINUX)
 #include 
+#endif
 #if BOS(LINUX)
 #include 
 #include 






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


[webkit-changes] [295032] trunk/Source/WebCore/layout/formattingContexts/flex/ FlexFormattingContext.cpp

2022-05-30 Thread zalan
Title: [295032] trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp








Revision 295032
Author za...@apple.com
Date 2022-05-30 11:07:24 -0700 (Mon, 30 May 2022)


Log Message
Add support for justify-content: space-evenly
https://bugs.webkit.org/show_bug.cgi?id=241085

Reviewed by Antti Koivisto.

Distribute items evenly. Items have equal space around them.

* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::justifyFlexItems):

Canonical link: https://commits.webkit.org/251127@main

Modified Paths

trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp




Diff

Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (295031 => 295032)

--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp	2022-05-30 16:48:03 UTC (rev 295031)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp	2022-05-30 18:07:24 UTC (rev 295032)
@@ -476,6 +476,8 @@
 return LayoutUnit { };
 case ContentDistribution::SpaceAround:
 return (availableSpace - contentLogicalWidth) / logicalFlexItemList.size() / 2; 
+case ContentDistribution::SpaceEvenly:
+return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() + 1);
 default:
 ASSERT_NOT_IMPLEMENTED_YET();
 break;
@@ -511,6 +513,8 @@
 return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() - 1); 
 case ContentDistribution::SpaceAround:
 return (availableSpace - contentLogicalWidth) / logicalFlexItemList.size(); 
+case ContentDistribution::SpaceEvenly:
+return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() + 1);
 default:
 ASSERT_NOT_IMPLEMENTED_YET();
 break;






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


[webkit-changes] [295031] trunk

2022-05-30 Thread commit-queue
Title: [295031] trunk








Revision 295031
Author commit-qu...@webkit.org
Date 2022-05-30 09:48:03 -0700 (Mon, 30 May 2022)


Log Message
MediaStreamTrack.getConstraints is empty object
https://bugs.webkit.org/show_bug.cgi?id=240569

Patch by Youenn Fablet  on 2022-05-30
Reviewed by Eric Carlson.

Cover audio and video constraints in UserMediaRequest.
Set these constraints on the created tracks at promise resolution time.

Make a refactoring to move from using RefPtr to Ref.
Remove use of MediaStream::getTracks since it is not efficient.

Covered by updated tests.

* Source/WebCore/Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia):
(WebCore::MediaDevices::getDisplayMedia):
* Source/WebCore/Modules/mediastream/MediaDevices.h:
* Source/WebCore/Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::clone):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::getFirstAudioTrack const):
(WebCore::MediaStream::getFirstVideoTrack const):
(WebCore::MediaStream::getTracks const):
(WebCore::MediaStream::internalAddTrack):
(WebCore::MediaStream::internalTakeTrack):
(WebCore::MediaStream::mediaState const):
(WebCore::MediaStream::updateActiveState):
(WebCore::MediaStream::filteredTracks const):
* Source/WebCore/Modules/mediastream/MediaStream.h:
* Source/WebCore/Modules/mediastream/MediaStreamTrack.h:
(WebCore::MediaStreamTrack::setConstraints):
* Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create):
(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::allow):
* Source/WebCore/Modules/mediastream/UserMediaRequest.h:
* LayoutTests/fast/mediastream/getDisplayMedia-max-constraints3.html:
* LayoutTests/fast/mediastream/getUserMedia-webaudio.html:
* LayoutTests/fast/mediastream/mediastreamtrack-video-clone.html:

Canonical link: https://commits.webkit.org/251126@main

Modified Paths

trunk/LayoutTests/fast/mediastream/getDisplayMedia-max-constraints3.html
trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html
trunk/LayoutTests/fast/mediastream/mediastreamtrack-video-clone.html
trunk/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp
trunk/Source/WebCore/Modules/mediastream/MediaDevices.h
trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp
trunk/Source/WebCore/Modules/mediastream/MediaStream.h
trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h
trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp
trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h
trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp




Diff

Modified: trunk/LayoutTests/fast/mediastream/getDisplayMedia-max-constraints3.html (295030 => 295031)

--- trunk/LayoutTests/fast/mediastream/getDisplayMedia-max-constraints3.html	2022-05-30 16:44:45 UTC (rev 295030)
+++ trunk/LayoutTests/fast/mediastream/getDisplayMedia-max-constraints3.html	2022-05-30 16:48:03 UTC (rev 295031)
@@ -20,6 +20,8 @@
 
 promise_test(async (test) => {
 const stream = await callGetDisplayMedia({ video: { height: { max: 50 }, width : { max : 50 } } });
+assert_equals(stream.getVideoTracks()[0].getConstraints().height.max, 50);
+assert_equals(stream.getVideoTracks()[0].getConstraints().width.max, 50);
 
 await waitForHeight(stream.getVideoTracks()[0], defaultHeight);
 


Modified: trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html (295030 => 295031)

--- trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html	2022-05-30 16:44:45 UTC (rev 295030)
+++ trunk/LayoutTests/fast/mediastream/getUserMedia-webaudio.html	2022-05-30 16:48:03 UTC (rev 295031)
@@ -104,6 +104,7 @@
 context = new AudioContext();
 
 let stream = await navigator.mediaDevices.getUserMedia({audio: { echoCancellation : true}});
+assert_true(stream.getAudioTracks()[0].getConstraints().echoCancellation);
 assert_true(stream.getAudioTracks()[0].getSettings().echoCancellation);
 assert_true(await checkForNoise(stream, false), "should not hear noise");
 


Modified: trunk/LayoutTests/fast/mediastream/mediastreamtrack-video-clone.html (295030 => 295031)

--- trunk/LayoutTests/fast/mediastream/mediastreamtrack-video-clone.html	2022-05-30 16:44:45 UTC (rev 295030)
+++ trunk/LayoutTests/fast/mediastream/mediastreamtrack-video-clone.html	2022-05-30 16:48:03 UTC (rev 295031)
@@ -15,7 +15,10 @@
 
 

[webkit-changes] [295030] trunk/Source/WebCore/layout/formattingContexts/flex/ FlexFormattingContext.cpp

2022-05-30 Thread zalan
Title: [295030] trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp








Revision 295030
Author za...@apple.com
Date 2022-05-30 09:44:45 -0700 (Mon, 30 May 2022)


Log Message
Add support for justify-content: space-around
https://bugs.webkit.org/show_bug.cgi?id=241084

Reviewed by Antti Koivisto.

Distribute items evenly. Items have a half-size space on either end.

* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::justifyFlexItems):

Canonical link: https://commits.webkit.org/251125@main

Modified Paths

trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp




Diff

Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (295029 => 295030)

--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp	2022-05-30 15:20:07 UTC (rev 295029)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp	2022-05-30 16:44:45 UTC (rev 295030)
@@ -474,6 +474,8 @@
 break;
 case ContentDistribution::SpaceBetween:
 return LayoutUnit { };
+case ContentDistribution::SpaceAround:
+return (availableSpace - contentLogicalWidth) / logicalFlexItemList.size() / 2; 
 default:
 ASSERT_NOT_IMPLEMENTED_YET();
 break;
@@ -507,6 +509,8 @@
 if (logicalFlexItemList.size() == 1)
 return LayoutUnit { };
 return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() - 1); 
+case ContentDistribution::SpaceAround:
+return (availableSpace - contentLogicalWidth) / logicalFlexItemList.size(); 
 default:
 ASSERT_NOT_IMPLEMENTED_YET();
 break;






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


[webkit-changes] [295029] trunk/Source/WebCore/platform/graphics/cpu/arm/filters/ FEGaussianBlurNEON.h

2022-05-30 Thread psaavedra
Title: [295029] trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h








Revision 295029
Author psaave...@igalia.com
Date 2022-05-30 08:20:07 -0700 (Mon, 30 May 2022)


Log Message
[GPU Process][Filters] Don't use Uint8ClampedArray in software filter appliers also for FEGaussianBlurNEON
https://bugs.webkit.org/show_bug.cgi?id=240964

Reviewed by Said Abou-Hallawa.

This complement the changes done in r250982 by adapting the specific
method used for ARMv7 NEON.

* Source/WebCore/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h:
(WebCore::boxBlurNEON):

Canonical link: https://commits.webkit.org/251124@main

Modified Paths

trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h




Diff

Modified: trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h (295028 => 295029)

--- trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h	2022-05-30 14:18:34 UTC (rev 295028)
+++ trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h	2022-05-30 15:20:07 UTC (rev 295029)
@@ -34,11 +34,11 @@
 
 namespace WebCore {
 
-inline void boxBlurNEON(const Uint8ClampedArray& srcPixelArray, Uint8ClampedArray& dstPixelArray,
+inline void boxBlurNEON(const PixelBuffer& srcPixelBuffer, PixelBuffer& dstPixelBuffer,
 unsigned dx, int dxLeft, int dxRight, int stride, int strideLine, int effectWidth, int effectHeight)
 {
-const uint32_t* sourcePixel = reinterpret_cast(srcPixelArray.data());
-uint32_t* destinationPixel = reinterpret_cast(dstPixelArray.data());
+const uint32_t* sourcePixel = reinterpret_cast(srcPixelBuffer.bytes());
+uint32_t* destinationPixel = reinterpret_cast(dstPixelBuffer.bytes());
 
 float32x4_t deltaX = vdupq_n_f32(1.0 / dx);
 int pixelLine = strideLine / 4;






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


[webkit-changes] [295028] trunk/Source

2022-05-30 Thread dpino
Title: [295028] trunk/Source








Revision 295028
Author dp...@igalia.com
Date 2022-05-30 07:18:34 -0700 (Mon, 30 May 2022)


Log Message
Unreviewed, non-unified build fixes after 251082@main

* Source/WebCore/bindings/js/JSAttrCustom.cpp:
* Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp:
* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
* Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp:
* Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:
* Source/WebCore/bindings/js/JSDocumentCustom.cpp:
* Source/WebCore/bindings/js/JSFetchEventCustom.cpp:
* Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp:
* Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp:
* Source/WebCore/bindings/js/JSIDBCursorCustom.cpp:
* Source/WebCore/bindings/js/JSIntersectionObserverCustom.cpp:
* Source/WebCore/bindings/js/JSIntersectionObserverEntryCustom.cpp:
* Source/WebCore/bindings/js/JSMessageChannelCustom.cpp:
* Source/WebCore/bindings/js/JSMessagePortCustom.cpp:
* Source/WebCore/bindings/js/JSNodeCustom.cpp:
* Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp:
* Source/WebCore/bindings/js/JSPaintRenderingContext2DCustom.cpp:
* Source/WebCore/bindings/js/JSResizeObserverEntryCustom.cpp:
* Source/WebCore/bindings/js/JSSVGViewSpecCustom.cpp:
* Source/WebCore/bindings/js/JSStyleSheetCustom.cpp:
* Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp:
* Source/WebCore/bindings/js/JSUndoItemCustom.cpp:
* Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp:
* Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp:
* Source/WebCore/bindings/js/JSWebXRSessionCustom.cpp:
* Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp:
* Source/WebCore/bindings/js/JSWorkerNavigatorCustom.cpp:
* Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp:
* Source/WebCore/bindings/js/JSXPathResultCustom.cpp:
* Source/WebCore/html/HTMLCanvasElement.cpp:
* Source/WebCore/page/DOMWindowProperty.h:
* Source/WebCore/page/UndoManager.h:
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:

Canonical link: https://commits.webkit.org/251123@main

Modified Paths

trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp
trunk/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp
trunk/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp
trunk/Source/WebCore/bindings/js/JSFetchEventCustom.cpp
trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
trunk/Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp
trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp
trunk/Source/WebCore/bindings/js/JSIntersectionObserverCustom.cpp
trunk/Source/WebCore/bindings/js/JSIntersectionObserverEntryCustom.cpp
trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
trunk/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp
trunk/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
trunk/Source/WebCore/bindings/js/JSPaintRenderingContext2DCustom.cpp
trunk/Source/WebCore/bindings/js/JSResizeObserverEntryCustom.cpp
trunk/Source/WebCore/bindings/js/JSSVGViewSpecCustom.cpp
trunk/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp
trunk/Source/WebCore/bindings/js/JSUndoItemCustom.cpp
trunk/Source/WebCore/bindings/js/JSWebGL2RenderingContextCustom.cpp
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
trunk/Source/WebCore/bindings/js/JSWebXRSessionCustom.cpp
trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp
trunk/Source/WebCore/bindings/js/JSWorkerNavigatorCustom.cpp
trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
trunk/Source/WebCore/bindings/js/JSXPathResultCustom.cpp
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
trunk/Source/WebCore/page/DOMWindowProperty.h
trunk/Source/WebCore/page/UndoManager.h
trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp




Diff

Modified: trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp (295027 => 295028)

--- trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp	2022-05-30 14:10:13 UTC (rev 295027)
+++ trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp	2022-05-30 14:18:34 UTC (rev 295028)
@@ -30,6 +30,7 @@
 #include "JSAttr.h"
 
 #include "Element.h"
+#include "WebCoreOpaqueRoot.h"
 
 namespace WebCore {
 


Modified: trunk/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp (295027 => 295028)

--- trunk/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp	2022-05-30 14:10:13 UTC (rev 295027)
+++ trunk/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp	2022-05-30 14:18:34 UTC (rev 295028)
@@ -28,6 +28,7 @@
 
 #if ENABLE(WEB_AUDIO)
 #include "AudioBufferSourceNode.h"
+#include 

[webkit-changes] [295027] trunk/Source/WebCore/layout/formattingContexts/flex/ FlexFormattingContext.cpp

2022-05-30 Thread zalan
Title: [295027] trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp








Revision 295027
Author za...@apple.com
Date 2022-05-30 07:10:13 -0700 (Mon, 30 May 2022)


Log Message
Add support for justify-content: space-between
https://bugs.webkit.org/show_bug.cgi?id=241080

Reviewed by Antti Koivisto.

Distribute items evenly. The first item is flush with the start, the last is flush with the end.

* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::justifyFlexItems):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForFlexLayout):

Canonical link: https://commits.webkit.org/251122@main

Modified Paths

trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp




Diff

Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (295026 => 295027)

--- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp	2022-05-30 14:05:27 UTC (rev 295026)
+++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp	2022-05-30 14:10:13 UTC (rev 295027)
@@ -459,14 +459,25 @@
 void FlexFormattingContext::justifyFlexItems(LogicalFlexItems& logicalFlexItemList, LayoutUnit availableSpace)
 {
 auto justifyContent = root().style().justifyContent();
+// FIXME: Make this optional.
+auto contentLogicalWidth = [&] {
+auto logicalWidth = LayoutUnit { };
+for (auto& logicalFlexItem : logicalFlexItemList)
+logicalWidth += logicalFlexItem.rect.width();
+return logicalWidth;
+}();
 
 auto initialOffset = [&] {
-auto contentLogicalWidth = [&] {
-auto logicalWidth = LayoutUnit { };
-for (auto& logicalFlexItem : logicalFlexItemList)
-logicalWidth += logicalFlexItem.rect.width();
-return logicalWidth;
-};
+switch (justifyContent.distribution()) {
+case ContentDistribution::Default:
+// Fall back to justifyContent.position() 
+break;
+case ContentDistribution::SpaceBetween:
+return LayoutUnit { };
+default:
+ASSERT_NOT_IMPLEMENTED_YET();
+break;
+}
 
 switch (justifyContent.position()) {
 case ContentPosition::Normal:
@@ -477,20 +488,38 @@
 case ContentPosition::End:
 case ContentPosition::FlexEnd:
 case ContentPosition::Right:
-return availableSpace - contentLogicalWidth();
+return availableSpace - contentLogicalWidth;
 case ContentPosition::Center:
-return availableSpace / 2 - contentLogicalWidth() / 2;
+return availableSpace / 2 - contentLogicalWidth / 2;
 default:
 ASSERT_NOT_IMPLEMENTED_YET();
 break;
 }
+ASSERT_NOT_REACHED();
 return LayoutUnit { };
 };
 
+auto gapBetweenItems = [&] {
+switch (justifyContent.distribution()) {
+case ContentDistribution::Default:
+return LayoutUnit { };
+case ContentDistribution::SpaceBetween:
+if (logicalFlexItemList.size() == 1)
+return LayoutUnit { };
+return (availableSpace - contentLogicalWidth) / (logicalFlexItemList.size() - 1); 
+default:
+ASSERT_NOT_IMPLEMENTED_YET();
+break;
+}
+ASSERT_NOT_REACHED();
+return LayoutUnit { };
+};
+
 auto logicalLeft = initialOffset();
+auto gap = gapBetweenItems();
 for (auto& logicalFlexItem : logicalFlexItemList) {
 logicalFlexItem.rect.setLeft(logicalLeft);
-logicalLeft = logicalFlexItem.rect.right();
+logicalLeft = logicalFlexItem.rect.right() + gap;
 }
 }
 






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


[webkit-changes] [295026] trunk

2022-05-30 Thread commit-queue
Title: [295026] trunk








Revision 295026
Author commit-qu...@webkit.org
Date 2022-05-30 07:05:27 -0700 (Mon, 30 May 2022)


Log Message
REGRESSION (r293885): [ macOS wk2 ] webrtc/canvas-to-peer-connection.html is a consistent failure
https://bugs.webkit.org/show_bug.cgi?id=240814

Patch by Youenn Fablet  on 2022-05-30
Reviewed by Eric Carlson.

With r293885, we stopped using a pixel conformer to convert frames to YUV.
Instead, we used libyuv routines.
Libyuv is using BT.601 while our pixel conformer was using BT.709.
BT.709 is preferred in WebRTC so we now simply remove our conversion routine from RealtimeOutgoingVideoSourceCocoa.
Our hardware codecs can directly take RGB and convert it to YUV using BT.709.
To ensure we use the proper conversion routine, we add a RGB -> YUV conformer in LibWebRTCCodecsProxy.

Libvpx will use BT.601 routine so we do not have a very good story with VP8.
A follow-up should fix this. We add dedicated tests for both H264 and VP8.
We skip the new tests in glib as GTK bots do not like it.

* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios-simulator/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/webrtc/canvas-to-peer-connection.html:
* LayoutTests/webrtc/routines.js:
* Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
(WebCore::RealtimeOutgoingVideoSourceCocoa::videoFrameAvailable):
* Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
* Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
(WebCore::RealtimeOutgoingVideoSourceCocoa::pixelBufferPool): Deleted.
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
* Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

Canonical link: https://commits.webkit.org/251121@main

Modified Paths

trunk/LayoutTests/platform/glib/TestExpectations
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/LayoutTests/webrtc/canvas-to-peer-connection.html
trunk/LayoutTests/webrtc/routines.js
trunk/Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp
trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp
trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h
trunk/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm
trunk/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h
trunk/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm


Added Paths

trunk/LayoutTests/webrtc/canvas-to-peer-connection-2d-expected.txt
trunk/LayoutTests/webrtc/canvas-to-peer-connection-2d.html
trunk/LayoutTests/webrtc/canvas-to-peer-connection-vp8-2d-expected.txt
trunk/LayoutTests/webrtc/canvas-to-peer-connection-vp8-2d.html
trunk/LayoutTests/webrtc/canvas-to-peer-connection-vp8-expected.txt
trunk/LayoutTests/webrtc/canvas-to-peer-connection-vp8.html
trunk/LayoutTests/webrtc/canvas-to-peer-connection.js




Diff

Modified: trunk/LayoutTests/platform/glib/TestExpectations (295025 => 295026)

--- trunk/LayoutTests/platform/glib/TestExpectations	2022-05-30 13:54:04 UTC (rev 295025)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2022-05-30 14:05:27 UTC (rev 295026)
@@ -923,6 +923,9 @@
 webkit.org/b/235885 webrtc/audio-video-element-playing.html [ Timeout ]
 webkit.org/b/235885 webrtc/candidate-stats.html [ Failure ]
 webkit.org/b/235885 webrtc/canvas-to-peer-connection.html [ Failure ]
+webkit.org/b/235885 webrtc/canvas-to-peer-connection-2d.html [ Failure ]
+webkit.org/b/235885 webrtc/canvas-to-peer-connection-vp8-2d.html [ Failure ]
+webkit.org/b/235885 webrtc/canvas-to-peer-connection-vp8.html [ Failure ]
 webkit.org/b/235885 webrtc/captureCanvas-webrtc.html [ Timeout ]
 webkit.org/b/235885 webrtc/closing-peerconnection.html [ Timeout ]
 webkit.org/b/235885 webrtc/direction-change.html [ Failure ]


Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (295025 => 295026)

--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2022-05-30 13:54:04 UTC (rev 295025)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2022-05-30 14:05:27 UTC (rev 295026)
@@ -33,6 +33,9 @@
 imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer.html [ Failure ]
 
 webkit.org/b/235765 webrtc/canvas-to-peer-connection.html [ Failure ]
+webkit.org/b/235765 webrtc/canvas-to-peer-connection-2d.html [ Failure ]
+webkit.org/b/235765 webrtc/canvas-to-peer-connection-vp8.html [ Failure ]
+webkit.org/b/235765 webrtc/canvas-to-peer-connection-vp8-2d.html [ Failure ]
 
 # Simulator doesn't support WebAssembly.
 imported/w3c/web-platform-tests/wasm/wasm_stream_instantiate_test.html  [ Skip ]


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (295025 => 295026)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-05-30 13:54:04 UTC (rev 295025)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-05-30 14:05:27 UTC (rev 295026)
@@ 

[webkit-changes] [295024] trunk/Source/WebCore/accessibility

2022-05-30 Thread commit-queue
Title: [295024] trunk/Source/WebCore/accessibility








Revision 295024
Author commit-qu...@webkit.org
Date 2022-05-30 06:00:00 -0700 (Mon, 30 May 2022)


Log Message
Fix a11y build warnings
https://bugs.webkit.org/show_bug.cgi?id=241044

Patch by Michael Catanzaro  on 2022-05-30
Reviewed by Adrian Perez de Castro.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::symmetricRelation):
* Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp:
(WebCore::AXObjectCache::postPlatformNotification):

Canonical link: https://commits.webkit.org/251119@main

Modified Paths

trunk/Source/WebCore/accessibility/AXObjectCache.cpp
trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp




Diff

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (295023 => 295024)

--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-05-30 10:02:22 UTC (rev 295023)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-05-30 13:00:00 UTC (rev 295024)
@@ -3728,6 +3728,7 @@
 case AXRelationType::None:
 return AXRelationType::None;
 }
+RELEASE_ASSERT_NOT_REACHED();
 }
 
 AXRelationType AXObjectCache::attributeToRelationType(const QualifiedName& attribute)


Modified: trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp (295023 => 295024)

--- trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp	2022-05-30 10:02:22 UTC (rev 295023)
+++ trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp	2022-05-30 13:00:00 UTC (rev 295024)
@@ -199,6 +199,8 @@
 break;
 case AXPositionInSetChanged:
 break;
+case AXDescribedByChanged:
+break;
 }
 }
 






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


[webkit-changes] [295023] trunk/Source/WTF/wtf/CompactPtr.h

2022-05-30 Thread ysuzuki
Title: [295023] trunk/Source/WTF/wtf/CompactPtr.h








Revision 295023
Author ysuz...@apple.com
Date 2022-05-30 03:02:22 -0700 (Mon, 30 May 2022)


Log Message
Unreviewed, build fix for iOS debug build

* Source/WTF/wtf/CompactPtr.h:
(WTF::CompactPtr::encode):
(WTF::CompactPtr::decode):
(WTF::CompactPtr::decode const): Deleted.

Canonical link: https://commits.webkit.org/251118@main

Modified Paths

trunk/Source/WTF/wtf/CompactPtr.h




Diff

Modified: trunk/Source/WTF/wtf/CompactPtr.h (295022 => 295023)

--- trunk/Source/WTF/wtf/CompactPtr.h	2022-05-30 10:00:00 UTC (rev 295022)
+++ trunk/Source/WTF/wtf/CompactPtr.h	2022-05-30 10:02:22 UTC (rev 295023)
@@ -169,13 +169,13 @@
 set(t1);
 }
 
-static ALWAYS_INLINE constexpr StorageType encode(T* ptr)
+static ALWAYS_INLINE StorageType encode(T* ptr)
 {
 uintptr_t intPtr = bitwise_cast(ptr);
 #if HAVE(36BIT_ADDRESS)
-ASSERT_UNDER_CONSTEXPR_CONTEXT(!(intPtr & alignmentMask));
-StorageType encoded = static_cast(intPtr >> bitsShift);
-ASSERT_UNDER_CONSTEXPR_CONTEXT(decode(encoded) == ptr);
+ASSERT(!(intPtr & alignmentMask));
+StorageType encoded = static_cast(intPtr >> bitsShift);
+ASSERT(decode(encoded) == ptr);
 return encoded;
 #else
 return intPtr;
@@ -182,12 +182,12 @@
 #endif
 }
 
-ALWAYS_INLINE constexpr T* decode(const StorageType& ptr) const
+static ALWAYS_INLINE T* decode(StorageType ptr)
 {
 #if HAVE(36BIT_ADDRESS)
-return reinterpret_cast(static_cast(ptr) << bitsShift);
+return bitwise_cast(static_cast(ptr) << bitsShift);
 #else
-return reinterpret_cast(ptr);
+return bitwise_cast(ptr);
 #endif
 }
 






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


[webkit-changes] [295022] trunk/Source/JavaScriptCore/runtime

2022-05-30 Thread ysuzuki
Title: [295022] trunk/Source/_javascript_Core/runtime








Revision 295022
Author ysuz...@apple.com
Date 2022-05-30 03:00:00 -0700 (Mon, 30 May 2022)


Log Message
[JSC] Shrink BrandedStructure
https://bugs.webkit.org/show_bug.cgi?id=241092

Reviewed by Mark Lam.

Use CompactRefPtr and WriteBarrierStructureID to shrink sizeof(BrandedStructure) from 112 to 104.
While it is not enough for 32byte alignment, anyway we can make it smaller, and if we make it 8byte
smaller further, it will become 96bytes.

* Source/_javascript_Core/runtime/BrandedStructure.cpp:
(JSC::BrandedStructure::BrandedStructure):
* Source/_javascript_Core/runtime/BrandedStructure.h:

Canonical link: https://commits.webkit.org/251117@main

Modified Paths

trunk/Source/_javascript_Core/runtime/BrandedStructure.cpp
trunk/Source/_javascript_Core/runtime/BrandedStructure.h




Diff

Modified: trunk/Source/_javascript_Core/runtime/BrandedStructure.cpp (295021 => 295022)

--- trunk/Source/_javascript_Core/runtime/BrandedStructure.cpp	2022-05-30 08:29:03 UTC (rev 295021)
+++ trunk/Source/_javascript_Core/runtime/BrandedStructure.cpp	2022-05-30 10:00:00 UTC (rev 295022)
@@ -36,7 +36,7 @@
 , m_brand(brandUid)
 {
 if (previous->isBrandedStructure())
-m_parentBrand.set(vm, this, jsCast(previous));
+m_parentBrand.set(vm, this, previous);
 this->setIsBrandedStructure(true);
 }
 
@@ -43,7 +43,7 @@
 BrandedStructure::BrandedStructure(VM& vm, BrandedStructure* previous)
 : Structure(vm, previous)
 , m_brand(previous->m_brand)
-, m_parentBrand(vm, this, previous->m_parentBrand.get(), WriteBarrier::MayBeNull)
+, m_parentBrand(vm, this, previous->m_parentBrand.get(), WriteBarrierStructureID::MayBeNull)
 {
 this->setIsBrandedStructure(true);
 }


Modified: trunk/Source/_javascript_Core/runtime/BrandedStructure.h (295021 => 295022)

--- trunk/Source/_javascript_Core/runtime/BrandedStructure.h	2022-05-30 08:29:03 UTC (rev 295021)
+++ trunk/Source/_javascript_Core/runtime/BrandedStructure.h	2022-05-30 10:00:00 UTC (rev 295022)
@@ -53,7 +53,7 @@
 ALWAYS_INLINE bool checkBrand(Symbol* brand)
 {
 UniquedStringImpl* brandUid = >uid();
-for (BrandedStructure* currentStructure = this; currentStructure; currentStructure = currentStructure->m_parentBrand.get()) {
+for (BrandedStructure* currentStructure = this; currentStructure; currentStructure = jsCast(currentStructure->m_parentBrand.get())) {
 if (brandUid == currentStructure->m_brand)
 return true;
 }
@@ -78,8 +78,8 @@
 m_brand = nullptr;
 }
 
-RefPtr m_brand;
-WriteBarrier m_parentBrand;
+CompactRefPtr m_brand;
+WriteBarrierStructureID m_parentBrand;
 
 friend class Structure;
 };






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


[webkit-changes] [295021] trunk

2022-05-30 Thread ntim
Title: [295021] trunk








Revision 295021
Author n...@apple.com
Date 2022-05-30 01:29:03 -0700 (Mon, 30 May 2022)


Log Message
Unprefix -webkit-text-align-last and add match-parent value support
https://bugs.webkit.org/show_bug.cgi?id=229083


Reviewed by Antti Koivisto.

We do not keep support for the prefixed version since no other browser supports it, and WebKit never exposed it on macOS/iOS.
Also, unprefix WPTs where prefixes were added automatically by the test importer.

Note that serialization of the match-parent value isn't as specified in the spec, but the behavior matches other browsers.

Original patch by Brent Fulgham.

* LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-expected.txt: Removed.
* LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited-expected.txt: Removed.
* LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html: Removed.
* LayoutTests/fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html: Removed.
These tests are redundant with the parsing ones on WPT.

* LayoutTests/fast/css3-text/css3-text-align-last/text-align-last-with-text-align-justify.html:
* LayoutTests/fast/css3-text/css3-text-align-last/text-align-last-with-text-align-non-justify.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-text-align-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-text-align-ref.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/marker-text-align.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-percent-001-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text-decor/text-decoration-thickness-percent-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/inheritance-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/letter-spacing/letter-spacing-bidi-003.xht:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-align-last-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-align-last-valid-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-001.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-002.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-003.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-004.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-005.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-006.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-007.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-008.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-009.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-010.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-011.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-012.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-013.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-014.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-empty-inline.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-wins-001.html:
* LayoutTests/imported/w3c/web-platform-tests/svg/styling/required-properties-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* Source/WebCore/css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/StyleProperties.cpp:
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::isPropertyRuntimeDisabled const):
* Source/WebCore/css/parser/CSSParserFastPaths.cpp:

[webkit-changes] [295020] trunk/Tools/Scripts/update-angle

2022-05-30 Thread commit-queue
Title: [295020] trunk/Tools/Scripts/update-angle








Revision 295020
Author commit-qu...@webkit.org
Date 2022-05-30 00:19:19 -0700 (Mon, 30 May 2022)


Log Message
Avoid staging autogenerated commit-message.txt
https://bugs.webkit.org/show_bug.cgi?id=240967

Patch by Kenneth Russell  on 2022-05-29
Unstage the autogenerated commit-message.txt before exiting the
update-angle script to make it easier for the user to remove.

Reviewed by Kimmo Kinnunen.

* Source/ThirdParty/ANGLE/commit-message.txt: Added.
* Tools/Scripts/update-angle:

Canonical link: https://commits.webkit.org/251115@main

Modified Paths

trunk/Tools/Scripts/update-angle




Diff

Modified: trunk/Tools/Scripts/update-angle (295019 => 295020)

--- trunk/Tools/Scripts/update-angle	2022-05-29 19:56:25 UTC (rev 295019)
+++ trunk/Tools/Scripts/update-angle	2022-05-30 07:19:19 UTC (rev 295020)
@@ -131,6 +131,8 @@
 echo "Removing temporary git repository from Source/ThirdParty/ANGLE"
 rm -rf .git
 git add -A .
+# Undo the addition of commit-message.txt to make it easier for the user to remove.
+git restore --staged commit-message.txt
 echo
 echo "ANGLE update is now staged. Ready to commit and upload patch."
 exit 0






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