Changeset 85510 in webkit
- Timestamp:
- May 2, 2011 1:19:12 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85507 r85510 1 2011-05-02 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Eric Carlson. 4 5 REGRESSIONS (r71934): In standalone media documents, (double-)clicking the media element doesn’t play/pause 6 https://bugs.webkit.org/show_bug.cgi?id=59917 7 8 Since default event handlers are not retargeted, we should always attempt ancestor 9 traversal to find out whether the event. 10 11 * html/MediaDocument.cpp: 12 (WebCore::ancestorVideoElement): Added ancestor-traversing helper. 13 (WebCore::MediaDocument::defaultEventHandler): Changed to use ancestorVideoElement. 14 1 15 2011-05-02 Sam Weinig <sam@webkit.org> 2 16 -
trunk/Source/WebCore/html/MediaDocument.cpp
r85458 r85510 147 147 } 148 148 149 static inline HTMLVideoElement* ancestorVideoElement(Node* node) 150 { 151 while (node && !node->hasTagName(videoTag)) 152 node = node->parentOrHostNode(); 153 154 return static_cast<HTMLVideoElement*>(node); 155 } 156 149 157 void MediaDocument::defaultEventHandler(Event* event) 150 158 { … … 155 163 return; 156 164 157 if (targetNode->hasTagName(videoTag)) { 158 HTMLVideoElement* video = static_cast<HTMLVideoElement*>(targetNode); 165 if (HTMLVideoElement* video = ancestorVideoElement(targetNode)) { 159 166 if (event->type() == eventNames().clickEvent) { 160 167 if (!video->canPlay()) {
Note: See TracChangeset
for help on using the changeset viewer.