[webkit-changes] [285799] trunk

2021-11-14 Thread beidson
Title: [285799] trunk








Revision 285799
Author beid...@apple.com
Date 2021-11-14 23:17:34 -0800 (Sun, 14 Nov 2021)


Log Message
Get daemon API ready to work in the iOS simulator (starting with WebPushD)
https://bugs.webkit.org/show_bug.cgi?id=232982

Reviewed by Geoff Garen.

Source/WebKit:

Move all the "enable Notifications" SPI from Mac-only to cross platform:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setNotificationsEnabled:]):
(-[WKPreferences _notificationsEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):

* WebKit.xcodeproj/project.pbxproj: Add a build phase script to install the daemon executables
  inside a Daemons directory within the built WebKit.framework for engineering builds.
* webpushd/WebPushDaemon.mm:

Tools:

To get this working we needed to:
- Have the Daemons installed in a simulator-runtime-root-visible path
- Point the OSLaunchDJob plist to the simulator-relative path, not Mac-relative
- Solve the "How do I kill existing instances to run a clean test?" problem within the simulator.

This patch does those things.

* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:

* TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::testWebPushDaemonPList):
(TestWebKitAPI::setUpTestWebPushD):
(TestWebKitAPI::cleanUpTestWebPushD):

* TestWebKitAPI/cocoa/DaemonTestUtilities.h:
* TestWebKitAPI/cocoa/DaemonTestUtilities.mm:
(TestWebKitAPI::registerPlistWithLaunchD):
(TestWebKitAPI::pidOfFirstDaemonInstance):
(TestWebKitAPI::killFirstInstanceOfDaemon):

WebKitLibraries:

* WebKitPrivateFrameworkStubs/iOS/15/AppServerSupport.framework/AppServerSupport.tbd: Added.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements
trunk/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
trunk/Tools/TestWebKitAPI/cocoa/DaemonTestUtilities.h
trunk/Tools/TestWebKitAPI/cocoa/DaemonTestUtilities.mm
trunk/WebKitLibraries/ChangeLog


Added Paths

trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/AppServerSupport.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/AppServerSupport.framework/AppServerSupport.tbd




Diff

Modified: trunk/Source/WebKit/ChangeLog (285798 => 285799)

--- trunk/Source/WebKit/ChangeLog	2021-11-15 04:22:34 UTC (rev 285798)
+++ trunk/Source/WebKit/ChangeLog	2021-11-15 07:17:34 UTC (rev 285799)
@@ -1,3 +1,25 @@
+2021-11-14  Brady Eidson  
+
+Get daemon API ready to work in the iOS simulator (starting with WebPushD)
+https://bugs.webkit.org/show_bug.cgi?id=232982
+
+Reviewed by Geoff Garen.
+
+Move all the "enable Notifications" SPI from Mac-only to cross platform:
+* UIProcess/API/Cocoa/WKPreferences.mm:
+(-[WKPreferences _setNotificationsEnabled:]):
+(-[WKPreferences _notificationsEnabled]):
+* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+* UIProcess/Cocoa/UIDelegate.h:
+* UIProcess/Cocoa/UIDelegate.mm:
+(WebKit::UIDelegate::setDelegate):
+(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
+
+* WebKit.xcodeproj/project.pbxproj: Add a build phase script to install the daemon executables
+  inside a Daemons directory within the built WebKit.framework for engineering builds.
+* webpushd/WebPushDaemon.mm:
+
 2021-11-14  Fujii Hironori  
 
 [GraphicsLayerWC] Incorrect compositing debug border color


Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (285798 => 285799)

--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm	2021-11-15 04:22:34 UTC (rev 285798)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm	2021-11-15 07:17:34 UTC (rev 285799)
@@ -1163,16 +1163,6 @@
 return _preferences->standardFontFamily();
 }
 
-- (void)_setNotificationsEnabled:(BOOL)enabled
-{
-_preferences->setNotificationsEnabled(enabled);
-}
-
-- (BOOL)_notificationsEnabled
-{
-return _preferences->notificationsEnabled();
-}
-
 - (void)_setBackspaceKeyNavigationEnabled:(BOOL)enabled
 {
 _preferences->setBackspaceKeyNavigationEnabled(enabled);
@@ -1564,6 +1554,16 @@
 _preferences->setAccessHandleEnabled(accessHandleEnabled);
 }
 
+- 

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

2021-11-14 Thread Hironori . Fujii
Title: [285798] trunk/Source/WebKit








