Changeset 246072 in webkit
- Timestamp:
- Jun 4, 2019, 10:59:51 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/PointerCaptureController.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246070 r246072 1 2019-06-04 Keith Rollin <krollin@apple.com> 2 3 Fix 32-bit/64-bit mismatch in PointerCaptureController::elementWasRemoved 4 https://bugs.webkit.org/show_bug.cgi?id=198501 5 <rdar://problem/51370464> 6 7 Reviewed by Chris Dumez. 8 9 keyAndValue.key is assigned to pointerId. KeyAndValue.key is a 10 int64_t, whereas pointerId is a PointerID, aka int32_t. This mismatch 11 is normally just a warning, but breaks builds where warnings are 12 treated as errors. 13 14 This issue is not encountered in most builds because the warning is 15 disabled in the majority of build configurations. But there are some 16 where the warning is not disabled, and so those builds break. 17 18 Address this conversion error/warning by explicitly casting 19 keyAndValue.key to a PointerID (and adding a debug check to make sure 20 the cast is OK). 21 22 No new tests -- no new functionality. 23 24 * page/PointerCaptureController.cpp: 25 (WebCore::PointerCaptureController::elementWasRemoved): 26 1 27 2019-06-02 Antoine Quint <graouts@apple.com> 2 28 -
trunk/Source/WebCore/page/PointerCaptureController.cpp
r246061 r246072 35 35 #include "Page.h" 36 36 #include "PointerEvent.h" 37 #include <wtf/CheckedArithmetic.h> 37 38 38 39 #if ENABLE(POINTER_LOCK) … … 134 135 // override nodes SHOULD be cleared and also a PointerEvent named lostpointercapture corresponding to the captured pointer SHOULD be fired 135 136 // at the document. 136 auto pointerId = keyAndValue.key; 137 ASSERT(WTF::isInBounds<PointerID>(keyAndValue.key)); 138 auto pointerId = static_cast<PointerID>(keyAndValue.key); 137 139 auto pointerType = capturingData.pointerType; 138 140 releasePointerCapture(&element, pointerId);
Note:
See TracChangeset
for help on using the changeset viewer.