Changeset 83654 in webkit


Ignore:
Timestamp:
Apr 12, 2011 3:46:01 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-04-11 Jer Noble <jer.noble@apple.com>

Reviewed by Simon Fraser.

REGRESSION: Vimeo fullscreen video displays incorrectly
https://bugs.webkit.org/show_bug.cgi?id=58291

  • fullscreen/video-specified-size-expected.txt: Added.
  • fullscreen/video-specified-size.html: Added.
  • fullscreen/full-screen-test.js:
  • fullscreen/full-screen-zIndex-expected.txt: Added.
  • fullscreen/full-screen-zIndex.html: Added.
  • platform/mac/fullscreen/full-screen-zIndex-expected.checksum: Added.
  • platform/mac/fullscreen/full-screen-zIndex-expected.png: Added.

2011-04-11 Jer Noble <jer.noble@apple.com>

Reviewed by Simon Fraser.

REGRESSION: Vimeo fullscreen video displays incorrectly
https://bugs.webkit.org/show_bug.cgi?id=58291

Set the RenderFullScreen's zIndex to the max. And make sure to override
a video element's specified width and height by making its full screen rules
important. Also, always show the controls when a media element is in full
screen mode.

Test: fullscreen/video-specified-size.html
Test: fullscreen/full-screen-zIndex.html

  • css/fullscreen.css: (video:-webkit-full-screen):
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::controls): Always show controls in full screen mode. (WebCore::HTMLMediaElement::preDispatchEventHandler): Added. Handle the fullscreen

change event and hide or show the controls accordingly.

  • html/HTMLMediaElement.h:
  • rendering/RenderFullScreen.cpp: (RenderFullScreen::createFullScreenStyle): Set the zIndex to INT_MAX and use a

vertical flexbox instead of a horizontal one.

Location:
trunk
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83652 r83654  
     12011-04-11  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        REGRESSION: Vimeo fullscreen video displays incorrectly
     6        https://bugs.webkit.org/show_bug.cgi?id=58291
     7
     8        * fullscreen/video-specified-size-expected.txt: Added.
     9        * fullscreen/video-specified-size.html: Added.
     10        * fullscreen/full-screen-test.js:
     11        * fullscreen/full-screen-zIndex-expected.txt: Added.
     12        * fullscreen/full-screen-zIndex.html: Added.
     13        * platform/mac/fullscreen/full-screen-zIndex-expected.checksum: Added.
     14        * platform/mac/fullscreen/full-screen-zIndex-expected.png: Added.
     15
    1162011-04-12  Yael Aharon  <yael.aharon@nokia.com>
    217
  • trunk/LayoutTests/fullscreen/full-screen-test.js

    r81038 r83654  
    11var console = null;
    22var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting())
     3var runPixelTests;
    34
    45logConsole();
    56
    6 if (window.layoutTestController) {
     7if (!runPixelTests && window.layoutTestController) {
    78    layoutTestController.dumpAsText();
    89    layoutTestController.waitUntilDone();
     
    8182}
    8283
    83 function waitForEventAndEnd(eventName, funcString)
     84function waitForEventAndEnd(element, eventName, funcString)
    8485{
    85     waitForEvent(eventName, funcString, true)
     86    waitForEvent(element, eventName, funcString, true)
    8687}
    8788
  • trunk/Source/WebCore/ChangeLog

    r83653 r83654  
     12011-04-11  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        REGRESSION: Vimeo fullscreen video displays incorrectly
     6        https://bugs.webkit.org/show_bug.cgi?id=58291
     7
     8        Set the RenderFullScreen's zIndex to the max.  And make sure to override
     9        a video element's specified width and height by making its full screen rules
     10        important.  Also, always show the controls when a media element is in full
     11        screen mode.
     12
     13        Test: fullscreen/video-specified-size.html
     14        Test: fullscreen/full-screen-zIndex.html
     15
     16        * css/fullscreen.css:
     17        (video:-webkit-full-screen):
     18        * html/HTMLMediaElement.cpp:
     19        (WebCore::HTMLMediaElement::controls): Always show controls in full screen mode.
     20        (WebCore::HTMLMediaElement::preDispatchEventHandler): Added. Handle the fullscreen
     21            change event and hide or show the controls accordingly.
     22        * html/HTMLMediaElement.h:
     23        * rendering/RenderFullScreen.cpp:
     24        (RenderFullScreen::createFullScreenStyle): Set the zIndex to INT_MAX and use a
     25            vertical flexbox instead of a horizontal one.
     26
    1272011-04-12  Chris Marrin  <cmarrin@apple.com>
    228
  • trunk/Source/WebCore/css/fullscreen.css

    r75277 r83654  
    88
    99video:-webkit-full-screen {
    10     background-color: black;
    11     width: auto;   
    12     height: 100%;
    13     max-width: 100%;
     10    background-color: black !important;
     11    position: static !important;
     12    margin: 0 !important;
     13    height: 100% !important;
     14    width: 100% !important;
     15    -webkit-box-flex: 1 !important;
     16    display: block !important;
    1417}
    1518
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r83545 r83654  
    14931493        return true;
    14941494
     1495    // Always show controls when in full screen mode.
     1496    if (isFullscreen())
     1497        return true;
     1498
    14951499    return hasAttribute(controlsAttr);
    14961500}
     
    26522656}
    26532657
    2654 }
    2655 
    2656 #endif
     2658void* HTMLMediaElement::preDispatchEventHandler(Event* event)
     2659{
     2660    if (event && event->type() == eventNames().webkitfullscreenchangeEvent) {
     2661        if (controls()) {
     2662            if (!hasMediaControls()) {
     2663                ensureMediaControls();
     2664                mediaControls()->reset();
     2665            }
     2666            mediaControls()->show();
     2667        } else if (hasMediaControls())
     2668            mediaControls()->hide();
     2669    }
     2670    return 0;
     2671}
     2672
     2673
     2674}
     2675
     2676#endif
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r83545 r83654  
    327327    void ensureMediaControls();
    328328
     329    virtual void* preDispatchEventHandler(Event*);
     330
    329331    Timer<HTMLMediaElement> m_loadTimer;
    330332    Timer<HTMLMediaElement> m_asyncEventTimer;
  • trunk/Source/WebCore/rendering/RenderFullScreen.cpp

    r81291 r83654  
    4747
    4848    // Create a stacking context:
    49     fullscreenStyle->setZIndex(0);
     49    fullscreenStyle->setZIndex(INT_MAX);
    5050
    5151    fullscreenStyle->setFontDescription(FontDescription());
     
    5555    fullscreenStyle->setBoxPack(BCENTER);
    5656    fullscreenStyle->setBoxAlign(BCENTER);
    57     fullscreenStyle->setBoxOrient(HORIZONTAL);
     57    fullscreenStyle->setBoxOrient(VERTICAL);
    5858   
    5959    fullscreenStyle->setPosition(FixedPosition);
Note: See TracChangeset for help on using the changeset viewer.