WebKit Bugzilla
Attachment 371233 Details for
Bug 198501
: Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198501-20190603175849.patch (text/plain), 2.78 KB, created by
Keith Rollin
on 2019-06-03 17:58:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Keith Rollin
Created:
2019-06-03 17:58:50 PDT
Size:
2.78 KB
patch
obsolete
>Subversion Revision: 246050 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 039281ee2533fefddcd29123a7c63890a90868fd..5af36a3d40fa15123f63b194449b56e02a38486f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2019-06-03 Keith Rollin <krollin@apple.com> >+ >+ Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved >+ https://bugs.webkit.org/show_bug.cgi?id=198501 >+ <rdar://problem/51370464> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ keyAndValue.key is assigned to pointerId. KeyAndValue.key is a >+ int64_t, whereas pointerId is a PointerID, aka int32_t. This mismatch >+ is normally just a warning, but breaks builds where warnings are >+ treated as errors. >+ >+ This issue is not encountered in most builds because the warning is >+ disabled in the majority of build configurations. But there are some >+ where the warning is not disabled, and so those builds break. >+ >+ Address this conversion error/warning by explicitly casting >+ keyAndValue.key to a PointerID (and adding a debug check to make sure >+ the cast is OK). >+ >+ No new tests -- no new functionality. >+ >+ * page/PointerCaptureController.cpp: >+ (WebCore::PointerCaptureController::elementWasRemoved): >+ > 2019-06-03 Youenn Fablet <youenn@apple.com> > > Allow resizing of camera video feeds to very small resolutions >diff --git a/Source/WebCore/page/PointerCaptureController.cpp b/Source/WebCore/page/PointerCaptureController.cpp >index fdf2ec49c1b5e9878f30316cf76f2bdc53cb8f22..b91784036f46fe0c83cf7b39151b05ab6c91180c 100644 >--- a/Source/WebCore/page/PointerCaptureController.cpp >+++ b/Source/WebCore/page/PointerCaptureController.cpp >@@ -34,6 +34,7 @@ > #include "EventTarget.h" > #include "Page.h" > #include "PointerEvent.h" >+#include <wtf/CheckedArithmetic.h> > > #if ENABLE(POINTER_LOCK) > #include "PointerLockController.h" >@@ -133,7 +134,8 @@ void PointerCaptureController::elementWasRemoved(Element& element) > // When the pointer capture target override is no longer connected, the pending pointer capture target override and pointer capture target > // override nodes SHOULD be cleared and also a PointerEvent named lostpointercapture corresponding to the captured pointer SHOULD be fired > // at the document. >- auto pointerId = keyAndValue.key; >+ ASSERT(WTF::isInBounds<PointerID>(keyAndValue.key)); >+ auto pointerId = static_cast<PointerID>(keyAndValue.key); > auto pointerType = capturingData.pointerType; > releasePointerCapture(&element, pointerId); > element.document().enqueueDocumentEvent(PointerEvent::create(eventNames().lostpointercaptureEvent, pointerId, pointerType));
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 198501
: 371233