| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_isShown(true) |
| 74 { | 75 { |
| 75 } | 76 } |
| 76 | 77 |
| 77 HTMLMediaElement& MediaControlElement::mediaElement() const | 78 HTMLMediaElement& MediaControlElement::mediaElement() const |
| 78 { | 79 { |
| 79 return mediaControls().mediaElement(); | 80 return mediaControls().mediaElement(); |
| 80 } | 81 } |
| 81 | 82 |
| 82 void MediaControlElement::hide() | 83 void MediaControlElement::hide() |
| 83 { | 84 { |
| 84 m_element->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); | 85 m_element->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); |
| 86 m_isShown = false; |
| 85 } | 87 } |
| 86 | 88 |
| 87 void MediaControlElement::show() | 89 void MediaControlElement::show() |
| 88 { | 90 { |
| 89 m_element->removeInlineStyleProperty(CSSPropertyDisplay); | 91 m_element->removeInlineStyleProperty(CSSPropertyDisplay); |
| 92 m_isShown = true; |
| 93 } |
| 94 |
| 95 bool MediaControlElement::isShown() |
| 96 { |
| 97 return m_isShown; |
| 90 } | 98 } |
| 91 | 99 |
| 92 void MediaControlElement::setDisplayType(MediaControlElementType displayType) | 100 void MediaControlElement::setDisplayType(MediaControlElementType displayType) |
| 93 { | 101 { |
| 94 if (displayType == m_displayType) | 102 if (displayType == m_displayType) |
| 95 return; | 103 return; |
| 96 | 104 |
| 97 m_displayType = displayType; | 105 m_displayType = displayType; |
| 98 if (LayoutObject* object = m_element->layoutObject()) | 106 if (LayoutObject* object = m_element->layoutObject()) |
| 99 object->setShouldDoFullPaintInvalidation(); | 107 object->setShouldDoFullPaintInvalidation(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 , m_currentValue(0) | 152 , m_currentValue(0) |
| 145 { | 153 { |
| 146 } | 154 } |
| 147 | 155 |
| 148 void MediaControlTimeDisplayElement::setCurrentValue(double time) | 156 void MediaControlTimeDisplayElement::setCurrentValue(double time) |
| 149 { | 157 { |
| 150 m_currentValue = time; | 158 m_currentValue = time; |
| 151 } | 159 } |
| 152 | 160 |
| 153 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |