Changeset 137148 in webkit


Ignore:
Timestamp:
Dec 10, 2012 6:57:39 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=103886

Patch by Zoltan Nyul <zoltan.nyul@intel.com> on 2012-12-10
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Export symbol for WebCore::Page::setViewMode on Mac.

No new tests, no behavior change for layout tests.

  • WebCore.exp.in:

Source/WebKit2:

Add support for TestRunner::setViewModeMediaFeature().
This functionality is needed by the following LayoutTests:
fast/media/media-query-list-02.html
fast/media/media-query-list-03.html
fast/media/media-query-list-04.html
fast/media/media-query-list-05.html
fast/media/media-query-list-06.html
fast/media/media-query-list-07.html
fast/media/view-mode-media-feature.html

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetViewMode):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setViewMode):
(WebKit):

  • WebProcess/WebPage/WebPage.h:

(WebPage):

Tools:

Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner.
This API is required by layout tests.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setViewModeMediaFeature):
(WTR):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(TestRunner):

LayoutTests:

Unskipping the following tests for EFL WebKit2:
fast/media/media-query-list-02.html
fast/media/media-query-list-03.html
fast/media/media-query-list-04.html
fast/media/media-query-list-05.html
fast/media/media-query-list-06.html
fast/media/media-query-list-07.html
fast/media/view-mode-media-feature.html

  • platform/efl-wk2/TestExpectations:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137146 r137148  
     12012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
     2
     3        Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
     4        https://bugs.webkit.org/show_bug.cgi?id=103886
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Unskipping the following tests for EFL WebKit2:
     9        fast/media/media-query-list-02.html
     10        fast/media/media-query-list-03.html
     11        fast/media/media-query-list-04.html
     12        fast/media/media-query-list-05.html
     13        fast/media/media-query-list-06.html
     14        fast/media/media-query-list-07.html
     15        fast/media/view-mode-media-feature.html
     16
     17        * platform/efl-wk2/TestExpectations:
     18
    1192012-12-10  Martin Robinson  <mrobinson@igalia.com>
    220
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r137132 r137148  
    302302# WebKitTestRunner setTouchPointRadius() is not supported
    303303Bug(EFL) fast/events/touch/basic-single-touch-events.html [ Failure ]
    304 
    305 # WebKitTestRunner needs an implementation for testRunner.setViewModeMediaFeature
    306 webkit.org/b/104148 fast/media/media-query-list-02.html [ Failure ]
    307 webkit.org/b/104148 fast/media/media-query-list-03.html [ Failure ]
    308 webkit.org/b/104148 fast/media/media-query-list-04.html [ Failure ]
    309 webkit.org/b/104148 fast/media/media-query-list-05.html [ Failure ]
    310 webkit.org/b/104148 fast/media/media-query-list-06.html [ Failure ]
    311 webkit.org/b/104148 fast/media/media-query-list-07.html [ Failure ]
    312 webkit.org/b/104148 fast/media/view-mode-media-feature.html [ ImageOnlyFailure ]
    313304
    314305# Needs grammar checking
  • trunk/Source/WebCore/ChangeLog

    r137146 r137148  
     12012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
     2
     3        Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
     4        https://bugs.webkit.org/show_bug.cgi?id=103886
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Export symbol for WebCore::Page::setViewMode on Mac.
     9
     10        No new tests, no behavior change for layout tests.
     11
     12        * WebCore.exp.in:
     13
    1142012-12-10  Martin Robinson  <mrobinson@igalia.com>
    215
  • trunk/Source/WebCore/WebCore.exp.in

    r137108 r137148  
    741741__ZN7WebCore4Page11PageClientsD1Ev
    742742__ZN7WebCore4Page12setGroupNameERKN3WTF6StringE
     743__ZN7WebCore4Page11setViewModeENS0_8ViewModeE
    743744__ZN7WebCore4Page13rangeOfStringERKN3WTF6StringEPNS_5RangeEj
    744745__ZN7WebCore4Page13setPaginationERKNS_10PaginationE
  • trunk/Source/WebKit2/ChangeLog

    r137147 r137148  
     12012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
     2
     3        Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
     4        https://bugs.webkit.org/show_bug.cgi?id=103886
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add support for TestRunner::setViewModeMediaFeature().
     9        This functionality is needed by the following LayoutTests:
     10        fast/media/media-query-list-02.html
     11        fast/media/media-query-list-03.html
     12        fast/media/media-query-list-04.html
     13        fast/media/media-query-list-05.html
     14        fast/media/media-query-list-06.html
     15        fast/media/media-query-list-07.html
     16        fast/media/view-mode-media-feature.html
     17
     18        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
     19        (WKBundlePageSetViewMode):
     20        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
     21        * WebProcess/WebPage/WebPage.cpp:
     22        (WebKit::WebPage::setViewMode):
     23        (WebKit):
     24        * WebProcess/WebPage/WebPage.h:
     25        (WebPage):
     26
    1272012-12-10  Simon Hausmann  <simon.hausmann@digia.com>
    228
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp

    r135595 r137148  
    450450    return WebCore::MIMETypeRegistry::canShowMIMEType(mimeType);
    451451}
     452
     453void WKBundlePageSetViewMode(WKBundlePageRef pageRef, WKStringRef mode)
     454{
     455    String modeWTF = toWTFString(mode);
     456    if (modeWTF == "windowed")
     457        toImpl(pageRef)->setViewMode(WebCore::Page::ViewModeWindowed);
     458    else if (modeWTF == "floating")
     459        toImpl(pageRef)->setViewMode(WebCore::Page::ViewModeFloating);
     460    else if (modeWTF == "fullscreen")
     461        toImpl(pageRef)->setViewMode(WebCore::Page::ViewModeFullscreen);
     462    else if (modeWTF == "maximized")
     463        toImpl(pageRef)->setViewMode(WebCore::Page::ViewModeMaximized);
     464    else if (modeWTF == "minimized")
     465        toImpl(pageRef)->setViewMode(WebCore::Page::ViewModeMinimized);
     466    else
     467        ASSERT_NOT_REACHED();
     468}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h

    r135595 r137148  
    8080WK_EXPORT WKArrayRef WKBundlePageCopyContextMenuItemTitles(WKBundlePageRef);
    8181
     82WK_EXPORT void WKBundlePageSetViewMode(WKBundlePageRef pageRef, WKStringRef mode);
    8283#ifdef __cplusplus
    8384}
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r136620 r137148  
    11631163}
    11641164
     1165void WebPage::setViewMode(Page::ViewMode mode)
     1166{
     1167    m_page->setViewMode(mode);
     1168}
     1169
    11651170void WebPage::scalePage(double scale, const IntPoint& origin)
    11661171{
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r136620 r137148  
    5656#include <WebCore/FrameLoaderTypes.h>
    5757#include <WebCore/IntRect.h>
     58#include <WebCore/Page.h>
    5859#if ENABLE(PAGE_VISIBILITY_API)
    5960#include <WebCore/PageVisibilityState.h>
     
    306307    void setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor);
    307308    void windowScreenDidChange(uint64_t);
     309    void setViewMode(WebCore::Page::ViewMode);
    308310
    309311    void scalePage(double scale, const WebCore::IntPoint& origin);
  • trunk/Tools/ChangeLog

    r137146 r137148  
     12012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
     2
     3        Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
     4        https://bugs.webkit.org/show_bug.cgi?id=103886
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner.
     9        This API is required by layout tests.
     10
     11        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     12        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     13        (WTR::TestRunner::setViewModeMediaFeature):
     14        (WTR):
     15        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     16        (TestRunner):
     17
    1182012-12-10  Martin Robinson  <mrobinson@igalia.com>
    219
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r135508 r137148  
    170170    // Control full screen behavior.
    171171    void setHasCustomFullScreenBehavior(in boolean value);
     172    void setViewModeMediaFeature(in DOMString mode);
    172173
    173174    // Web notifications support
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r137127 r137148  
    883883}
    884884
     885void TestRunner::setViewModeMediaFeature(JSStringRef mode)
     886{
     887    WKRetainPtr<WKStringRef> modeWK = toWK(mode);
     888    WKBundlePageSetViewMode(InjectedBundle::shared().page()->page(), modeWK.get());
     889}
     890
    885891} // namespace WTR
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r135508 r137148  
    244244    void setHasCustomFullScreenBehavior(bool value) { m_customFullScreenBehavior = value; }
    245245    bool hasCustomFullScreenBehavior() const { return m_customFullScreenBehavior; }
     246    void setViewModeMediaFeature(JSStringRef);
    246247
    247248    // Web notifications.
Note: See TracChangeset for help on using the changeset viewer.