Revision 285798
Author hironori.fu...@sony.com
Date 2021-11-14 20:22:34 -0800 (Sun, 14 Nov 2021)


Log Message
[GraphicsLayerWC] Incorrect compositing debug border color
https://bugs.webkit.org/show_bug.cgi?id=233107

Reviewed by Don Olmstead.

GraphicsLayer::updateDebugIndicators() should be called after
changing some layer properties.

* WebProcess/WebPage/wc/GraphicsLayerWC.cpp:
(WebKit::GraphicsLayerWC::setMasksToBounds):
(WebKit::GraphicsLayerWC::setDrawsContent):
(WebKit::GraphicsLayerWC::setContentsToPlatformLayer):
(WebKit::GraphicsLayerWC::setBackdropFilters):
Call updateDebugIndicators.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (285797 => 285798)

--- trunk/Source/WebKit/ChangeLog	2021-11-15 04:06:38 UTC (rev 285797)
+++ trunk/Source/WebKit/ChangeLog	2021-11-15 04:22:34 UTC (rev 285798)
@@ -1,3 +1,20 @@
+2021-11-14  Fujii Hironori  
+
+[GraphicsLayerWC] Incorrect compositing debug border color
+https://bugs.webkit.org/show_bug.cgi?id=233107
+
+Reviewed by Don Olmstead.
+
+GraphicsLayer::updateDebugIndicators() should be called after
+changing some layer properties.
+
+* WebProcess/WebPage/wc/GraphicsLayerWC.cpp:
+(WebKit::GraphicsLayerWC::setMasksToBounds):
+(WebKit::GraphicsLayerWC::setDrawsContent):
+(WebKit::GraphicsLayerWC::setContentsToPlatformLayer):
+(WebKit::GraphicsLayerWC::setBackdropFilters):
+Call updateDebugIndicators.
+
 2021-11-14  Simon Fraser  
 
 Attach IOHIDEvent timestamps to wheel events


Modified: trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp (285797 => 285798)

--- trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp	2021-11-15 04:06:38 UTC (rev 285797)
+++ trunk/Source/WebKit/WebProcess/WebPage/wc/GraphicsLayerWC.cpp	2021-11-15 04:22:34 UTC (rev 285798)
@@ -213,6 +213,7 @@
 return;
 GraphicsLayer::setMasksToBounds(value);
 noteLayerPropertyChanged(WCLayerChange::MasksToBounds);
+updateDebugIndicators();
 }
 
 void GraphicsLayerWC::setOpacity(float value)
@@ -245,6 +246,7 @@
 return;
 GraphicsLayer::setDrawsContent(value);
 noteLayerPropertyChanged(WCLayerChange::BackingStore);
+updateDebugIndicators();
 }
 
 void GraphicsLayerWC::setContentsVisible(bool value)
@@ -277,6 +279,7 @@
 return;
 m_platformLayer = platformLayer;
 noteLayerPropertyChanged(WCLayerChange::PlatformLayer);
+updateDebugIndicators();
 }
 
 bool GraphicsLayerWC::usesContentsLayer() const
@@ -345,6 +348,7 @@
 else
 clearBackdropFilters();
 noteLayerPropertyChanged(WCLayerChange::BackdropFilters);
+updateDebugIndicators();
 return canCompositeFilters;
 }
 






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


[webkit-changes] [285797] trunk

2021-11-14 Thread simon . fraser
Title: [285797] trunk








Revision 285797
Author simon.fra...@apple.com
Date 2021-11-14 20:06:38 -0800 (Sun, 14 Nov 2021)


Log Message
Fingers down on the trackpad should stop an animated scroll
https://bugs.webkit.org/show_bug.cgi?id=233114

Reviewed by Wenson Hsieh.
Source/WebCore:

Fingers down on the trackpad sends a "MayBegin" event; this needs to stop any in-progress
animated momentum scroll.

This failed because ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent() early-returned
on the MayBegin event before it got to ScrollingEffectsController. Fix that, and have
ScrollingEffectsController::handleWheelEvent() return true to say it was handled.

This triggered an assertion in ScrollingTreeGestureState, but for "post-main-thread"
handling for which the assertion was wrong.

Test: fast/scrolling/mac/momentum-animator-maybegin-stops.html

* page/scrolling/ScrollingTreeGestureState.cpp:
(WebCore::ScrollingTreeGestureState::nodeDidHandleEvent):
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):
* platform/mac/ScrollingEffectsController.mm:
(WebCore::ScrollingEffectsController::handleWheelEvent):

LayoutTests:

* fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt: Added.
* fast/scrolling/mac/momentum-animator-maybegin-stops.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/scrolling/ScrollingTreeGestureState.cpp
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm


Added Paths

trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt
trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops.html




Diff

Modified: trunk/LayoutTests/ChangeLog (285796 => 285797)

--- trunk/LayoutTests/ChangeLog	2021-11-15 02:45:28 UTC (rev 285796)
+++ trunk/LayoutTests/ChangeLog	2021-11-15 04:06:38 UTC (rev 285797)
@@ -1,3 +1,13 @@
+2021-11-14  Simon Fraser  
+
+Fingers down on the trackpad should stop an animated scroll
+https://bugs.webkit.org/show_bug.cgi?id=233114
+
+Reviewed by Wenson Hsieh.
+
+* fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt: Added.
+* fast/scrolling/mac/momentum-animator-maybegin-stops.html: Added.
+
 2021-11-13  Simon Fraser  
 
 Run a ScrollAnimationMomentum for the momentum phase of a scroll


Added: trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt (0 => 285797)

--- trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops-expected.txt	2021-11-15 04:06:38 UTC (rev 285797)
@@ -0,0 +1,7 @@
+Momentum event reached main thread
+PASS scrollEventCount > 0 is true
+PASS scrollEventCount is scrollEventCountAtMayBegin
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops.html (0 => 285797)

--- trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops.html	(rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/momentum-animator-maybegin-stops.html	2021-11-15 04:06:38 UTC (rev 285797)
@@ -0,0 +1,119 @@
+ 
+
+
+
+body {
+height: 2000px;
+width: 200%;
+}
+
+
+var jsTestIsAsync = true;
+
+let sawMomentumEvent = false;
+let sawFingersDown = false;
+let scrollEventCount = 0;
+let scrollEventCountAtMayBegin = 0;
+
+async function testEventSequence()
+{
+const events = [
+{
+type : "wheel",
+viewX : 100,
+viewY : 100,
+deltaY : -10, // Note that this delta is currently ignored.
+phase : "began"
+},
+{
+type : "wheel",
+deltaY : -50,
+phase : "changed"
+},
+{
+type : "wheel",
+phase : "ended"
+},
+{
+type : "wheel",
+deltaY : -60,
+momentumPhase : "began"
+},
+{
+type: "wheel",
+viewX : 101, // defeat coalescing
+deltaY : -99,
+momentumPhase: "changed"
+},
+{
+type: "wheel",
+viewX : 102, // defeat coalescing
+deltaY : -80,
+momentumPhase: "changed"
+},
+{
+type : "wheel",
+momentumPhase : "ended"
+ 

[webkit-changes] [285793] trunk/Source/JavaScriptCore

2021-11-14 Thread ysuzuki
Title: [285793] trunk/Source/_javascript_Core








Revision 285793
Author ysuz...@apple.com
Date 2021-11-14 11:52:27 -0800 (Sun, 14 Nov 2021)


Log Message
[JSC] Initialize m_usesT2
https://bugs.webkit.org/show_bug.cgi?id=233095

Reviewed by Alexey Shvayka.

m_usesT2 is not initialized as "false" correctly.

* yarr/YarrJIT.cpp:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/yarr/YarrJIT.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (285792 => 285793)

--- trunk/Source/_javascript_Core/ChangeLog	2021-11-14 19:38:16 UTC (rev 285792)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-11-14 19:52:27 UTC (rev 285793)
@@ -1,3 +1,14 @@
+2021-11-14  Yusuke Suzuki  
+
+[JSC] Initialize m_usesT2
+https://bugs.webkit.org/show_bug.cgi?id=233095
+
+Reviewed by Alexey Shvayka.
+
+m_usesT2 is not initialized as "false" correctly.
+
+* yarr/YarrJIT.cpp:
+
 2021-11-14  Mikhail R. Gadelha  
 
 Prevent fused multiply add during ParseInt


Modified: trunk/Source/_javascript_Core/yarr/YarrJIT.cpp (285792 => 285793)

--- trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2021-11-14 19:38:16 UTC (rev 285792)
+++ trunk/Source/_javascript_Core/yarr/YarrJIT.cpp	2021-11-14 19:52:27 UTC (rev 285793)
@@ -4093,7 +4093,6 @@
 , m_unicodeIgnoreCase(m_pattern.unicode() && m_pattern.ignoreCase())
 , m_canonicalMode(m_pattern.unicode() ? CanonicalMode::Unicode : CanonicalMode::UCS2)
 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)
-, m_containsNestedSubpatterns(false)
 , m_parenContextSizes(compileMode == JITCompileMode::IncludeSubpatterns ? m_pattern.m_numSubpatterns : 0, m_pattern.m_body->m_callFrameSize)
 #endif
 {
@@ -4114,7 +4113,6 @@
 , m_unicodeIgnoreCase(m_pattern.unicode() && m_pattern.ignoreCase())
 , m_canonicalMode(m_pattern.unicode() ? CanonicalMode::Unicode : CanonicalMode::UCS2)
 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)
-, m_containsNestedSubpatterns(false)
 , m_parenContextSizes(compileMode == JITCompileMode::IncludeSubpatterns ? m_pattern.m_numSubpatterns : 0, m_pattern.m_body->m_callFrameSize)
 #endif
 {
@@ -4633,10 +4631,10 @@
 
 bool m_decodeSurrogatePairs;
 bool m_unicodeIgnoreCase;
-bool m_usesT2;
+bool m_usesT2 { false };
 CanonicalMode m_canonicalMode;
 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)
-bool m_containsNestedSubpatterns;
+bool m_containsNestedSubpatterns { false };
 ParenContextSizes m_parenContextSizes;
 #endif
 MacroAssembler::JumpList m_abortExecution;






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


[webkit-changes] [285792] trunk/Source/WebGPU

2021-11-14 Thread mmaxfield
Title: [285792] trunk/Source/WebGPU








Revision 285792
Author mmaxfi...@apple.com
Date 2021-11-14 11:38:16 -0800 (Sun, 14 Nov 2021)


Log Message
[WebGPU] Add necessary additions to WebGPU.framework
https://bugs.webkit.org/show_bug.cgi?id=233091

Reviewed by Dean Jackson.

WebGPU.framework's header file is lagging a bit behind the official WebGPU API.
This updates a companion header, WebGPUExt.h, with the necessary additions.
I don't want to modify the primary header, WebGPU.h, because it's shared among
multiple projects, so coordination is necessary to modify it.

* WebGPU/Adapter.h:
* WebGPU/Adapter.mm:
(WebGPU::Adapter::getFeatureAtIndex):
(wgpuAdapterGetFeatureAtIndex):
* WebGPU/BindGroup.h:
* WebGPU/BindGroup.mm:
(WebGPU::BindGroup::setLabel):
(wgpuBindGroupSetLabel):
* WebGPU/BindGroupLayout.h:
* WebGPU/BindGroupLayout.mm:
(WebGPU::BindGroupLayout::setLabel):
(wgpuBindGroupLayoutSetLabel):
* WebGPU/Buffer.h:
* WebGPU/Buffer.mm:
(WebGPU::Buffer::setLabel):
(wgpuBufferSetLabel):
* WebGPU/CommandBuffer.h:
* WebGPU/CommandBuffer.mm:
(WebGPU::CommandBuffer::setLabel):
(wgpuCommandBufferSetLabel):
* WebGPU/CommandEncoder.h:
* WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::fillBuffer):
(WebGPU::CommandEncoder::setLabel):
(wgpuCommandEncoderFillBuffer):
(wgpuCommandEncoderSetLabel):
* WebGPU/ComputePassEncoder.h:
* WebGPU/ComputePassEncoder.mm:
(WebGPU::ComputePassEncoder::setLabel):
(wgpuComputePassEncoderSetLabel):
* WebGPU/Device.h:
* WebGPU/Device.mm:
(WebGPU::Device::setLabel):
(wgpuDeviceSetLabel):
* WebGPU/Instance.mm:
(wgpuGetProcAddress):
* WebGPU/PipelineLayout.h:
* WebGPU/PipelineLayout.mm:
(WebGPU::PipelineLayout::setLabel):
(wgpuPipelineLayoutSetLabel):
* WebGPU/QuerySet.h:
* WebGPU/QuerySet.mm:
(WebGPU::QuerySet::setLabel):
(wgpuQuerySetSetLabel):
* WebGPU/Queue.h:
* WebGPU/Queue.mm:
(WebGPU::Queue::setLabel):
(wgpuQueueSetLabel):
* WebGPU/RenderBundle.h:
* WebGPU/RenderBundle.mm:
(WebGPU::RenderBundle::setLabel):
(wgpuRenderBundleSetLabel):
* WebGPU/RenderBundleEncoder.h:
* WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::setLabel):
(wgpuRenderBundleEncoderSetLabel):
* WebGPU/RenderPassEncoder.h:
* WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::setLabel):
(wgpuRenderPassEncoderSetLabel):
* WebGPU/Sampler.h:
* WebGPU/Sampler.mm:
(WebGPU::Sampler::setLabel):
(wgpuSamplerSetLabel):
* WebGPU/Texture.h:
* WebGPU/Texture.mm:
(WebGPU::Texture::setLabel):
(wgpuTextureSetLabel):
* WebGPU/TextureView.h:
* WebGPU/TextureView.mm:
(WebGPU::TextureView::setLabel):
(wgpuTextureViewSetLabel):
* WebGPU/WebGPUExt.h:

