Title: [276421] trunk/Source
- Revision
- 276421
- Author
- [email protected]
- Date
- 2021-04-21 21:51:20 -0700 (Wed, 21 Apr 2021)
Log Message
[Win] GetDoubleClickTime() returns 0 in the non-interactive window station on Windows 10 version 2004
https://bugs.webkit.org/show_bug.cgi?id=224793
Reviewed by Don Olmstead.
Source/WebCore:
Some editing and events tests using double click were failing on
Windows 10 version 2004 and 20H2. DumpRenderTree.exe creates a
non-interactive window station if it is running as admin. However,
GetDoubleClickTime() returns 0 in the window station on the latest
Windows 10.
* platform/win/GDIUtilities.h:
(WebCore::getDoubleClickTime): Added.
Source/WebKit:
* Shared/win/WebEventFactory.cpp:
(WebKit::clickCount): Use WebCore::getDoubleClickTime instead of
GetDoubleClickTime API.
Source/WebKitLegacy/win:
* WebView.cpp:
(WebView::handleMouseEvent): Use WebCore::getDoubleClickTime
instead of GetDoubleClickTime API. Change coding style for
check-webkit-style.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (276420 => 276421)
--- trunk/Source/WebCore/ChangeLog 2021-04-22 04:27:11 UTC (rev 276420)
+++ trunk/Source/WebCore/ChangeLog 2021-04-22 04:51:20 UTC (rev 276421)
@@ -1,3 +1,19 @@
+2021-04-21 Fujii Hironori <[email protected]>
+
+ [Win] GetDoubleClickTime() returns 0 in the non-interactive window station on Windows 10 version 2004
+ https://bugs.webkit.org/show_bug.cgi?id=224793
+
+ Reviewed by Don Olmstead.
+
+ Some editing and events tests using double click were failing on
+ Windows 10 version 2004 and 20H2. DumpRenderTree.exe creates a
+ non-interactive window station if it is running as admin. However,
+ GetDoubleClickTime() returns 0 in the window station on the latest
+ Windows 10.
+
+ * platform/win/GDIUtilities.h:
+ (WebCore::getDoubleClickTime): Added.
+
2021-04-21 Zalan Bujtas <[email protected]>
Ignore column spanner property for the inner part of a text control.
Modified: trunk/Source/WebCore/platform/win/GDIUtilities.h (276420 => 276421)
--- trunk/Source/WebCore/platform/win/GDIUtilities.h 2021-04-22 04:27:11 UTC (rev 276420)
+++ trunk/Source/WebCore/platform/win/GDIUtilities.h 2021-04-22 04:51:20 UTC (rev 276421)
@@ -53,6 +53,13 @@
return buttons;
}
+inline LONG getDoubleClickTime()
+{
+ // GetDoubleClickTime() returns 0 in the non-interactive window station on Windows 10 version 2004
+ LONG doubleClickTime = GetDoubleClickTime();
+ return doubleClickTime ? doubleClickTime : 500;
+}
+
} // namespace WebCore
#endif // GDIUtilties_h
Modified: trunk/Source/WebKit/ChangeLog (276420 => 276421)
--- trunk/Source/WebKit/ChangeLog 2021-04-22 04:27:11 UTC (rev 276420)
+++ trunk/Source/WebKit/ChangeLog 2021-04-22 04:51:20 UTC (rev 276421)
@@ -1,3 +1,14 @@
+2021-04-21 Fujii Hironori <[email protected]>
+
+ [Win] GetDoubleClickTime() returns 0 in the non-interactive window station on Windows 10 version 2004
+ https://bugs.webkit.org/show_bug.cgi?id=224793
+
+ Reviewed by Don Olmstead.
+
+ * Shared/win/WebEventFactory.cpp:
+ (WebKit::clickCount): Use WebCore::getDoubleClickTime instead of
+ GetDoubleClickTime API.
+
2021-04-21 Peng Liu <[email protected]>
[GPUP] Refactor SourceBuffer::enqueuedSamplesForTrackID() for testing purposes
Modified: trunk/Source/WebKit/Shared/win/WebEventFactory.cpp (276420 => 276421)
--- trunk/Source/WebKit/Shared/win/WebEventFactory.cpp 2021-04-22 04:27:11 UTC (rev 276420)
+++ trunk/Source/WebKit/Shared/win/WebEventFactory.cpp 2021-04-22 04:51:20 UTC (rev 276421)
@@ -80,7 +80,7 @@
bool cancelPreviousClick = (std::abs(lastClickPosition.x - position.x) > (::GetSystemMetrics(SM_CXDOUBLECLK) / 2))
|| (std::abs(lastClickPosition.y - position.y) > (::GetSystemMetrics(SM_CYDOUBLECLK) / 2))
- || ((timeStampSeconds - gLastClickTime) * 1000.0 > ::GetDoubleClickTime());
+ || ((timeStampSeconds - gLastClickTime) * 1000.0 > getDoubleClickTime());
if (type == WebEvent::MouseDown) {
if (!cancelPreviousClick && (button == lastClickButton))
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (276420 => 276421)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2021-04-22 04:27:11 UTC (rev 276420)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2021-04-22 04:51:20 UTC (rev 276421)
@@ -1,3 +1,15 @@
+2021-04-21 Fujii Hironori <[email protected]>
+
+ [Win] GetDoubleClickTime() returns 0 in the non-interactive window station on Windows 10 version 2004
+ https://bugs.webkit.org/show_bug.cgi?id=224793
+
+ Reviewed by Don Olmstead.
+
+ * WebView.cpp:
+ (WebView::handleMouseEvent): Use WebCore::getDoubleClickTime
+ instead of GetDoubleClickTime API. Change coding style for
+ check-webkit-style.
+
2021-03-28 Sam Weinig <[email protected]>
Remove ENABLE_INDEXED_DATABASE & ENABLE_INDEXED_DATABASE_IN_WORKERS, it seems like it is on for all ports
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (276420 => 276421)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2021-04-22 04:27:11 UTC (rev 276420)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2021-04-22 04:51:20 UTC (rev 276421)
@@ -1863,9 +1863,9 @@
// Always start capturing events when the mouse goes down in our HWND.
::SetCapture(m_viewWindow);
- if (((messageTime - globalPrevMouseDownTime) < (LONG)::GetDoubleClickTime()) &&
- insideThreshold &&
- mouseEvent.button() == globalPrevButton)
+ if ((messageTime - globalPrevMouseDownTime) < getDoubleClickTime()
+ && insideThreshold
+ && mouseEvent.button() == globalPrevButton)
globalClickCount++;
else
// Reset the click count.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes