Changeset 104398 in webkit


Ignore:
Timestamp:
Jan 8, 2012 12:06:38 AM (12 years ago)
Author:
levin@chromium.org
Message:

[chromium] Add layout test support for autosize code in FrameView.
https://bugs.webkit.org/show_bug.cgi?id=73631

Reviewed by Dmitry Titov.

Tools:

  • DumpRenderTree/chromium/LayoutTestController.cpp:

(LayoutTestController::LayoutTestController): Expose the new autoresize method.
(LayoutTestController::reset): Set the autoresize mode back to false.
(LayoutTestController::enableAutoResizeMode): A way to turn on autoresizing from javascript code in DumpRenderTree.

  • DumpRenderTree/chromium/LayoutTestController.h:
  • DumpRenderTree/chromium/WebViewHost.cpp:

(WebViewHost::didAutoResize): Handle the autoresize callback so that the outer bounds change appropriately.

  • DumpRenderTree/chromium/WebViewHost.h:

LayoutTests:

  • fast/autoresize/basic-expected.txt: Added.
  • fast/autoresize/basic.html: Added. Simple test to verify that autoresizing happens.
  • platform/efl/Skipped: Skipped the new directory since the layout test controller on this platform, doesn't support enableAutoResizeMode.
  • platform/gtk/Skipped: Ditto.
  • platform/mac/Skipped: Ditto.
  • platform/qt/Skipped: Ditto.
  • platform/win/Skipped: Ditto.
  • platform/wincairo/Skipped: Ditto.
