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 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 MediaControlElementType mediaControlElementType(Node* node) | 61 MediaControlElementType mediaControlElementType(Node* node) |
62 { | 62 { |
63 ASSERT_WITH_SECURITY_IMPLICATION(node->isMediaControlElement()); | 63 ASSERT_WITH_SECURITY_IMPLICATION(node->isMediaControlElement()); |
64 HTMLElement* element = toHTMLElement(node); | 64 HTMLElement* element = toHTMLElement(node); |
65 if (isHTMLInputElement(*element)) | 65 if (isHTMLInputElement(*element)) |
66 return static_cast<MediaControlInputElement*>(element)->displayType(); | 66 return static_cast<MediaControlInputElement*>(element)->displayType(); |
67 return static_cast<MediaControlDivElement*>(element)->displayType(); | 67 return static_cast<MediaControlDivElement*>(element)->displayType(); |
68 } | 68 } |
69 | 69 |
70 MediaControlElement::MediaControlElement(MediaControls& mediaControls, MediaCont
rolElementType displayType, HTMLElement* element) | 70 MediaControlElement::MediaControlElement(MediaControls& mediaControls, MediaCont
rolElementType displayType, HTMLElement* element) |
71 : m_mediaControls(mediaControls) | 71 : m_mediaControls(&mediaControls) |
72 , m_displayType(displayType) | 72 , m_displayType(displayType) |
73 , m_element(element) | 73 , m_element(element) |
74 , m_isWanted(true) | 74 , m_isWanted(true) |
75 , m_doesFit(true) | 75 , m_doesFit(true) |
76 { | 76 { |
77 } | 77 } |
78 | 78 |
79 HTMLMediaElement& MediaControlElement::mediaElement() const | 79 HTMLMediaElement& MediaControlElement::mediaElement() const |
80 { | 80 { |
81 return mediaControls().mediaElement(); | 81 return mediaControls().mediaElement(); |
(...skipping 29 matching lines...) Expand all Loading... |
111 if (displayType == m_displayType) | 111 if (displayType == m_displayType) |
112 return; | 112 return; |
113 | 113 |
114 m_displayType = displayType; | 114 m_displayType = displayType; |
115 if (LayoutObject* object = m_element->layoutObject()) | 115 if (LayoutObject* object = m_element->layoutObject()) |
116 object->setShouldDoFullPaintInvalidation(); | 116 object->setShouldDoFullPaintInvalidation(); |
117 } | 117 } |
118 | 118 |
119 DEFINE_TRACE(MediaControlElement) | 119 DEFINE_TRACE(MediaControlElement) |
120 { | 120 { |
| 121 visitor->trace(m_mediaControls); |
121 visitor->trace(m_element); | 122 visitor->trace(m_element); |
122 } | 123 } |
123 | 124 |
124 // ---------------------------- | 125 // ---------------------------- |
125 | 126 |
126 MediaControlDivElement::MediaControlDivElement(MediaControls& mediaControls, Med
iaControlElementType displayType) | 127 MediaControlDivElement::MediaControlDivElement(MediaControls& mediaControls, Med
iaControlElementType displayType) |
127 : HTMLDivElement(mediaControls.document()) | 128 : HTMLDivElement(mediaControls.document()) |
128 , MediaControlElement(mediaControls, displayType, this) | 129 , MediaControlElement(mediaControls, displayType, this) |
129 { | 130 { |
130 } | 131 } |
(...skipping 30 matching lines...) Expand all Loading... |
161 , m_currentValue(0) | 162 , m_currentValue(0) |
162 { | 163 { |
163 } | 164 } |
164 | 165 |
165 void MediaControlTimeDisplayElement::setCurrentValue(double time) | 166 void MediaControlTimeDisplayElement::setCurrentValue(double time) |
166 { | 167 { |
167 m_currentValue = time; | 168 m_currentValue = time; |
168 } | 169 } |
169 | 170 |
170 } // namespace blink | 171 } // namespace blink |
OLD | NEW |