WebKit Bugzilla
Attachment 370685 Details for
Bug 198191
: [Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198191-20190527120502.patch (text/plain), 3.85 KB, created by
Antoine Quint
on 2019-05-27 03:05:04 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2019-05-27 03:05:04 PDT
Size:
3.85 KB
patch
obsolete
>Subversion Revision: 245774 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6007880cf64930696bf5c87aa157bb11b3f362ca..1552d334bc800eaa351c6f9a552866f2a46db536 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-05-27 Antoine Quint <graouts@apple.com> >+ >+ [Pointer Events] Check that capturing data managed by the PointerCaptureController gets cleared upon navigation >+ https://bugs.webkit.org/show_bug.cgi?id=198191 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When the document of the page's main frame changes, make sure we clear all of the data accumulated for the previous document. >+ I don't think this particular change is testable as none of the data contained in the PointerIdToCapturingDataMap maintained by >+ the PointerCaptureController contains any data that could be inspected by the page due to other fixes landed to fix wkb.ug/198129, >+ but I've checked that removing those fixes and using this patch correctly fixes that bug. >+ >+ * page/Page.cpp: >+ (WebCore::Page::didChangeMainDocument): >+ * page/PointerCaptureController.cpp: >+ (WebCore::PointerCaptureController::PointerCaptureController): >+ (WebCore::PointerCaptureController::reset): >+ * page/PointerCaptureController.h: >+ > 2019-05-25 Antoine Quint <graouts@apple.com> > > Opt naver.com into simulated mouse events quirk on iOS >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index aa013bf7633ece036de90bfe745ba437df25805d..8168115724718f133eb068dec9bb0c5aa77b6611 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -2860,6 +2860,9 @@ void Page::didChangeMainDocument() > #if ENABLE(WEB_RTC) > m_rtcController.reset(m_shouldEnableICECandidateFilteringByDefault); > #endif >+#if ENABLE(POINTER_EVENTS) >+ m_pointerCaptureController->reset(); >+#endif > } > > RenderingUpdateScheduler& Page::renderingUpdateScheduler() >diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp >index 94221522d1ec4076f90d230a28a6f713d768bcca..efa12a15d9bd7e19d2ae1841160a8694a0a66391 100644 >--- a/Source/WebCore/page/PointerCaptureController.cpp >+++ b/Source/WebCore/page/PointerCaptureController.cpp >@@ -44,11 +44,7 @@ namespace WebCore { > PointerCaptureController::PointerCaptureController(Page& page) > : m_page(page) > { >-#if !ENABLE(TOUCH_EVENTS) >- CapturingData capturingData; >- capturingData.pointerType = PointerEvent::mousePointerType(); >- m_activePointerIdsToCapturingData.set(mousePointerID, capturingData); >-#endif >+ reset(); > } > > ExceptionOr<void> PointerCaptureController::setPointerCapture(Element* capturingTarget, PointerID pointerId) >@@ -146,6 +142,16 @@ void PointerCaptureController::elementWasRemoved(Element& element) > } > } > >+void PointerCaptureController::reset() >+{ >+ m_activePointerIdsToCapturingData.clear(); >+#if !ENABLE(TOUCH_EVENTS) >+ CapturingData capturingData; >+ capturingData.pointerType = PointerEvent::mousePointerType(); >+ m_activePointerIdsToCapturingData.set(mousePointerID, capturingData); >+#endif >+} >+ > void PointerCaptureController::touchWithIdentifierWasRemoved(PointerID pointerId) > { > m_activePointerIdsToCapturingData.remove(pointerId); >diff --git a/Source/WebCore/page/PointerCaptureController.h b/Source/WebCore/page/PointerCaptureController.h >index 0a27c79d6d689cc975fc620432097cb22747bbd5..4311c46e13d20678d8361e7a06fea3904bb19fc3 100644 >--- a/Source/WebCore/page/PointerCaptureController.h >+++ b/Source/WebCore/page/PointerCaptureController.h >@@ -44,6 +44,7 @@ public: > ExceptionOr<void> setPointerCapture(Element*, PointerID); > ExceptionOr<void> releasePointerCapture(Element*, PointerID); > bool hasPointerCapture(Element*, PointerID); >+ void reset(); > > void pointerLockWasApplied(); > void elementWasRemoved(Element&);
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
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198191
: 370685