Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: third_party/WebKit/WebCore/loader/MediaDocument.cpp

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 Tokenizer* MediaDocument::createTokenizer() 141 Tokenizer* MediaDocument::createTokenizer()
142 { 142 {
143 return new MediaTokenizer(this); 143 return new MediaTokenizer(this);
144 } 144 }
145 145
146 void MediaDocument::defaultEventHandler(Event* event) 146 void MediaDocument::defaultEventHandler(Event* event)
147 { 147 {
148 // Match the default Quicktime plugin behavior to allow 148 // Match the default Quicktime plugin behavior to allow
149 // clicking and double-clicking to pause and play the media. 149 // clicking and double-clicking to pause and play the media.
150 Node* targetNode = event->target()->toNode(); 150 EventTargetNode* targetNode = event->target()->toNode();
151 if (targetNode && targetNode->hasTagName(videoTag)) { 151 if (targetNode && targetNode->hasTagName(videoTag)) {
152 HTMLVideoElement* video = static_cast<HTMLVideoElement*>(targetNode); 152 HTMLVideoElement* video = static_cast<HTMLVideoElement*>(targetNode);
153 ExceptionCode ec; 153 ExceptionCode ec;
154 if (event->type() == eventNames().clickEvent) { 154 if (event->type() == eventNames().clickEvent) {
155 if (!video->canPlay()) { 155 if (!video->canPlay()) {
156 video->pause(ec); 156 video->pause(ec);
157 event->setDefaultHandled(); 157 event->setDefaultHandled();
158 } 158 }
159 } else if (event->type() == eventNames().dblclickEvent) { 159 } else if (event->type() == eventNames().dblclickEvent) {
160 if (video->canPlay()) { 160 if (video->canPlay()) {
161 video->play(ec); 161 video->play(ec);
162 event->setDefaultHandled(); 162 event->setDefaultHandled();
163 } 163 }
164 } 164 }
165 } 165 }
166 } 166 }
167 167
168 } 168 }
169 #endif 169 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/loader/FrameLoaderClient.h ('k') | third_party/WebKit/WebCore/page/AccessibilityRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698