Changeset 77954 in webkit
- Timestamp:
- Feb 8, 2011 10:35:22 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r77952 r77954 1 2011-01-28 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Change the rest of HTMLMediaElement shadow DOM parts to use shadowPseudoId. 6 https://bugs.webkit.org/show_bug.cgi?id=53190 7 8 This is the second part of refactoring the HTMLMediaElement to use new 9 shadow DOM. The changes are mainly mechanical, except for needing to 10 add a new method to RenderTheme, which indicates whether or not status 11 display is being used by it. Previously, we relied on existence of a cached 12 pseudo style. 13 14 Refactoring, covered by existing tests. 15 16 * css/CSSSelector.cpp: 17 (WebCore::CSSSelector::pseudoId): Removed now-unused enum values. 18 (WebCore::nameToPseudoTypeMap): Ditto. 19 (WebCore::CSSSelector::extractPseudoType): Ditto. 20 * css/CSSSelector.h: Ditto. 21 * html/shadow/MediaControls.cpp: 22 (WebCore::MediaControls::createPanel): Changed to use the newly-added MediaControlPanelElement. 23 (WebCore::MediaControls::createCurrentTimeDisplay): Changed to use the newly-added 24 MediaControlCurrentTimeDisplayElement. 25 (WebCore::MediaControls::createTimeRemainingDisplay): Changed to use the newly-added 26 MediaControlTimeRemainingDisplayElement. 27 * rendering/MediaControlElements.cpp: 28 (WebCore::MediaControlShadowRootElement::updateStyle): Changed to use the 29 standard style resolution. 30 (WebCore::MediaControlShadowRootElement::shadowPseudoId): Added. 31 (WebCore::MediaControlElement::MediaControlElement): Removed the switch statement 32 that is no longer necessary. 33 (WebCore::MediaControlElement::styleForElement): Changed to use the standard 34 style resolution. 35 (WebCore::MediaControlPanelElement::MediaControlPanelElement): Added. 36 (WebCore::MediaControlPanelElement::create): Added. 37 (WebCore::MediaControlPanelElement::displayType): Added. 38 (WebCore::MediaControlPanelElement::shadowPseudoId): Added. 39 (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): 40 Removed PseudoId constructor arg. 41 (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): 42 Changed to use the newly-plumbed usesMediaControlStatusDisplay helper. 43 (WebCore::MediaControlTimelineContainerElement::displayType): Added. 44 (WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Added. 45 (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): 46 Removed PseudoId constructor arg. 47 (WebCore::MediaControlVolumeSliderContainerElement::displayType): Added. 48 (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Added. 49 (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): 50 Removed PseudoId constructor arg. 51 (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Changed to 52 use the newly-plumbed usesMediaControlStatusDisplay helper. 53 (WebCore::MediaControlStatusDisplayElement::displayType): Added. 54 (WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Added. 55 (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement): 56 Removed PseudoId constructor arg. 57 (WebCore::MediaControlTimeRemainingDisplayElement::create): Added. 58 (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Added. 59 (WebCore::MediaControlTimeRemainingDisplayElement::displayType): Added. 60 (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Added. 61 (WebCore::MediaControlCurrentTimeDisplayElement::create): Added. 62 (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Added. 63 (WebCore::MediaControlCurrentTimeDisplayElement::displayType): Added. 64 (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Added. 65 * rendering/MediaControlElements.h: Added/changed defs accordingly. 66 * rendering/RenderTheme.h: 67 (WebCore::RenderTheme::usesMediaControlStatusDisplay): Added. 68 * rendering/RenderThemeMac.h: Added def. 69 * rendering/RenderThemeMac.mm: 70 (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Added. 71 * rendering/style/RenderStyleConstants.h: Removed now-unused enum values. 72 1 73 2011-02-08 Xiaomei Ji <xji@chromium.org> 2 74 -
trunk/Source/WebCore/css/CSSSelector.cpp
r77211 r77954 139 139 case PseudoSearchResultsButton: 140 140 return SEARCH_RESULTS_BUTTON; 141 case PseudoMediaControlsPanel:142 return MEDIA_CONTROLS_PANEL;143 case PseudoMediaControlsTimelineContainer:144 return MEDIA_CONTROLS_TIMELINE_CONTAINER;145 case PseudoMediaControlsVolumeSliderContainer:146 return MEDIA_CONTROLS_VOLUME_SLIDER_CONTAINER;147 case PseudoMediaControlsCurrentTimeDisplay:148 return MEDIA_CONTROLS_CURRENT_TIME_DISPLAY;149 case PseudoMediaControlsTimeRemainingDisplay:150 return MEDIA_CONTROLS_TIME_REMAINING_DISPLAY;151 case PseudoMediaControlsStatusDisplay:152 return MEDIA_CONTROLS_STATUS_DISPLAY;153 141 case PseudoScrollbar: 154 142 return SCROLLBAR; … … 317 305 DEFINE_STATIC_LOCAL(AtomicString, link, ("link")); 318 306 DEFINE_STATIC_LOCAL(AtomicString, lang, ("lang(")); 319 DEFINE_STATIC_LOCAL(AtomicString, mediaControlsPanel, ("-webkit-media-controls-panel"));320 DEFINE_STATIC_LOCAL(AtomicString, mediaControlsStatusDisplay, ("-webkit-media-controls-status-display"));321 DEFINE_STATIC_LOCAL(AtomicString, mediaControlsTimelineContainer, ("-webkit-media-controls-timeline-container"));322 DEFINE_STATIC_LOCAL(AtomicString, mediaControlsVolumeSliderContainer, ("-webkit-media-controls-volume-slider-container"));323 DEFINE_STATIC_LOCAL(AtomicString, mediaControlsCurrentTimeDisplay, ("-webkit-media-controls-current-time-display"));324 DEFINE_STATIC_LOCAL(AtomicString, mediaControlsTimeRemainingDisplay, ("-webkit-media-controls-time-remaining-display"));325 307 DEFINE_STATIC_LOCAL(AtomicString, notStr, ("not(")); 326 308 DEFINE_STATIC_LOCAL(AtomicString, onlyChild, ("only-child")); … … 419 401 nameToPseudoType->set(link.impl(), CSSSelector::PseudoLink); 420 402 nameToPseudoType->set(lang.impl(), CSSSelector::PseudoLang); 421 nameToPseudoType->set(mediaControlsPanel.impl(), CSSSelector::PseudoMediaControlsPanel);422 nameToPseudoType->set(mediaControlsCurrentTimeDisplay.impl(), CSSSelector::PseudoMediaControlsCurrentTimeDisplay);423 nameToPseudoType->set(mediaControlsTimeRemainingDisplay.impl(), CSSSelector::PseudoMediaControlsTimeRemainingDisplay);424 nameToPseudoType->set(mediaControlsStatusDisplay.impl(), CSSSelector::PseudoMediaControlsStatusDisplay);425 nameToPseudoType->set(mediaControlsTimelineContainer.impl(), CSSSelector::PseudoMediaControlsTimelineContainer);426 nameToPseudoType->set(mediaControlsVolumeSliderContainer.impl(), CSSSelector::PseudoMediaControlsVolumeSliderContainer);427 403 nameToPseudoType->set(notStr.impl(), CSSSelector::PseudoNot); 428 404 nameToPseudoType->set(nthChild.impl(), CSSSelector::PseudoNthChild); … … 515 491 #endif 516 492 case PseudoInnerSpinButton: 517 case PseudoMediaControlsPanel:518 case PseudoMediaControlsCurrentTimeDisplay:519 case PseudoMediaControlsTimeRemainingDisplay:520 case PseudoMediaControlsStatusDisplay:521 case PseudoMediaControlsTimelineContainer:522 case PseudoMediaControlsVolumeSliderContainer:523 493 case PseudoMeterHorizontalBar: 524 494 case PseudoMeterHorizontalOptimum: -
trunk/Source/WebCore/css/CSSSelector.h
r77211 r77954 176 176 PseudoSearchResultsDecoration, 177 177 PseudoSearchResultsButton, 178 PseudoMediaControlsPanel,179 PseudoMediaControlsTimelineContainer,180 PseudoMediaControlsVolumeSliderContainer,181 PseudoMediaControlsCurrentTimeDisplay,182 PseudoMediaControlsTimeRemainingDisplay,183 PseudoMediaControlsStatusDisplay,184 178 PseudoMeterHorizontalBar, 185 179 PseudoMeterVerticalBar, -
trunk/Source/WebCore/html/shadow/MediaControls.cpp
r76951 r77954 240 240 { 241 241 ASSERT(!m_panel); 242 m_panel = MediaControl Element::create(m_mediaElement, MEDIA_CONTROLS_PANEL);242 m_panel = MediaControlPanelElement::create(m_mediaElement); 243 243 m_panel->attachToParent(m_controlsShadowRoot.get()); 244 244 } … … 342 342 { 343 343 ASSERT(!m_currentTimeDisplay); 344 m_currentTimeDisplay = MediaControl TimeDisplayElement::create(m_mediaElement, MEDIA_CONTROLS_CURRENT_TIME_DISPLAY);344 m_currentTimeDisplay = MediaControlCurrentTimeDisplayElement::create(m_mediaElement); 345 345 m_currentTimeDisplay->attachToParent(m_timelineContainer.get()); 346 346 } … … 349 349 { 350 350 ASSERT(!m_timeRemainingDisplay); 351 m_timeRemainingDisplay = MediaControlTime DisplayElement::create(m_mediaElement, MEDIA_CONTROLS_TIME_REMAINING_DISPLAY);351 m_timeRemainingDisplay = MediaControlTimeRemainingDisplayElement::create(m_mediaElement); 352 352 m_timeRemainingDisplay->attachToParent(m_timelineContainer.get()); 353 353 } -
trunk/Source/WebCore/html/shadow/MediaControls.h
r76950 r77954 42 42 class MediaControlPlayButtonElement; 43 43 class MediaControlSeekButtonElement; 44 class MediaControlShadowRootElement; 44 45 class MediaControlRewindButtonElement; 45 46 class MediaControlReturnToRealtimeButtonElement; … … 103 104 104 105 private: 105 RefPtr< HTMLElement> m_controlsShadowRoot;106 RefPtr<MediaControlShadowRootElement> m_controlsShadowRoot; 106 107 RefPtr<MediaControlElement> m_panel; 107 108 RefPtr<MediaControlMuteButtonElement> m_muteButton; -
trunk/Source/WebCore/rendering/MediaControlElements.cpp
r76951 r77954 91 91 } 92 92 93 void MediaControlShadowRootElement::updateStyle()94 {95 if (renderer()) {96 RenderStyle* timelineContainerStyle = shadowHost()->renderer()->getCachedPseudoStyle(MEDIA_CONTROLS_TIMELINE_CONTAINER);97 renderer()->setStyle(timelineContainerStyle);98 }99 }100 101 93 void MediaControlShadowRootElement::detach() 102 94 { … … 108 100 // ---------------------------- 109 101 110 MediaControlElement::MediaControlElement(HTMLMediaElement* mediaElement , PseudoId pseudo)102 MediaControlElement::MediaControlElement(HTMLMediaElement* mediaElement) 111 103 : HTMLDivElement(divTag, mediaElement->document()) 112 104 , m_mediaElement(mediaElement) 113 , m_pseudoStyleId(pseudo)114 105 { 115 106 setInDocument(); 116 switch (pseudo) {117 case MEDIA_CONTROLS_CURRENT_TIME_DISPLAY:118 m_displayType = MediaCurrentTimeDisplay;119 break;120 case MEDIA_CONTROLS_TIME_REMAINING_DISPLAY:121 m_displayType = MediaTimeRemainingDisplay;122 break;123 case MEDIA_CONTROLS_TIMELINE_CONTAINER:124 m_displayType = MediaTimelineContainer;125 break;126 case MEDIA_CONTROLS_STATUS_DISPLAY:127 m_displayType = MediaStatusDisplay;128 break;129 case MEDIA_CONTROLS_PANEL:130 m_displayType = MediaControlsPanel;131 break;132 case MEDIA_CONTROLS_VOLUME_SLIDER_CONTAINER:133 m_displayType = MediaVolumeSliderContainer;134 break;135 default:136 ASSERT_NOT_REACHED();137 break;138 }139 }140 141 PassRefPtr<MediaControlElement> MediaControlElement::create(HTMLMediaElement* mediaElement, PseudoId pseudoStyleId)142 {143 return adoptRef(new MediaControlElement(mediaElement, pseudoStyleId));144 107 } 145 108 … … 160 123 PassRefPtr<RenderStyle> MediaControlElement::styleForElement() 161 124 { 162 RenderStyle* style = m_mediaElement->renderer()->getCachedPseudoStyle(m_pseudoStyleId); 125 ASSERT(m_mediaElement->renderer()); 126 RefPtr<RenderStyle> style = document()->styleSelector()->styleForElement(this, m_mediaElement->renderer()->style(), true); 163 127 if (!style) 164 128 return 0; … … 228 192 // ---------------------------- 229 193 194 inline MediaControlPanelElement::MediaControlPanelElement(HTMLMediaElement* mediaElement) 195 : MediaControlElement(mediaElement) 196 { 197 } 198 199 PassRefPtr<MediaControlPanelElement> MediaControlPanelElement::create(HTMLMediaElement* mediaElement) 200 { 201 return adoptRef(new MediaControlPanelElement(mediaElement)); 202 } 203 204 MediaControlElementType MediaControlPanelElement::displayType() const 205 { 206 return MediaControlsPanel; 207 } 208 209 const AtomicString& MediaControlPanelElement::shadowPseudoId() const 210 { 211 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-panel")); 212 return id; 213 } 214 215 // ---------------------------- 216 230 217 inline MediaControlTimelineContainerElement::MediaControlTimelineContainerElement(HTMLMediaElement* mediaElement) 231 : MediaControlElement(mediaElement , MEDIA_CONTROLS_TIMELINE_CONTAINER)218 : MediaControlElement(mediaElement) 232 219 { 233 220 } … … 243 230 return false; 244 231 245 // This is for MediaControllerThemeClassic: 246 // If there is no style for MediaControlStatusDisplayElement style, don't hide 247 // the timeline. 248 if (!mediaElement()->renderer()->getCachedPseudoStyle(MEDIA_CONTROLS_STATUS_DISPLAY)) 232 // Always show the timeline if the theme doesn't use status display (MediaControllerThemeClassic, for instance). 233 if (!document()->page()->theme()->usesMediaControlStatusDisplay()) 249 234 return true; 250 235 … … 253 238 } 254 239 240 MediaControlElementType MediaControlTimelineContainerElement::displayType() const 241 { 242 return MediaTimelineContainer; 243 } 244 245 const AtomicString& MediaControlTimelineContainerElement::shadowPseudoId() const 246 { 247 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-timeline-container")); 248 return id; 249 } 250 255 251 // ---------------------------- 256 252 257 253 inline MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement(HTMLMediaElement* mediaElement) 258 : MediaControlElement(mediaElement , MEDIA_CONTROLS_VOLUME_SLIDER_CONTAINER)254 : MediaControlElement(mediaElement) 259 255 , m_isVisible(false) 260 256 , m_x(0) … … 301 297 } 302 298 299 MediaControlElementType MediaControlVolumeSliderContainerElement::displayType() const 300 { 301 return MediaVolumeSliderContainer; 302 } 303 304 const AtomicString& MediaControlVolumeSliderContainerElement::shadowPseudoId() const 305 { 306 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-volume-slider-container")); 307 return id; 308 } 309 303 310 // ---------------------------- 304 311 305 312 inline MediaControlStatusDisplayElement::MediaControlStatusDisplayElement(HTMLMediaElement* mediaElement) 306 : MediaControlElement(mediaElement , MEDIA_CONTROLS_STATUS_DISPLAY)313 : MediaControlElement(mediaElement) 307 314 , m_stateBeingDisplayed(Nothing) 308 315 { … … 347 354 bool MediaControlStatusDisplayElement::rendererIsNeeded(RenderStyle* style) 348 355 { 349 if (!MediaControlElement::rendererIsNeeded(style) )356 if (!MediaControlElement::rendererIsNeeded(style) || !document()->page()->theme()->usesMediaControlStatusDisplay()) 350 357 return false; 351 358 float duration = mediaElement()->duration(); 352 359 return (isnan(duration) || isinf(duration)); 360 } 361 362 MediaControlElementType MediaControlStatusDisplayElement::displayType() const 363 { 364 return MediaStatusDisplay; 365 } 366 367 const AtomicString& MediaControlStatusDisplayElement::shadowPseudoId() const 368 { 369 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-status-display")); 370 return id; 353 371 } 354 372 … … 894 912 // ---------------------------- 895 913 896 inline MediaControlTimeDisplayElement::MediaControlTimeDisplayElement(HTMLMediaElement* mediaElement , PseudoId pseudo)897 : MediaControlElement(mediaElement , pseudo)914 inline MediaControlTimeDisplayElement::MediaControlTimeDisplayElement(HTMLMediaElement* mediaElement) 915 : MediaControlElement(mediaElement) 898 916 , m_currentValue(0) 899 917 , m_isVisible(true) 900 918 { 901 }902 903 PassRefPtr<MediaControlTimeDisplayElement> MediaControlTimeDisplayElement::create(HTMLMediaElement* mediaElement, PseudoId pseudoStyleId)904 {905 return adoptRef(new MediaControlTimeDisplayElement(mediaElement, pseudoStyleId));906 919 } 907 920 … … 936 949 } 937 950 951 // ---------------------------- 952 953 PassRefPtr<MediaControlTimeRemainingDisplayElement> MediaControlTimeRemainingDisplayElement::create(HTMLMediaElement* mediaElement) 954 { 955 return adoptRef(new MediaControlTimeRemainingDisplayElement(mediaElement)); 956 } 957 958 MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement(HTMLMediaElement* mediaElement) 959 : MediaControlTimeDisplayElement(mediaElement) 960 { 961 } 962 963 MediaControlElementType MediaControlTimeRemainingDisplayElement::displayType() const 964 { 965 return MediaTimeRemainingDisplay; 966 } 967 968 const AtomicString& MediaControlTimeRemainingDisplayElement::shadowPseudoId() const 969 { 970 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-time-remaining-display")); 971 return id; 972 } 973 974 // ---------------------------- 975 976 PassRefPtr<MediaControlCurrentTimeDisplayElement> MediaControlCurrentTimeDisplayElement::create(HTMLMediaElement* mediaElement) 977 { 978 return adoptRef(new MediaControlCurrentTimeDisplayElement(mediaElement)); 979 } 980 981 MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement(HTMLMediaElement* mediaElement) 982 : MediaControlTimeDisplayElement(mediaElement) 983 { 984 } 985 986 MediaControlElementType MediaControlCurrentTimeDisplayElement::displayType() const 987 { 988 return MediaCurrentTimeDisplay; 989 } 990 991 const AtomicString& MediaControlCurrentTimeDisplayElement::shadowPseudoId() const 992 { 993 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-current-time-display")); 994 return id; 995 } 996 938 997 } // namespace WebCore 939 998 -
trunk/Source/WebCore/rendering/MediaControlElements.h
r76951 r77954 76 76 static PassRefPtr<MediaControlShadowRootElement> create(HTMLMediaElement*); 77 77 78 void updateStyle();79 78 virtual void detach(); 80 79 … … 87 86 class MediaControlElement : public HTMLDivElement { 88 87 public: 89 static PassRefPtr<MediaControlElement> create(HTMLMediaElement*, PseudoId);90 91 88 virtual void attach(); 92 89 void attachToParent(Element*); … … 94 91 void updateStyle(); 95 92 96 MediaControlElementType displayType() const { return m_displayType; }93 virtual MediaControlElementType displayType() const = 0; 97 94 98 95 HTMLMediaElement* mediaElement() const { return m_mediaElement; } 99 96 100 97 protected: 101 MediaControlElement(HTMLMediaElement* , PseudoId);98 MediaControlElement(HTMLMediaElement*); 102 99 103 100 virtual bool rendererIsNeeded(RenderStyle*); … … 109 106 110 107 HTMLMediaElement* m_mediaElement; 111 PseudoId m_pseudoStyleId; 112 MediaControlElementType m_displayType; // some elements can show multiple types (e.g. play/pause) 113 }; 108 }; 109 110 // ---------------------------- 111 112 class MediaControlPanelElement : public MediaControlElement { 113 public: 114 static PassRefPtr<MediaControlPanelElement> create(HTMLMediaElement*); 115 116 private: 117 MediaControlPanelElement(HTMLMediaElement*); 118 virtual MediaControlElementType displayType() const; 119 virtual const AtomicString& shadowPseudoId() const; 120 }; 121 114 122 115 123 // ---------------------------- … … 121 129 private: 122 130 MediaControlTimelineContainerElement(HTMLMediaElement*); 131 virtual MediaControlElementType displayType() const; 123 132 virtual bool rendererIsNeeded(RenderStyle*); 133 virtual const AtomicString& shadowPseudoId() const; 124 134 }; 125 135 … … 138 148 private: 139 149 MediaControlVolumeSliderContainerElement(HTMLMediaElement*); 150 virtual MediaControlElementType displayType() const; 151 virtual const AtomicString& shadowPseudoId() const; 140 152 141 153 bool m_isVisible; … … 154 166 MediaControlStatusDisplayElement(HTMLMediaElement*); 155 167 168 virtual MediaControlElementType displayType() const; 156 169 virtual bool rendererIsNeeded(RenderStyle*); 170 virtual const AtomicString& shadowPseudoId() const; 157 171 158 172 enum StateBeingDisplayed { Nothing, Loading, LiveBroadcast }; … … 374 388 class MediaControlTimeDisplayElement : public MediaControlElement { 375 389 public: 376 static PassRefPtr<MediaControlTimeDisplayElement> create(HTMLMediaElement*, PseudoId);377 378 390 void setVisible(bool); 379 391 … … 381 393 float currentValue() const { return m_currentValue; } 382 394 383 private: 384 MediaControlTimeDisplayElement(HTMLMediaElement*, PseudoId); 385 395 protected: 396 MediaControlTimeDisplayElement(HTMLMediaElement*); 397 398 private: 386 399 virtual PassRefPtr<RenderStyle> styleForElement(); 387 400 float m_currentValue; … … 391 404 // ---------------------------- 392 405 406 class MediaControlTimeRemainingDisplayElement : public MediaControlTimeDisplayElement { 407 public: 408 static PassRefPtr<MediaControlTimeRemainingDisplayElement> create(HTMLMediaElement*); 409 410 private: 411 MediaControlTimeRemainingDisplayElement(HTMLMediaElement*); 412 413 virtual MediaControlElementType displayType() const; 414 virtual const AtomicString& shadowPseudoId() const; 415 }; 416 417 // ---------------------------- 418 419 class MediaControlCurrentTimeDisplayElement : public MediaControlTimeDisplayElement { 420 public: 421 static PassRefPtr<MediaControlCurrentTimeDisplayElement> create(HTMLMediaElement*); 422 423 private: 424 MediaControlCurrentTimeDisplayElement(HTMLMediaElement*); 425 426 virtual MediaControlElementType displayType() const; 427 virtual const AtomicString& shadowPseudoId() const; 428 }; 429 430 // ---------------------------- 431 393 432 class RenderMediaControlShadowRoot : public RenderBlock { 394 433 public: -
trunk/Source/WebCore/rendering/RenderTheme.h
r77639 r77954 181 181 virtual bool hitTestMediaControlPart(RenderObject*, const IntPoint& absPoint); 182 182 virtual bool shouldRenderMediaControlPart(ControlPart, Element*); 183 virtual bool usesMediaControlStatusDisplay() { return false; } 183 184 virtual double mediaControlsFadeInDuration() { return 0.1; } 184 185 virtual double mediaControlsFadeOutDuration() { return 0.3; } -
trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h
r65215 r77954 47 47 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&); 48 48 virtual IntPoint volumeSliderOffsetFromMuteButton(Node*, const IntSize&) const; 49 virtual bool usesMediaControlStatusDisplay() { return false; } 49 50 50 51 #endif -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r77639 r77954 165 165 166 166 virtual bool shouldRenderMediaControlPart(ControlPart, Element*); 167 virtual bool usesMediaControlStatusDisplay(); 167 168 virtual void adjustMediaSliderThumbSize(RenderObject*) const; 168 169 virtual IntPoint volumeSliderOffsetFromMuteButton(Node*, const IntSize&) const; -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r77639 r77954 1982 1982 } 1983 1983 1984 bool RenderThemeMac::usesMediaControlStatusDisplay() 1985 { 1986 return mediaControllerTheme() == MediaControllerThemeQuickTime; 1987 } 1988 1984 1989 IntPoint RenderThemeMac::volumeSliderOffsetFromMuteButton(Node* muteButton, const IntSize& size) const 1985 1990 { -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r77211 r77954 69 69 // The order must be NOP ID, public IDs, and then internal IDs. 70 70 NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, SELECTION, FIRST_LINE_INHERITED, SCROLLBAR, FILE_UPLOAD_BUTTON, INPUT_PLACEHOLDER, 71 SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, MEDIA_CONTROLS_PANEL, 72 MEDIA_CONTROLS_TIMELINE_CONTAINER, MEDIA_CONTROLS_VOLUME_SLIDER_CONTAINER, MEDIA_CONTROLS_CURRENT_TIME_DISPLAY, MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, 73 MEDIA_CONTROLS_STATUS_DISPLAY, SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER, 71 SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, 72 SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER, 74 73 INPUT_LIST_BUTTON, INPUT_SPEECH_BUTTON, INNER_SPIN_BUTTON, OUTER_SPIN_BUTTON, VISITED_LINK, 75 74 METER_HORIZONTAL_BAR, METER_HORIZONTAL_OPTIMUM, METER_HORIZONTAL_SUBOPTIMAL, METER_HORIZONTAL_EVEN_LESS_GOOD,
Note: See TracChangeset
for help on using the changeset viewer.