Location:
trunk
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r104394 r104398  
     12012-01-08  David Levin  <levin@chromium.org>
     2
     3        [chromium] Add layout test support for autosize code in FrameView.
     4        https://bugs.webkit.org/show_bug.cgi?id=73631
     5
     6        Reviewed by Dmitry Titov.
     7
     8        * fast/autoresize/basic-expected.txt: Added.
     9        * fast/autoresize/basic.html: Added. Simple test to verify that autoresizing happens.
     10        * platform/efl/Skipped: Skipped the new directory since the layout test
     11          controller on this platform, doesn't support enableAutoResizeMode.
     12        * platform/gtk/Skipped: Ditto.
     13        * platform/mac/Skipped: Ditto.
     14        * platform/qt/Skipped: Ditto.
     15        * platform/win/Skipped: Ditto.
     16        * platform/wincairo/Skipped: Ditto.
     17
    1182012-01-07  Dmitry Lomov  <dslomov@google.com>
    219
  • trunk/LayoutTests/platform/efl/Skipped

    r104358 r104398  
    478478fast/media/view-mode-media-feature.html
    479479
     480# EFL's LayoutTestController does not implement enableAutoResizeMode
     481fast/autoresize
     482
    480483# EFL's LayoutTestController does not implement setWindowIsKey
    481484editing/selection/4975120.html
  • trunk/LayoutTests/platform/gtk/Skipped

    r104391 r104398  
    373373# supported.
    374374fast/text/international/locale-sensitive-fonts.html
     375
     376# Needs layoutTestController.enableAutoResizeMode()
     377fast/autoresize
    375378
    376379# The GTK+ build bots don't yet have the muscle to run WebGL tests.
  • trunk/LayoutTests/platform/mac/Skipped

    r104358 r104398  
    133133fast/media/media-query-list-07.html
    134134
     135# Needs layoutTestController.enableAutoResizeMode()
     136fast/autoresize
     137
    135138# Test is flaky and thus not useful until fixed.
    136139# https://bugs.webkit.org/show_bug.cgi?id=36642
  • trunk/LayoutTests/platform/qt/Skipped

    r104358 r104398  
    694694fast/repaint/text-emphasis-v.html
    695695fast/repaint/background-clip-text.html
     696
     697# Needs layoutTestController.enableAutoResizeMode()
     698fast/autoresize
    696699
    697700# This requires didClearWindowObjectForFrameInIsolatedWorld foo in FrameLoaderClient
  • trunk/LayoutTests/platform/win/Skipped

    r104358 r104398  
    10741074# LayoutTestController::pageProperty is not implemented for WIN yet.
    10751075printing/page-rule-selection.html
     1076
     1077# Needs layoutTestController.enableAutoResizeMode()
     1078fast/autoresize
    10761079
    10771080# Hyphenation is not implemented yet.
  • trunk/LayoutTests/platform/wincairo/Skipped

    r104358 r104398  
    16131613printing/page-rule-selection.html
    16141614
     1615# Needs layoutTestController.enableAutoResizeMode()
     1616fast/autoresize
     1617
    16151618# Hyphenation is not implemented yet.
    16161619fast/text/hyphenate-character.html
  • trunk/Tools/ChangeLog

    r104387 r104398  
     12012-01-08  David Levin  <levin@chromium.org>
     2
     3        [chromium] Add layout test support for autosize code in FrameView.
     4        https://bugs.webkit.org/show_bug.cgi?id=73631
     5
     6        Reviewed by Dmitry Titov.
     7
     8        * DumpRenderTree/chromium/LayoutTestController.cpp:
     9        (LayoutTestController::LayoutTestController): Expose the new autoresize method.
     10        (LayoutTestController::reset): Set the autoresize mode back to false.
     11        (LayoutTestController::enableAutoResizeMode): A way to turn on autoresizing from javascript code in DumpRenderTree.
     12        * DumpRenderTree/chromium/LayoutTestController.h:
     13        * DumpRenderTree/chromium/WebViewHost.cpp:
     14        (WebViewHost::didAutoResize): Handle the autoresize callback so that the outer bounds change appropriately.
     15        * DumpRenderTree/chromium/WebViewHost.h:
     16
    1172012-01-07  Zan Dobersek  <zandobersek@gmail.com>
    218
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp

    r104005 r104398  
    117117    bindMethod("dumpCreateView", &LayoutTestController::dumpCreateView);
    118118    bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
     119    bindMethod("enableAutoResizeMode", &LayoutTestController::enableAutoResizeMode);
    119120    bindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
    120121    bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
     
    609610#endif
    610611        m_shell->webView()->removeAllUserContent();
     612        WebKit::WebSize empty;
     613        m_shell->webView()->enableAutoResizeMode(false, empty, empty);
    611614    }
    612615    m_dumpAsText = false;
     
    10971100    WebString elementId = cppVariantToWebString(arguments[0]);
    10981101    result->set(elementDoesAutoCompleteForElementWithId(elementId));
     1102}
     1103
     1104void LayoutTestController::enableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
     1105{
     1106    if (arguments.size() != 4) {
     1107        result->set(false);
     1108        return;
     1109    }
     1110    int minWidth = cppVariantToInt32(arguments[0]);
     1111    int minHeight = cppVariantToInt32(arguments[1]);
     1112    WebKit::WebSize minSize(minWidth, minHeight);
     1113
     1114    int maxWidth = cppVariantToInt32(arguments[2]);
     1115    int maxHeight = cppVariantToInt32(arguments[3]);
     1116    WebKit::WebSize maxSize(maxWidth, maxHeight);
     1117
     1118    m_shell->webView()->enableAutoResizeMode(true, minSize, maxSize);
     1119    result->set(true);
    10991120}
    11001121
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h

    r104005 r104398  
    244244    void pauseTransitionAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
    245245    void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*);
     246    void enableAutoResizeMode(const CppArgumentList&, CppVariant*);
    246247    void numberOfActiveAnimations(const CppArgumentList&, CppVariant*);
    247248    void suspendAnimations(const CppArgumentList&, CppVariant*);
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r104005 r104398  
    710710}
    711711
     712void WebViewHost::didAutoResize(const WebSize& newSize)
     713{
     714    // Purposely don't include the virtualWindowBorder in this case so that
     715    // window.inner[Width|Height] is the same as window.outer[Width|Height]
     716    setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
     717}
     718
    712719void WebViewHost::scheduleComposite()
    713720{
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.h

    r104005 r104398  
    155155    virtual void didInvalidateRect(const WebKit::WebRect&);
    156156    virtual void didScrollRect(int dx, int dy, const WebKit::WebRect&);
     157    virtual void didAutoResize(const WebKit::WebSize& newSize);
    157158    virtual void scheduleComposite();
    158159#if ENABLE(REQUEST_ANIMATION_FRAME)
Note: See TracChangeset for help on using the changeset viewer.