Modified Paths

trunk/Source/WebGPU/ChangeLog
trunk/Source/WebGPU/WebGPU/Adapter.h
trunk/Source/WebGPU/WebGPU/Adapter.mm
trunk/Source/WebGPU/WebGPU/BindGroup.h
trunk/Source/WebGPU/WebGPU/BindGroup.mm
trunk/Source/WebGPU/WebGPU/BindGroupLayout.h
trunk/Source/WebGPU/WebGPU/BindGroupLayout.mm
trunk/Source/WebGPU/WebGPU/Buffer.h
trunk/Source/WebGPU/WebGPU/Buffer.mm
trunk/Source/WebGPU/WebGPU/CommandBuffer.h
trunk/Source/WebGPU/WebGPU/CommandBuffer.mm
trunk/Source/WebGPU/WebGPU/CommandEncoder.h
trunk/Source/WebGPU/WebGPU/CommandEncoder.mm
trunk/Source/WebGPU/WebGPU/ComputePassEncoder.h
trunk/Source/WebGPU/WebGPU/ComputePassEncoder.mm
trunk/Source/WebGPU/WebGPU/Device.h
trunk/Source/WebGPU/WebGPU/Device.mm
trunk/Source/WebGPU/WebGPU/Instance.mm
trunk/Source/WebGPU/WebGPU/PipelineLayout.h
trunk/Source/WebGPU/WebGPU/PipelineLayout.mm
trunk/Source/WebGPU/WebGPU/QuerySet.h
trunk/Source/WebGPU/WebGPU/QuerySet.mm
trunk/Source/WebGPU/WebGPU/Queue.h
trunk/Source/WebGPU/WebGPU/Queue.mm
trunk/Source/WebGPU/WebGPU/RenderBundle.h
trunk/Source/WebGPU/WebGPU/RenderBundle.mm
trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.h
trunk/Source/WebGPU/WebGPU/RenderBundleEncoder.mm
trunk/Source/WebGPU/WebGPU/RenderPassEncoder.h
trunk/Source/WebGPU/WebGPU/RenderPassEncoder.mm
trunk/Source/WebGPU/WebGPU/Sampler.h
trunk/Source/WebGPU/WebGPU/Sampler.mm
trunk/Source/WebGPU/WebGPU/Texture.h
trunk/Source/WebGPU/WebGPU/Texture.mm
trunk/Source/WebGPU/WebGPU/TextureView.h
trunk/Source/WebGPU/WebGPU/TextureView.mm
trunk/Source/WebGPU/WebGPU/WebGPUExt.h




Diff

Modified: trunk/Source/WebGPU/ChangeLog (285791 => 285792)

--- trunk/Source/WebGPU/ChangeLog	2021-11-14 18:47:32 UTC (rev 285791)
+++ trunk/Source/WebGPU/ChangeLog	2021-11-14 19:38:16 UTC (rev 285792)
@@ -1,3 +1,89 @@
+2021-11-14  Myles C. Maxfield  
+
+[WebGPU] Add necessary additions to WebGPU.framework
+https://bugs.webkit.org/show_bug.cgi?id=233091
+
+Reviewed by Dean Jackson.
+
+WebGPU.framework's header file is lagging a bit behind the official WebGPU API.
+This updates a companion header, WebGPUExt.h, with the necessary additions.
+I don't want to modify the primary header, WebGPU.h, because it's shared among
+multiple projects, so coordination is necessary to modify it.
+
+* WebGPU/Adapter.h:
+* WebGPU/Adapter.mm:
+(WebGPU::Adapter::getFeatureAtIndex):
+

[webkit-changes] [285791] trunk

2021-11-14 Thread ntim
Title: [285791] trunk








Revision 285791
Author n...@apple.com
Date 2021-11-14 10:47:32 -0800 (Sun, 14 Nov 2021)


Log Message
Modal dialogs should make the root element unfocusable
https://bugs.webkit.org/show_bug.cgi?id=233099

Reviewed by Simon Fraser.

>From https://html.spec.whatwg.org/multipage/interaction.html#inert,

> A Document document is blocked by a modal dialog subject if subject is
> the topmost dialog element in document's top layer. While document is
> so blocked, every node that is connected to document, with the
> exception of the subject element and its shadow-including descendants,
> must be marked inert.

RenderStyle::effectiveInert() already matches this definition, Node::deprecatedIsInert() does not.

Main reason the removed check was there is to prevent the whole document from being inert to hit-testing, but with the RenderStyle
approach, we instead override effectiveInert to false for the modal dialog. Removing this check for focus is absolutely fine
however, since focusability isn't inherited (Node::deprecatedIsInert is only used for focus).

Tests added by this Chromium WPT: https://github.com/web-platform-tests/wpt/commit/0457111e7109ec3d9e575aa421b96d8c36ce2ae8

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html:

Source/WebCore:

* dom/Node.cpp:
(WebCore::Node::deprecatedIsInert const):

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Node.cpp




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (285790 => 285791)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-11-14 18:38:45 UTC (rev 285790)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-11-14 18:47:32 UTC (rev 285791)
@@ -1,3 +1,29 @@
+2021-11-14  Tim Nguyen  
+
+Modal dialogs should make the root element unfocusable
+https://bugs.webkit.org/show_bug.cgi?id=233099
+
+Reviewed by Simon Fraser.
+
+From https://html.spec.whatwg.org/multipage/interaction.html#inert,
+
+> A Document document is blocked by a modal dialog subject if subject is
+> the topmost dialog element in document's top layer. While document is
+> so blocked, every node that is connected to document, with the
+> exception of the subject element and its shadow-including descendants,
+> must be marked inert.
+
+RenderStyle::effectiveInert() already matches this definition, Node::deprecatedIsInert() does not.
+
+Main reason the removed check was there is to prevent the whole document from being inert to hit-testing, but with the RenderStyle
+approach, we instead override effectiveInert to false for the modal dialog. Removing this check for focus is absolutely fine
+however, since focusability isn't inherited (Node::deprecatedIsInert is only used for focus).
+
+Tests added by this Chromium WPT: https://github.com/web-platform-tests/wpt/commit/0457111e7109ec3d9e575aa421b96d8c36ce2ae8
+
+* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt:
+* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html:
+
 2021-11-12  Ryan Haddad  
 
 Unreviewed, reverting r285583.


Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt (285790 => 285791)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt	2021-11-14 18:38:45 UTC (rev 285790)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt	2021-11-14 18:47:32 UTC (rev 285791)
@@ -1,8 +1,21 @@
-I get focusI don't get focus.
 
 I'm editable
 I'm tabindexed.
  Link
 
-PASS Test that inert nodes are not focusable.
+PASS #html is not  focusable
+PASS #body is not  focusable
+PASS #top-dialog is  focusable
+PASS #top-dialog-button is  focusable
+PASS #bottom-dialog is not  focusable
+PASS #bottom-dialog-button is not  focusable
+PASS #container is not  focusable
+PASS #text is not  focusable
+PASS #datetime is not  focusable
+PASS #color is not  focusable
+PASS #select is not  focusable
+PASS #optgroup is not  focusable
+PASS #option is not  focusable
+PASS #contenteditable-div is not  focusable
+PASS #tabindex-span is not  focusable
 


Modified: 

[webkit-changes] [285790] trunk/Source

2021-11-14 Thread simon . fraser
Title: [285790] trunk/Source








Revision 285790
Author simon.fra...@apple.com
Date 2021-11-14 10:38:45 -0800 (Sun, 14 Nov 2021)


Log Message
Attach IOHIDEvent timestamps to wheel events
https://bugs.webkit.org/show_bug.cgi?id=233051

Reviewed by Wenson Hsieh.
Source/WebCore:

On some macOS devices, there can be significant deltas between NSEvent timestamps,
and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
velocity computation unpredictable; we can get better results by using IOHIDEvent
timestamps.

* platform/PlatformWheelEvent.cpp:
(WebCore::PlatformWheelEvent::createFromGesture):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::ioHIDEventTimestamp const):
* platform/mac/PlatformEventFactoryMac.h:
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::eventTimeStampSince1970):
(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

Source/WebCore/PAL:

Expose a few bits of SPI needed.

* pal/spi/cg/CoreGraphicsSPI.h:
* pal/spi/cocoa/IOKitSPI.h:

Source/WebKit:

On some macOS devices, there can be significant deltas between NSEvent timestamps,
and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
velocity computation unpredictable; we can get better results by using IOHIDEvent
timestamps.

* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode const):
(WebKit::WebWheelEvent::decode):
* Shared/WebWheelEvent.h:
(WebKit::WebWheelEvent::ioHIDEventTimestamp const):
* Shared/WebWheelEventCoalescer.cpp:
(WebKit::WebWheelEventCoalescer::coalesce):
* Shared/ios/WebIOSEventFactory.mm:
(WebIOSEventFactory::createWebWheelEvent):
* Shared/mac/NativeWebGestureEventMac.mm:
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
trunk/Source/WebCore/PAL/pal/spi/mac/IOKitSPIMac.h
trunk/Source/WebCore/platform/PlatformWheelEvent.cpp
trunk/Source/WebCore/platform/PlatformWheelEvent.h
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.h
trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebEventConversion.cpp
trunk/Source/WebKit/Shared/WebWheelEvent.cpp
trunk/Source/WebKit/Shared/WebWheelEvent.h
trunk/Source/WebKit/Shared/WebWheelEventCoalescer.cpp
trunk/Source/WebKit/Shared/ios/WebIOSEventFactory.mm
trunk/Source/WebKit/Shared/mac/NativeWebGestureEventMac.mm
trunk/Source/WebKit/Shared/mac/WebEventFactory.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (285789 => 285790)

