WebKit Bugzilla
Attachment 361052 Details for
Bug 194217
: Use a dedicated type instead of int32_t for pointer identifiers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194217-20190204154045.patch (text/plain), 17.82 KB, created by
Antoine Quint
on 2019-02-04 06:40:47 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-02-04 06:40:47 PST
Size:
17.82 KB
patch
obsolete
>Subversion Revision: 240916 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8b802f0038cd8a96875d0b0b2e1f70c6d1a7b854..e567216d85885fc47ae6bd859ccc930d08fbedd8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-02-04 Antoine Quint <graouts@apple.com> >+ >+ Use a dedicated type instead of int32_t for pointer identifiers >+ https://bugs.webkit.org/show_bug.cgi?id=194217 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCore.xcodeproj/project.pbxproj: >+ * dom/PointerEvent.h: >+ * dom/PointerID.h: Added. >+ * page/PointerCaptureController.cpp: >+ (WebCore::PointerCaptureController::setPointerCapture): >+ (WebCore::PointerCaptureController::releasePointerCapture): >+ (WebCore::PointerCaptureController::hasPointerCapture): >+ (WebCore::PointerCaptureController::touchEndedOrWasCancelledForIdentifier): >+ (WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier): >+ (WebCore::PointerCaptureController::cancelPointer): >+ * page/PointerCaptureController.h: >+ > 2019-02-03 Antti Koivisto <antti@apple.com> > > [iOS] Tiles not created in large scrollable iframes >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 62e34384bde922e3028cad3bf44af408c7ee932f..3b23ccfb819b7215e2e8e51cb934c5f881e0e68d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-04 Antoine Quint <graouts@apple.com> >+ >+ Use a dedicated type instead of int32_t for pointer identifiers >+ https://bugs.webkit.org/show_bug.cgi?id=194217 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkit/messages.py: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::cancelPointer): >+ * UIProcess/WebPageProxy.h: >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::cancelPointer): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/WebPage.messages.in: >+ > 2019-02-03 Antti Koivisto <antti@apple.com> > > [iOS] Tiles not created in large scrollable iframes >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index bf354a4bc29c4c4471dd74e46b0243000ff3e6c8..f0a7a4db2d7fbec3199a26f682cd07d7d93f0c8e 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2127,6 +2127,7 @@ > 71E2183A17359FB8006E6E4D /* PlugInsResources.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E2183817359FB8006E6E4D /* PlugInsResources.h */; }; > 71E2C42621C935280024F8C8 /* AnimationEffectPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E2C42421C9351D0024F8C8 /* AnimationEffectPhase.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 71E623D1151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E623CF151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h */; }; >+ 71EADCD822087E720065A45F /* PointerID.h in Headers */ = {isa = PBXBuildFile; fileRef = 71EADCD622087E6D0065A45F /* PointerID.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 71EFCEDC202B38A900D7C411 /* AnimationEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 71EFCED7202B388D00D7C411 /* AnimationEffect.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 71FB967B1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 71FB967A1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h */; }; > 724ED32C1A3A7E5400F5F13C /* EXTBlendMinMax.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 724ED3291A3A7E5400F5F13C /* EXTBlendMinMax.cpp */; }; >@@ -9446,6 +9447,7 @@ > 71E2C42421C9351D0024F8C8 /* AnimationEffectPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEffectPhase.h; sourceTree = "<group>"; }; > 71E623CE151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedIntegerOptionalInteger.cpp; sourceTree = "<group>"; }; > 71E623CF151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedIntegerOptionalInteger.h; sourceTree = "<group>"; }; >+ 71EADCD622087E6D0065A45F /* PointerID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PointerID.h; sourceTree = "<group>"; }; > 71EFCED6202B388C00D7C411 /* AnimationEffect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnimationEffect.idl; sourceTree = "<group>"; }; > 71EFCED7202B388D00D7C411 /* AnimationEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEffect.h; sourceTree = "<group>"; }; > 71EFCEDA202B388F00D7C411 /* AnimationEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationEffect.cpp; sourceTree = "<group>"; }; >@@ -27667,6 +27669,7 @@ > 317D3FF1215599E20034E3B9 /* PointerEvent.cpp */, > 317D3FF2215599E30034E3B9 /* PointerEvent.h */, > 317D3FEF215599E10034E3B9 /* PointerEvent.idl */, >+ 71EADCD622087E6D0065A45F /* PointerID.h */, > 5189F0DD10B46B0E00F3C739 /* PopStateEvent.cpp */, > 5174E20810A1F44F00F95E6F /* PopStateEvent.h */, > 5174E20B10A1F49A00F95E6F /* PopStateEvent.idl */, >@@ -31069,6 +31072,7 @@ > 71B5AB2621F1D9F400376E5C /* PointerCaptureController.h in Headers */, > 317D3FF3215599F40034E3B9 /* PointerEvent.h in Headers */, > B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */, >+ 71EADCD822087E720065A45F /* PointerID.h in Headers */, > 3FF813A71DBA8640009BF001 /* PointerLockController.h in Headers */, > 84730D921248F0B300D3A9C9 /* PointLightSource.h in Headers */, > 9705997A107D975200A50A7C /* PolicyChecker.h in Headers */, >diff --git a/Source/WebCore/dom/PointerEvent.h b/Source/WebCore/dom/PointerEvent.h >index 3bcfa95376451393ac56d93d9d88e712eaf17b1b..64fac5f44bdf1b02020c291abd8d01ca574da31c 100644 >--- a/Source/WebCore/dom/PointerEvent.h >+++ b/Source/WebCore/dom/PointerEvent.h >@@ -28,6 +28,7 @@ > #if ENABLE(POINTER_EVENTS) > > #include "MouseEvent.h" >+#include "PointerID.h" > #include <wtf/text/WTFString.h> > > #if ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY) >@@ -39,7 +40,7 @@ namespace WebCore { > class PointerEvent final : public MouseEvent { > public: > struct Init : MouseEventInit { >- int32_t pointerId { 0 }; >+ PointerID pointerId { 0 }; > double width { 1 }; > double height { 1 }; > float pressure { 0 }; >@@ -56,7 +57,7 @@ public: > return adoptRef(*new PointerEvent(type, WTFMove(initializer))); > } > >- static Ref<PointerEvent> create(const AtomicString& type, int32_t pointerId, String pointerType) >+ static Ref<PointerEvent> create(const AtomicString& type, PointerID pointerId, String pointerType) > { > Init initializer; > initializer.bubbles = true; >@@ -86,7 +87,7 @@ public: > > virtual ~PointerEvent(); > >- int32_t pointerId() const { return m_pointerId; } >+ PointerID pointerId() const { return m_pointerId; } > double width() const { return m_width; } > double height() const { return m_height; } > float pressure() const { return m_pressure; } >@@ -108,7 +109,7 @@ private: > PointerEvent(const AtomicString& type, const PlatformTouchEvent&, IsCancelable isCancelable, unsigned touchIndex, bool isPrimary, Ref<WindowProxy>&&); > #endif > >- int32_t m_pointerId { 0 }; >+ PointerID m_pointerId { 0 }; > double m_width { 1 }; > double m_height { 1 }; > float m_pressure { 0 }; >diff --git a/Source/WebCore/dom/PointerID.h b/Source/WebCore/dom/PointerID.h >new file mode 100644 >index 0000000000000000000000000000000000000000..9ab82f3faa73967e55146b3e924628c39f40d4ca >--- /dev/null >+++ b/Source/WebCore/dom/PointerID.h >@@ -0,0 +1,36 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(POINTER_EVENTS) >+ >+namespace WebCore { >+ >+typedef int32_t PointerID; >+ >+} >+ >+#endif // ENABLE(POINTER_EVENTS) >diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp >index 1c95922dc2ac9c091b32bf45811f0a353313bab4..edcc3ff4f01f68101982115510bbbe52ffa6dcd8 100644 >--- a/Source/WebCore/page/PointerCaptureController.cpp >+++ b/Source/WebCore/page/PointerCaptureController.cpp >@@ -42,7 +42,7 @@ PointerCaptureController::PointerCaptureController(Page& page) > { > } > >-ExceptionOr<void> PointerCaptureController::setPointerCapture(Element* capturingTarget, int32_t pointerId) >+ExceptionOr<void> PointerCaptureController::setPointerCapture(Element* capturingTarget, PointerID pointerId) > { > // https://w3c.github.io/pointerevents/#setting-pointer-capture > >@@ -72,7 +72,7 @@ ExceptionOr<void> PointerCaptureController::setPointerCapture(Element* capturing > return { }; > } > >-ExceptionOr<void> PointerCaptureController::releasePointerCapture(Element* capturingTarget, int32_t pointerId) >+ExceptionOr<void> PointerCaptureController::releasePointerCapture(Element* capturingTarget, PointerID pointerId) > { > // https://w3c.github.io/pointerevents/#releasing-pointer-capture > >@@ -95,7 +95,7 @@ ExceptionOr<void> PointerCaptureController::releasePointerCapture(Element* captu > return { }; > } > >-bool PointerCaptureController::hasPointerCapture(Element* capturingTarget, int32_t pointerId) >+bool PointerCaptureController::hasPointerCapture(Element* capturingTarget, PointerID pointerId) > { > // https://w3c.github.io/pointerevents/#dom-element-haspointercapture > >@@ -123,12 +123,12 @@ void PointerCaptureController::pointerLockWasApplied() > } > } > >-void PointerCaptureController::touchEndedOrWasCancelledForIdentifier(int32_t pointerId) >+void PointerCaptureController::touchEndedOrWasCancelledForIdentifier(PointerID pointerId) > { > m_activePointerIdsToCapturingData.remove(pointerId); > } > >-bool PointerCaptureController::hasCancelledPointerEventForIdentifier(int32_t pointerId) >+bool PointerCaptureController::hasCancelledPointerEventForIdentifier(PointerID pointerId) > { > auto iterator = m_activePointerIdsToCapturingData.find(pointerId); > return iterator != m_activePointerIdsToCapturingData.end() && iterator->value.cancelled; >@@ -183,7 +183,7 @@ void PointerCaptureController::pointerEventWasDispatched(const PointerEvent& eve > processPendingPointerCapture(event); > } > >-void PointerCaptureController::cancelPointer(int32_t pointerId, const IntPoint& documentPoint) >+void PointerCaptureController::cancelPointer(PointerID pointerId, const IntPoint& documentPoint) > { > // https://w3c.github.io/pointerevents/#the-pointercancel-event > >diff --git a/Source/WebCore/page/PointerCaptureController.h b/Source/WebCore/page/PointerCaptureController.h >index 720a5774235509659c7a5f40a9aa25186a7ee060..5cfb1e957282f8e4056407e0a5f88a2de3cac404 100644 >--- a/Source/WebCore/page/PointerCaptureController.h >+++ b/Source/WebCore/page/PointerCaptureController.h >@@ -26,6 +26,7 @@ > > #if ENABLE(POINTER_EVENTS) > >+#include "PointerID.h" > #include <wtf/HashMap.h> > > namespace WebCore { >@@ -40,17 +41,17 @@ class PointerCaptureController { > public: > explicit PointerCaptureController(Page&); > >- ExceptionOr<void> setPointerCapture(Element*, int32_t); >- ExceptionOr<void> releasePointerCapture(Element*, int32_t); >- bool hasPointerCapture(Element*, int32_t); >+ ExceptionOr<void> setPointerCapture(Element*, PointerID); >+ ExceptionOr<void> releasePointerCapture(Element*, PointerID); >+ bool hasPointerCapture(Element*, PointerID); > > void pointerLockWasApplied(); > >- void touchEndedOrWasCancelledForIdentifier(int32_t); >- bool hasCancelledPointerEventForIdentifier(int32_t); >+ void touchEndedOrWasCancelledForIdentifier(PointerID); >+ bool hasCancelledPointerEventForIdentifier(PointerID); > void pointerEventWillBeDispatched(const PointerEvent&, EventTarget*); > void pointerEventWasDispatched(const PointerEvent&); >- WEBCORE_EXPORT void cancelPointer(int32_t, const IntPoint&); >+ WEBCORE_EXPORT void cancelPointer(PointerID, const IntPoint&); > > private: > struct CapturingData { >@@ -63,7 +64,7 @@ private: > void processPendingPointerCapture(const PointerEvent&); > > Page& m_page; >- HashMap<int32_t, CapturingData> m_activePointerIdsToCapturingData; >+ HashMap<PointerID, CapturingData> m_activePointerIdsToCapturingData; > }; > > } // namespace WebCore >diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py >index 23ad225f988522fc8c2a5996811af2be8e5fccfc..8a5eb60ca1e4380a1d0e68f8cf79120d05158070 100644 >--- a/Source/WebKit/Scripts/webkit/messages.py >+++ b/Source/WebKit/Scripts/webkit/messages.py >@@ -199,6 +199,7 @@ def forward_declarations_and_headers(receiver): > 'String', > 'WebCore::DocumentIdentifier', > 'WebCore::FetchIdentifier', >+ 'WebCore::PointerID', > 'WebCore::ServiceWorkerIdentifier', > 'WebCore::ServiceWorkerJobIdentifier', > 'WebCore::ServiceWorkerOrClientData', >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 6a15c801beafdc6ad2d8d5fc42cd707c31d2fbf1..369b33c98671e25746e6ddce1924a9abe545287c 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -2650,7 +2650,7 @@ void WebPageProxy::handleTouchEvent(const NativeWebTouchEvent& event) > #endif // ENABLE(TOUCH_EVENTS) > > #if ENABLE(POINTER_EVENTS) >-void WebPageProxy::cancelPointer(int32_t pointerId, const WebCore::IntPoint& documentPoint) >+void WebPageProxy::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint) > { > m_process->send(Messages::WebPage::CancelPointer(pointerId, documentPoint), m_pageID); > } >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index a7f9c5d18cc3f56974b36c261b85f3668ed77248..841f2a54724914405b270348717365e5b653755c 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -81,6 +81,7 @@ > #include <WebCore/MediaPlaybackTargetContext.h> > #include <WebCore/MediaProducer.h> > #include <WebCore/PlatformScreen.h> >+#include <WebCore/PointerID.h> > #include <WebCore/ScrollTypes.h> > #include <WebCore/SearchPopupMenu.h> > #include <WebCore/TextChecking.h> >@@ -791,7 +792,7 @@ public: > #endif > > #if ENABLE(POINTER_EVENTS) >- void cancelPointer(int32_t, const WebCore::IntPoint&); >+ void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&); > #endif > > void scrollBy(WebCore::ScrollDirection, WebCore::ScrollGranularity); >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 3d1ba8778e1aa6d4edf15dc6402af4d2e63a6af7..5f95e92ec911f46509aacaecb802b9fbd3897714 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -2816,7 +2816,7 @@ void WebPage::touchEvent(const WebTouchEvent& touchEvent) > #endif > > #if ENABLE(POINTER_EVENTS) >-void WebPage::cancelPointer(int32_t pointerId, const WebCore::IntPoint& documentPoint) >+void WebPage::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint) > { > m_page->pointerCaptureController().cancelPointer(pointerId, documentPoint); > } >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index c711456905f650d73aa3ef51771945d6f2de0b70..4277c9d04303effa2655472aa61a42897f9d4a10 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -65,6 +65,7 @@ > #include <WebCore/Page.h> > #include <WebCore/PageOverlay.h> > #include <WebCore/PluginData.h> >+#include <WebCore/PointerID.h> > #include <WebCore/SecurityPolicyViolationEvent.h> > #include <WebCore/ShareData.h> > #include <WebCore/UserActivity.h> >@@ -1251,7 +1252,7 @@ private: > #endif > > #if ENABLE(POINTER_EVENTS) >- void cancelPointer(int32_t, const WebCore::IntPoint&); >+ void cancelPointer(WebCore::PointerID, const WebCore::IntPoint&); > #endif > > #if ENABLE(CONTEXT_MENUS) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >index 2fbe1453cf1f50311d2864f02428c7be01f57aa1..776ed755639356dc50e04f3acabbbc89aabb566d 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >@@ -128,7 +128,7 @@ messages -> WebPage LegacyReceiver { > #endif > > #if ENABLE(POINTER_EVENTS) >- CancelPointer(int32_t pointerId, WebCore::IntPoint documentPoint) >+ CancelPointer(WebCore::PointerID pointerId, WebCore::IntPoint documentPoint) > #endif > > #if ENABLE(INPUT_TYPE_COLOR)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194217
:
361052
|
361055