Changeset 128235 in webkit


Ignore:
Timestamp:
Sep 11, 2012 4:08:57 PM (12 years ago)
Author:
adamk@chromium.org
Message:

Unreviewed, rolling out r128075
https://bugs.webkit.org/show_bug.cgi?id=96435

Source/WebCore:

Broke chromium content_browsertests and included flaky layout tests

  • html/shadow/MediaControlRootElementChromium.cpp:

(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
(WebCore::MediaControlRootElementChromium::reset):
(WebCore::MediaControlRootElementChromium::playbackStarted):
(WebCore::MediaControlRootElementChromium::playbackProgressed):
(WebCore::MediaControlRootElementChromium::playbackStopped):
(WebCore::MediaControlRootElementChromium::updateTimeDisplay):

  • html/shadow/MediaControlRootElementChromium.h:

(MediaControlPanelEnclosureElement):
(MediaControlRootElementChromium):

LayoutTests:

  • platform/chromium-mac/platform/chromium/media/controls-video-sizes-expected.png: Removed.
  • platform/chromium/TestExpectations:
  • platform/chromium/media/controls-audio-sizes-expected.txt: Removed.
  • platform/chromium/media/controls-audio-sizes.html: Removed.
  • platform/chromium/media/controls-video-sizes-expected.txt: Removed.
  • platform/chromium/media/controls-video-sizes-padding-expected.txt: Removed.
  • platform/chromium/media/controls-video-sizes-padding.html: Removed.
  • platform/chromium/media/controls-video-sizes.html: Removed.
Location:
trunk
Files:
7 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128233 r128235  
     12012-09-11  Adam Klein  <adamk@chromium.org>
     2
     3        Unreviewed, rolling out r128075
     4        https://bugs.webkit.org/show_bug.cgi?id=96435
     5
     6        * platform/chromium-mac/platform/chromium/media/controls-video-sizes-expected.png: Removed.
     7        * platform/chromium/TestExpectations:
     8        * platform/chromium/media/controls-audio-sizes-expected.txt: Removed.
     9        * platform/chromium/media/controls-audio-sizes.html: Removed.
     10        * platform/chromium/media/controls-video-sizes-expected.txt: Removed.
     11        * platform/chromium/media/controls-video-sizes-padding-expected.txt: Removed.
     12        * platform/chromium/media/controls-video-sizes-padding.html: Removed.
     13        * platform/chromium/media/controls-video-sizes.html: Removed.
     14
    1152012-09-11  Adam Klein  <adamk@chromium.org>
    216
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r128233 r128235  
    33393339BUGWK94242 DEBUG : media/track/track-cues-sorted-before-dispatch.html = PASS TIMEOUT
    33403340
    3341 // Need rebaseline.
    3342 BUGWK89344 : media/audio-controls-rendering.html = IMAGE+TEXT
    3343 BUGCR145590 BUGWK89344 : media/audio-repaint.html = IMAGE+TEXT TIMEOUT
    3344 BUGWK89344 : media/controls-after-reload.html = IMAGE+TEXT
    3345 BUGWK89344 : media/controls-layout-direction.html = IMAGE
    3346 BUGWK89344 : media/controls-strict.html = IMAGE+TEXT
    3347 BUGWK89344 : media/controls-styling-strict.html = IMAGE+TEXT
    3348 BUGWK89344 : media/controls-styling.html = IMAGE+TEXT
    3349 BUGWK89344 : media/controls-without-preload.html = IMAGE+TEXT
    3350 BUGWK89344 : media/media-controls-clone.html = IMAGE+TEXT
    3351 BUGWK89344 : media/media-document-audio-repaint.html = IMAGE+TEXT
    3352 BUGWK89344 : media/track/track-cue-rendering-horizontal.html = IMAGE+TEXT
    3353 BUGWK89344 : media/track/track-cue-rendering-vertical.html = IMAGE+TEXT
    3354 BUGWK89344 : media/video-controls-rendering.html = IMAGE+TEXT
    3355 BUGWK89344 : media/video-display-toggle.html = IMAGE+TEXT
    3356 BUGWK89344 : media/video-empty-source.html = IMAGE+TEXT
    3357 BUGWK89344 : media/video-no-audio.html = IMAGE+TEXT
    3358 BUGWK89344 : media/video-playing-and-pause.html = IMAGE+TEXT
    3359 BUGWK89344 : media/video-zoom-controls.html = IMAGE+TEXT
    3360 BUGWK89344 : http/tests/media/video-buffered-range-contains-currentTime.html = IMAGE
    3361 BUGWK89344 : fast/hidpi/video-controls-in-hidpi.html = IMAGE+TEXT
    3362 BUGWK89344 : fast/layers/video-layer.html = IMAGE+TEXT
    3363 BUGWK89344 : compositing/video/video-controls-layer-creation.html = IMAGE
    3364 BUGWK89344 LINUX ANDROID WIN : platform/chromium/media/controls-video-sizes.html = IMAGE
    3365 
    33663341// Supposedly started failing between CR r140760 and CR r141216.  The failures
    33673342// look like they involve antialiasing; the fact that the test clearly expects
     
    35753550BUGCR145590 ANDROID : media/W3C/video/canPlayType/canPlayType_two_implies_one_6.html = TEXT
    35763551BUGCR145590 ANDROID : media/audio-data-url.html = TEXT
     3552BUGCR145590 ANDROID : media/audio-repaint.html = TEXT TIMEOUT
    35773553BUGCR145590 ANDROID : media/encrypted-media/encrypted-media-events.html = TIMEOUT
    35783554BUGCR145590 ANDROID : media/encrypted-media/encrypted-media-not-loaded.html = TEXT
  • trunk/Source/WebCore/ChangeLog

    r128234 r128235  
     12012-09-11  Adam Klein  <adamk@chromium.org>
     2
     3        Unreviewed, rolling out r128075
     4        https://bugs.webkit.org/show_bug.cgi?id=96435
     5
     6        Broke chromium content_browsertests and included flaky layout tests
     7
     8        * html/shadow/MediaControlRootElementChromium.cpp:
     9        (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
     10        (WebCore::MediaControlRootElementChromium::reset):
     11        (WebCore::MediaControlRootElementChromium::playbackStarted):
     12        (WebCore::MediaControlRootElementChromium::playbackProgressed):
     13        (WebCore::MediaControlRootElementChromium::playbackStopped):
     14        (WebCore::MediaControlRootElementChromium::updateTimeDisplay):
     15        * html/shadow/MediaControlRootElementChromium.h:
     16        (MediaControlPanelEnclosureElement):
     17        (MediaControlRootElementChromium):
     18
    1192012-09-11  Matt Lilek  <mrl@apple.com>
    220
  • trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp

    r128075 r128235  
    3030#include "MediaControlRootElementChromium.h"
    3131
    32 #include "CSSValueKeywords.h"
    3332#include "HTMLDivElement.h"
    3433#include "HTMLMediaElement.h"
     
    3736#include "MouseEvent.h"
    3837#include "Page.h"
    39 #include "RenderMedia.h"
    4038#include "RenderTheme.h"
    41 #include "RenderView.h"
    42 #include "StyleResolver.h"
    4339#include "Text.h"
    4440
     
    6460}
    6561
    66 
    67 class RenderMediaControlPanelEnclosureElement : public RenderBlock {
    68 public:
    69     RenderMediaControlPanelEnclosureElement(Node*);
    70 
    71 private:
    72     virtual void layout() OVERRIDE;
    73 };
    74 
    75 RenderMediaControlPanelEnclosureElement::RenderMediaControlPanelEnclosureElement(Node* node)
    76     : RenderBlock(node)
    77 {
    78 }
    79 
    80 static const int hideTimeDisplayWidth = 350;
    81 static const int hideVolumeDisplayWidth = 275;
    82 static const int hideMuteButtonWidth = 210;
    83 static const int hideFullscreenButtonWidth = 150;
    84 static const int hideTimelineWidth = 100;
    85 
    86 void RenderMediaControlPanelEnclosureElement::layout()
    87 {
    88     HTMLMediaElement* mediaElement = toParentMediaElement(this);
    89     if (!mediaElement || !mediaElement->renderer())
    90     return;
    91 
    92     float mediaWidthFloat = toRenderMedia(mediaElement->renderer())->contentBoxRect().width().toFloat();
    93     int mediaWidth = round(adjustFloatForAbsoluteZoom(mediaWidthFloat, style()));
    94 
    95     MediaControlRootElementChromium* elementShadow = (MediaControlRootElementChromium *) mediaElement->mediaControls();
    96 
    97     if (mediaWidth < hideTimeDisplayWidth)
    98         elementShadow->hideTimeDisplay();
    99     else
    100         elementShadow->showTimeDisplay();
    101 
    102     if (mediaWidth < hideVolumeDisplayWidth)
    103         elementShadow->hideVolumeSlider();
    104     else
    105         elementShadow->showVolumeSlider();
    106 
    107     if (mediaWidth < hideMuteButtonWidth)
    108         elementShadow->hideMuteButton();
    109     else
    110         elementShadow->showMuteButton();
    111 
    112     if (mediaWidth < hideFullscreenButtonWidth)
    113         elementShadow->hideFullscreenButton();
    114     else
    115         elementShadow->showFullscreenButton();
    116 
    117     if (mediaWidth < hideTimelineWidth)
    118         elementShadow->hideTimeline();
    119     else
    120         elementShadow->showTimeline();
    121 
    122     if (mediaElement->renderer()->isVideo())
    123         // Update padding according to video width.
    124         static_cast<MediaControlPanelEnclosureElement*>(node())->updatePadding(mediaWidth);
    125 
    126     RenderBlock::layout();
    127 }
    128 
    12962MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement(Document* document)
    13063    : MediaControlChromiumEnclosureElement(document)
     
    13770}
    13871
    139 RenderObject* MediaControlPanelEnclosureElement::createRenderer(RenderArena* arena, RenderStyle*)
    140 {
    141     return new (arena) RenderMediaControlPanelEnclosureElement(this);
    142 }
    143 
    14472const AtomicString& MediaControlPanelEnclosureElement::shadowPseudoId() const
    14573{
    14674    DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-enclosure"));
    14775    return id;
    148 }
    149 
    150 // Make sure to keep these values in sync with the ones in mediaControlsChromium.css.
    151 static const int videoControlsHeight = 30;
    152 static const int maxPadding = 5;
    153 static const int minPadding = 0;
    154 static const int minPaddingAtWidth = 160;
    155 static const int decreaseStep = 60;
    156 
    157 void MediaControlPanelEnclosureElement::updatePadding(int mediaWidth)
    158 {
    159     // Scale padding linearly between minPadding and maxPadding depending on mediaWidth.
    160     float padding = round((mediaWidth - minPaddingAtWidth) / decreaseStep);
    161     if (padding < minPadding)
    162         padding = minPadding;
    163     else if (padding > maxPadding)
    164         padding = maxPadding;
    165 
    166     setInlineStyleProperty(CSSPropertyPaddingRight, padding, CSSPrimitiveValue::CSS_PX);
    167     setInlineStyleProperty(CSSPropertyPaddingBottom, padding, CSSPrimitiveValue::CSS_PX);
    168     setInlineStyleProperty(CSSPropertyPaddingLeft, padding, CSSPrimitiveValue::CSS_PX);
    169     setInlineStyleProperty(CSSPropertyHeight, padding + videoControlsHeight, CSSPrimitiveValue::CSS_PX);
    17076}
    17177
     
    18995    , m_isMouseOverControls(false)
    19096    , m_isFullscreen(false)
    191     , m_hiddenTimeDisplay(false)
    19297{
    19398}
     
    353258    float duration = m_mediaController->duration();
    354259    m_timeline->setDuration(duration);
     260    m_timeline->show();
    355261
    356262    m_durationDisplay->setInnerText(page->theme()->formatMediaControlsTime(duration), ASSERT_NO_EXCEPTION);
    357263    m_durationDisplay->setCurrentValue(duration);
    358264
     265    m_timeline->setPosition(m_mediaController->currentTime());
    359266    updateTimeDisplay();
     267
     268    m_panelMuteButton->show();
    360269
    361270    if (m_volumeSlider) {
     
    375284    }
    376285
    377     showFullscreenButton();
    378 
     286    if (m_mediaController->supportsFullscreen() && m_mediaController->hasVideo())
     287        m_fullscreenButton->show();
     288    else
     289        m_fullscreenButton->hide();
    379290    makeOpaque();
    380291}
     
    383294{
    384295    m_playButton->updateDisplayType();
     296    m_timeline->setPosition(m_mediaController->currentTime());
     297    m_currentTimeDisplay->show();
     298    m_durationDisplay->hide();
    385299    updateTimeDisplay();
    386300
     
    391305void MediaControlRootElementChromium::playbackProgressed()
    392306{
     307    m_timeline->setPosition(m_mediaController->currentTime());
    393308    updateTimeDisplay();
    394309
     
    400315{
    401316    m_playButton->updateDisplayType();
     317    m_timeline->setPosition(m_mediaController->currentTime());
    402318    updateTimeDisplay();
    403319    makeOpaque();
     
    415331        return;
    416332
    417     // After seek or playback start, hide duration display and show current time.
    418     if (!m_hiddenTimeDisplay && now > 0) {
     333    // After seek, hide duration display and show current time.
     334    if (now > 0) {
    419335        m_currentTimeDisplay->show();
    420336        m_durationDisplay->hide();
     
    425341    m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
    426342    m_currentTimeDisplay->setCurrentValue(now);
    427 
    428     m_timeline->setPosition(m_mediaController->currentTime());
    429343}
    430344
     
    565479}
    566480
    567 void MediaControlRootElementChromium::hideVolumeSlider()
    568 {
    569     m_volumeSlider->hide();
    570 }
    571 
    572 void MediaControlRootElementChromium::showTimeDisplay()
    573 {
    574     m_hiddenTimeDisplay = false;
    575     m_durationDisplay->show();
    576     updateTimeDisplay();
    577 }
    578 
    579 void MediaControlRootElementChromium::hideTimeDisplay()
    580 {
    581     m_hiddenTimeDisplay = true;
    582     m_durationDisplay->hide();
    583     m_currentTimeDisplay->hide();
    584 }
    585 
    586 void MediaControlRootElementChromium::showMuteButton()
    587 {
    588     if (!m_mediaController->hasAudio())
    589         return;
    590 
    591     m_panelMuteButton->show();
    592 }
    593 
    594 void MediaControlRootElementChromium::hideMuteButton()
    595 {
    596     m_panelMuteButton->hide();
    597 }
    598 
    599 void MediaControlRootElementChromium::showFullscreenButton()
    600 {
    601     if (!m_mediaController->supportsFullscreen() || !m_mediaController->hasVideo())
    602         return;
    603 
    604     m_fullscreenButton->show();
    605 }
    606 
    607 void MediaControlRootElementChromium::hideFullscreenButton()
    608 {
    609     m_fullscreenButton->hide();
    610 }
    611 
    612 void MediaControlRootElementChromium::showTimeline()
    613 {
    614     m_timeline->show();
    615 }
    616 
    617 void MediaControlRootElementChromium::hideTimeline()
    618 {
    619     m_timeline->hide();
    620 }
    621 
    622481#if ENABLE(VIDEO_TRACK)
    623482void MediaControlRootElementChromium::createTextTrackDisplay()
  • trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.h

    r128075 r128235  
    7575public:
    7676    static PassRefPtr<MediaControlPanelEnclosureElement> create(Document*);
    77     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
    78     void updatePadding(int mediaWidth);
    7977
    8078private:
     
    112110
    113111    void showVolumeSlider();
    114     void hideVolumeSlider();
    115     void showTimeDisplay();
    116     void hideTimeDisplay();
    117     void showMuteButton();
    118     void hideMuteButton();
    119     void showFullscreenButton();
    120     void hideFullscreenButton();
    121     void showTimeline();
    122     void hideTimeline();
    123 
    124112    void updateTimeDisplay();
    125113    void updateStatusDisplay();
     
    172160    bool m_isMouseOverControls;
    173161    bool m_isFullscreen;
    174     bool m_hiddenTimeDisplay;
    175162};
    176163
Note: See TracChangeset for help on using the changeset viewer.