--- trunk/Source/WebCore/ChangeLog	2021-11-14 18:33:29 UTC (rev 285789)
+++ trunk/Source/WebCore/ChangeLog	2021-11-14 18:38:45 UTC (rev 285790)
@@ -1,3 +1,26 @@
+2021-11-14  Simon Fraser  
+
+Attach IOHIDEvent timestamps to wheel events
+https://bugs.webkit.org/show_bug.cgi?id=233051
+
+Reviewed by Wenson Hsieh.
+
+On some macOS devices, there can be significant deltas between NSEvent timestamps,
+and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
+velocity computation unpredictable; we can get better results by using IOHIDEvent
+timestamps.
+
+* platform/PlatformWheelEvent.cpp:
+(WebCore::PlatformWheelEvent::createFromGesture):
+* platform/PlatformWheelEvent.h:
+(WebCore::PlatformWheelEvent::ioHIDEventTimestamp const):
+* platform/mac/PlatformEventFactoryMac.h:
+* platform/mac/PlatformEventFactoryMac.mm:
+(WebCore::eventTimeStampSince1970):
+(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
+(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
+(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
+
 2021-11-13  Simon Fraser  
 
 Run a ScrollAnimationMomentum for the momentum phase of a scroll


Modified: trunk/Source/WebCore/PAL/ChangeLog (285789 => 285790)

--- trunk/Source/WebCore/PAL/ChangeLog	2021-11-14 18:33:29 UTC (rev 285789)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-11-14 18:38:45 UTC (rev 285790)
@@ -1,3 +1,15 @@
+2021-11-14  Simon Fraser  
+
+Attach IOHIDEvent timestamps to wheel events
+https://bugs.webkit.org/show_bug.cgi?id=233051
+
+Reviewed by Wenson Hsieh.
+
+Expose a few bits of SPI needed.
+
+* pal/spi/cg/CoreGraphicsSPI.h:
+* pal/spi/cocoa/IOKitSPI.h:
+
 2021-11-13  Tim Horton  
 
 Clean up IOKit SPI headers


Modified: 

[webkit-changes] [285788] trunk

2021-11-14 Thread commit-queue
Title: [285788] trunk








Revision 285788
Author commit-qu...@webkit.org
Date 2021-11-14 00:45:44 -0800 (Sun, 14 Nov 2021)


Log Message
Prevent fused multiply add during ParseInt
https://bugs.webkit.org/show_bug.cgi?id=232951

Patch by Mikhail R. Gadelha  on 2021-11-14
Reviewed by Yusuke Suzuki.

When parsing the string in parseInt, gcc can wrongfully generate
a fused multiply-add instruction, causing the conversion to be wrong
for some high values. An add followed by a multiply gives the correct
result and it is the code generated most of the times.

This patch adds a volatile qualifier to the number variable, so the
compiler doesn't try to optimize it, and enables a failing test on
mips.

Alternative solutions that I tried but gcc seems to ignore: #pragma
STDC FP_CONTRACT OFF, compiling with -ffp-contract=off, and setting function
attributes __attribute__((optimize("fp-contract=off"))) and
__attribute__((optimize("-ffp-contract=off"))), so volative seems to be
a good compromise.

The issue was found when cross compiling to mips with gcc 8.4.0 and
options -ffp-contract=off -mmadd4.

JSTests:

* ChakraCore.yaml:

Source/_javascript_Core:

* runtime/ParseInt.h:
(JSC::parseInt):

Modified Paths

trunk/JSTests/ChakraCore.yaml
trunk/JSTests/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/ParseInt.h




Diff

Modified: trunk/JSTests/ChakraCore.yaml (285787 => 285788)

--- trunk/JSTests/ChakraCore.yaml	2021-11-14 07:37:36 UTC (rev 285787)
+++ trunk/JSTests/ChakraCore.yaml	2021-11-14 08:45:44 UTC (rev 285788)
@@ -696,12 +696,7 @@
   end
 - path: ChakraCore/test/GlobalFunctions/ParseInt1.js
   # Currently fails on the Loongson 3A4000 (in 32-bits mode).
-  cmd: |
-if $architecture == "mips"
-  skip
-else
-  runChakra :baseline, "NoException", "ParseInt1.baseline", []
-end
+  cmd: runChakra :baseline, "NoException", "ParseInt1.baseline", []
 - path: ChakraCore/test/GlobalFunctions/toString.js
   cmd: runChakra :baseline, "NoException", "toString.baseline", []
 - path: ChakraCore/test/InlineCaches/t0.js


Modified: trunk/JSTests/ChangeLog (285787 => 285788)

--- trunk/JSTests/ChangeLog	2021-11-14 07:37:36 UTC (rev 285787)
+++ trunk/JSTests/ChangeLog	2021-11-14 08:45:44 UTC (rev 285788)
@@ -1,3 +1,30 @@
+2021-11-14  Mikhail R. Gadelha  
+
+Prevent fused multiply add during ParseInt
+https://bugs.webkit.org/show_bug.cgi?id=232951
+
+Reviewed by Yusuke Suzuki.
+
+When parsing the string in parseInt, gcc can wrongfully generate
+a fused multiply-add instruction, causing the conversion to be wrong
+for some high values. An add followed by a multiply gives the correct
+result and it is the code generated most of the times.
+
+This patch adds a volatile qualifier to the number variable, so the
+compiler doesn't try to optimize it, and enables a failing test on
+mips.
+
+Alternative solutions that I tried but gcc seems to ignore: #pragma
+STDC FP_CONTRACT OFF, compiling with -ffp-contract=off, and setting function
+attributes __attribute__((optimize("fp-contract=off"))) and
+__attribute__((optimize("-ffp-contract=off"))), so volative seems to be
+a good compromise.
+
+The issue was found when cross compiling to mips with gcc 8.4.0 and
+options -ffp-contract=off -mmadd4.
+
+* ChakraCore.yaml:
+
 2021-11-12  Joseph Griego  
 
 [JSC] update test262


Modified: trunk/Source/_javascript_Core/ChangeLog (285787 => 285788)

--- trunk/Source/_javascript_Core/ChangeLog	2021-11-14 07:37:36 UTC (rev 285787)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-11-14 08:45:44 UTC (rev 285788)
@@ -1,3 +1,31 @@
+2021-11-14  Mikhail R. Gadelha  
+
+Prevent fused multiply add during ParseInt
+https://bugs.webkit.org/show_bug.cgi?id=232951
+
+Reviewed by Yusuke Suzuki.
+
+When parsing the string in parseInt, gcc can wrongfully generate
+a fused multiply-add instruction, causing the conversion to be wrong
+for some high values. An add followed by a multiply gives the correct
+result and it is the code generated most of the times.
+
+This patch adds a volatile qualifier to the number variable, so the
+compiler doesn't try to optimize it, and enables a failing test on
+mips.
+
+Alternative solutions that I tried but gcc seems to ignore: #pragma
+STDC FP_CONTRACT OFF, compiling with -ffp-contract=off, and setting function
+attributes __attribute__((optimize("fp-contract=off"))) and
+__attribute__((optimize("-ffp-contract=off"))), so volative seems to be
+a good compromise.
+
+The issue was found when cross compiling to mips with gcc 8.4.0 and
+options -ffp-contract=off -mmadd4.
+
+* runtime/ParseInt.h:
+(JSC::parseInt):
+
 2021-11-12  Darin Adler  
 
 Make