Changeset 87322 in webkit


Ignore:
Timestamp:
May 25, 2011 2:38:31 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-05-25 Jer Noble <jer.noble@apple.com>

Reviewed by Darin Adler.

REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
https://bugs.webkit.org/show_bug.cgi?id=61461

  • fullscreen/full-screen-iframe-legacy-expected.txt: Added.
  • fullscreen/full-screen-iframe-legacy.html: Added.
  • fullscreen/resources/legacy.html: Added.

2011-05-25 Jer Noble <jer.noble@apple.com>

Reviewed by Darin Adler.

REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
https://bugs.webkit.org/show_bug.cgi?id=61461

Tests: fullscreen/full-screen-iframe-legacy.html

Allow calls from the legacy full-screen API to bypass the iframe
"webkitallowfullscreen" requirement by adding a parameter to
Document::webkitRequestFullScreenForElement specifying the strictness
of that check. Specify this new parameter everywhere that function is
called, including in the default controls' full-screen button handler.

  • dom/Document.cpp: (WebCore::Document::webkitRequestFullScreenForElement):
  • dom/Document.h:
  • dom/Element.cpp: (WebCore::Element::requestFullScreen): Renamed from webkitRequestFullScreen.
  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enterFullscreen):
  • html/shadow/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87320 r87322  
     12011-05-25  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
     6        https://bugs.webkit.org/show_bug.cgi?id=61461
     7
     8        * fullscreen/full-screen-iframe-legacy-expected.txt: Added.
     9        * fullscreen/full-screen-iframe-legacy.html: Added.
     10        * fullscreen/resources/legacy.html: Added.
     11
    1122011-05-25  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r87319 r87322  
     12011-05-25  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
     6        https://bugs.webkit.org/show_bug.cgi?id=61461
     7
     8        Tests: fullscreen/full-screen-iframe-legacy.html
     9
     10        Allow calls from the legacy full-screen API to bypass the iframe
     11        "webkitallowfullscreen" requirement by adding a parameter to
     12        Document::webkitRequestFullScreenForElement specifying the strictness
     13        of that check.  Specify this new parameter everywhere that function is
     14        called, including in the default controls' full-screen button handler.
     15
     16        * dom/Document.cpp:
     17        (WebCore::Document::webkitRequestFullScreenForElement):
     18        * dom/Document.h:
     19        * dom/Element.cpp:
     20        (WebCore::Element::requestFullScreen): Renamed from webkitRequestFullScreen.
     21        * html/HTMLMediaElement.cpp:
     22        (WebCore::HTMLMediaElement::enterFullscreen):
     23        * html/shadow/MediaControlElements.cpp:
     24        (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
     25
    1262011-05-25  Kulanthaivel Palanichamy  <kulanthaivel@codeaurora.org>
    227
  • trunk/Source/WebCore/dom/Document.cpp

    r87309 r87322  
    48354835}
    48364836
    4837 void Document::webkitRequestFullScreenForElement(Element* element, unsigned short flags)
     4837void Document::requestFullScreenForElement(Element* element, unsigned short flags, FullScreenCheckType checkType)
    48384838{
    48394839    if (!page() || !page()->settings()->fullScreenEnabled())
     
    48434843        element = documentElement();
    48444844   
    4845     if (!fullScreenIsAllowedForElement(element))
     4845    if (checkType == EnforceIFrameAllowFulScreenRequirement && !fullScreenIsAllowedForElement(element))
    48464846        return;
    48474847   
  • trunk/Source/WebCore/dom/Document.h

    r87309 r87322  
    10561056    bool webkitFullScreenKeyboardInputAllowed() const { return m_fullScreenElement.get() && m_areKeysEnabledInFullScreen; }
    10571057    Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement.get(); }
    1058     void webkitRequestFullScreenForElement(Element*, unsigned short flags);
     1058   
     1059    enum FullScreenCheckType {
     1060        EnforceIFrameAllowFulScreenRequirement,
     1061        ExemptIFrameAllowFulScreenRequirement,
     1062    };
     1063
     1064    void requestFullScreenForElement(Element*, unsigned short flags, FullScreenCheckType);
    10591065    void webkitCancelFullScreen();
    10601066   
  • trunk/Source/WebCore/dom/Element.cpp

    r87123 r87322  
    18901890void Element::webkitRequestFullScreen(unsigned short flags)
    18911891{
    1892     document()->webkitRequestFullScreenForElement(this, flags);
     1892    document()->requestFullScreenForElement(this, flags, Document::EnforceIFrameAllowFulScreenRequirement);
    18931893}
    18941894#endif   
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r87260 r87322  
    25322532#if ENABLE(FULLSCREEN_API)
    25332533    if (document() && document()->settings() && document()->settings()->fullScreenEnabled()) {
    2534         webkitRequestFullScreen(0);
     2534        document()->requestFullScreenForElement(this, 0, Document::ExemptIFrameAllowFulScreenRequirement);
    25352535        return;
    25362536    }
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r87277 r87322  
    794794                m_controls->exitedFullscreen();
    795795            } else {
    796                 mediaElement()->webkitRequestFullScreen(0);
     796                document()->requestFullScreenForElement(mediaElement(), 0, Document::ExemptIFrameAllowFulScreenRequirement);
    797797                m_controls->enteredFullscreen();
    798798            }
Note: See TracChangeset for help on using the changeset viewer.