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

Side by Side Diff: Source/WebCore/html/shadow/MediaControlElements.cpp

Issue 8758009: Merge 100408 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: '' Created 9 years 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
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "RenderSlider.h" 47 #include "RenderSlider.h"
48 #include "RenderTheme.h" 48 #include "RenderTheme.h"
49 #include "RenderView.h" 49 #include "RenderView.h"
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 // FIXME: These constants may need to be tweaked to better match the seeking in the QuickTime plug-in.
58 static const float cSkipRepeatDelay = 0.1f;
59 static const float cSkipTime = 0.2f;
60 static const float cScanRepeatDelay = 1.5f;
61 static const float cScanMaximumRate = 8;
62
57 HTMLMediaElement* toParentMediaElement(Node* node) 63 HTMLMediaElement* toParentMediaElement(Node* node)
58 { 64 {
59 Node* mediaNode = node ? node->shadowAncestorNode() : 0; 65 Node* mediaNode = node ? node->shadowAncestorNode() : 0;
60 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(medi aNode)->isMediaElement()) 66 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(medi aNode)->isMediaElement())
61 return 0; 67 return 0;
62 68
63 return static_cast<HTMLMediaElement*>(mediaNode); 69 return static_cast<HTMLMediaElement*>(mediaNode);
64 } 70 }
65 71
66 // FIXME: These constants may need to be tweaked to better match the seeking in the QuickTime plug-in. 72 MediaControlElementType mediaControlElementType(Node* node)
67 static const float cSkipRepeatDelay = 0.1f; 73 {
68 static const float cSkipTime = 0.2f; 74 ASSERT(node->isMediaControlElement());
69 static const float cScanRepeatDelay = 1.5f; 75 HTMLElement* element = toHTMLElement(node);
70 static const float cScanMaximumRate = 8; 76 if (element->hasTagName(inputTag))
77 return static_cast<MediaControlInputElement*>(element)->displayType();
78 return static_cast<MediaControlElement*>(element)->displayType();
79 }
71 80
72 // ---------------------------- 81 // ----------------------------
73 82
74 MediaControlElement::MediaControlElement(HTMLMediaElement* mediaElement) 83 MediaControlElement::MediaControlElement(HTMLMediaElement* mediaElement)
75 : HTMLDivElement(divTag, mediaElement->document()) 84 : HTMLDivElement(divTag, mediaElement->document())
76 , m_mediaElement(mediaElement) 85 , m_mediaElement(mediaElement)
77 { 86 {
78 } 87 }
79 88
80 void MediaControlElement::show() 89 void MediaControlElement::show()
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 1107
1099 const AtomicString& MediaControlCurrentTimeDisplayElement::shadowPseudoId() cons t 1108 const AtomicString& MediaControlCurrentTimeDisplayElement::shadowPseudoId() cons t
1100 { 1109 {
1101 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time- display")); 1110 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time- display"));
1102 return id; 1111 return id;
1103 } 1112 }
1104 1113
1105 } // namespace WebCore 1114 } // namespace WebCore
1106 1115
1107 #endif // ENABLE(VIDEO) 1116 #endif // ENABLE(VIDEO)
OLDNEW
« no previous file with comments | « Source/WebCore/html/shadow/MediaControlElements.h ('k') | Source/WebCore/platform/efl/RenderThemeEfl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698