OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "ScriptController.h" | 50 #include "ScriptController.h" |
51 #include "Settings.h" | 51 #include "Settings.h" |
52 | 52 |
53 namespace WebCore { | 53 namespace WebCore { |
54 | 54 |
55 using namespace HTMLNames; | 55 using namespace HTMLNames; |
56 | 56 |
57 HTMLMediaElement* toParentMediaElement(Node* node) | 57 HTMLMediaElement* toParentMediaElement(Node* node) |
58 { | 58 { |
59 Node* mediaNode = node ? node->shadowAncestorNode() : 0; | 59 Node* mediaNode = node ? node->shadowAncestorNode() : 0; |
60 if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode
->hasTagName(HTMLNames::audioTag))) | 60 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(medi
aNode)->isMediaElement()) |
61 return 0; | 61 return 0; |
62 | 62 |
63 return static_cast<HTMLMediaElement*>(mediaNode); | 63 return static_cast<HTMLMediaElement*>(mediaNode); |
64 } | 64 } |
65 | 65 |
66 // FIXME: These constants may need to be tweaked to better match the seeking in
the QuickTime plug-in. | 66 // FIXME: These constants may need to be tweaked to better match the seeking in
the QuickTime plug-in. |
67 static const float cSeekRepeatDelay = 0.1f; | 67 static const float cSeekRepeatDelay = 0.1f; |
68 static const float cStepTime = 0.07f; | 68 static const float cStepTime = 0.07f; |
69 static const float cSeekTime = 0.2f; | 69 static const float cSeekTime = 0.2f; |
70 | 70 |
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 | 1060 |
1061 const AtomicString& MediaControlCurrentTimeDisplayElement::shadowPseudoId() cons
t | 1061 const AtomicString& MediaControlCurrentTimeDisplayElement::shadowPseudoId() cons
t |
1062 { | 1062 { |
1063 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time-
display")); | 1063 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time-
display")); |
1064 return id; | 1064 return id; |
1065 } | 1065 } |
1066 | 1066 |
1067 } // namespace WebCore | 1067 } // namespace WebCore |
1068 | 1068 |
1069 #endif // ENABLE(VIDEO) | 1069 #endif // ENABLE(VIDEO) |
OLD | NEW |