Changeset 185955 in webkit
- Timestamp:
- Jun 25, 2015, 10:42:00 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r185954 r185955 1 2015-06-25 Zalan Bujtas <zalan@apple.com> 2 3 Do not send touch events to the slider's thumb when it does not have a renderer. 4 https://bugs.webkit.org/show_bug.cgi?id=146307 5 rdar://problem/21539399 6 7 Reviewed by Simon Fraser. 8 9 Bail out early if either the touch target or the renderer() is null. 10 11 * fast/events/touch/input-range-with-thumb-display-none-crash-expected.txt: Added. 12 * fast/events/touch/input-range-with-thumb-display-none-crash.html: Added. 13 1 14 2015-06-25 Michael Saboff <msaboff@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r185953 r185955 1 2015-06-25 Zalan Bujtas <zalan@apple.com> 2 3 Do not send touch events to the slider's thumb when it does not have a renderer. 4 https://bugs.webkit.org/show_bug.cgi?id=146307 5 rdar://problem/21539399 6 7 Reviewed by Simon Fraser. 8 9 Bail out early if either the touch target or the renderer() is null. 10 11 Test: fast/events/touch/input-range-with-thumb-display-none-crash.html 12 13 * html/shadow/SliderThumbElement.cpp: 14 (WebCore::findTouchWithIdentifier): 15 (WebCore::SliderThumbElement::handleTouchStart): 16 (WebCore::SliderThumbElement::handleTouchMove): 17 (WebCore::SliderThumbElement::handleTouchEndAndCancel): 18 1 19 2015-06-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr> 2 20 -
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r183975 r185955 419 419 } 420 420 421 static Touch* findTouchWithIdentifier(TouchList *list, unsigned identifier)422 { 423 unsigned length = list ->length();421 static Touch* findTouchWithIdentifier(TouchList& list, unsigned identifier) 422 { 423 unsigned length = list.length(); 424 424 for (unsigned i = 0; i < length; ++i) { 425 Touch* touch = list ->item(i);425 Touch* touch = list.item(i); 426 426 if (touch->identifier() == identifier) 427 427 return touch; … … 433 433 { 434 434 TouchList* targetTouches = touchEvent->targetTouches(); 435 if (!targetTouches) 436 return; 437 435 438 if (targetTouches->length() != 1) 436 439 return; 437 440 441 Touch* touch = targetTouches->item(0); 442 if (!renderer()) 443 return; 444 IntRect boundingBox = renderer()->absoluteBoundingBoxRect(); 438 445 // Ignore the touch if it is not really inside the thumb. 439 Touch* touch = targetTouches->item(0);440 IntRect boundingBox = renderer()->absoluteBoundingBoxRect();441 446 if (!boundingBox.contains(touch->pageX(), touch->pageY())) 442 447 return; … … 454 459 return; 455 460 456 Touch* touch = findTouchWithIdentifier(touchEvent->targetTouches(), identifier); 461 TouchList* targetTouches = touchEvent->targetTouches(); 462 if (!targetTouches) 463 return; 464 465 Touch* touch = findTouchWithIdentifier(*targetTouches, identifier); 457 466 if (!touch) 458 467 return; … … 469 478 return; 470 479 480 TouchList* targetTouches = touchEvent->targetTouches(); 481 if (!targetTouches) 482 return; 471 483 // If our exclusive touch still exists, it was not the touch 472 484 // that ended, so we should not stop dragging. 473 Touch* exclusiveTouch = findTouchWithIdentifier( touchEvent->targetTouches(), identifier);485 Touch* exclusiveTouch = findTouchWithIdentifier(*targetTouches, identifier); 474 486 if (exclusiveTouch) 475 487 return;
Note:
See TracChangeset
for help on using the changeset viewer.