Changeset 60189 in webkit


Ignore:
Timestamp:
May 25, 2010 3:14:47 PM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

[Qt] Expose the editing behavior setting in DRT to test all editing code paths
https://bugs.webkit.org/show_bug.cgi?id=39680

Reviewed by Ojan Vafai.
Patch by Antonio Gomes <tonikitoo@webkit.org>

WebKit/qt:

Add support to Qt's DRT to setting the editing behavior. Patch is a follow up of
bug 38603, which just stubbed out the Qt bits of it.

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp: Implementation of editing behavior control.

(DumpRenderTreeSupportQt::setEditingBehavior):

  • WebCoreSupport/DumpRenderTreeSupportQt.h:

WebKitTools:

Implement LayoutTestController::setEditingBehavior in Qt's DRT.

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:

(WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):

  • DumpRenderTree/qt/LayoutTestControllerQt.cpp:

(LayoutTestController::setEditingBehavior):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r60120 r60189  
     12010-05-25  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        [Qt] Expose the editing behavior setting in DRT to test all editing code paths
     6        https://bugs.webkit.org/show_bug.cgi?id=39680
     7
     8        Add support to Qt's DRT to setting the editing behavior. Patch is a follow up of
     9        bug 38603, which just stubbed out the Qt bits of it.
     10
     11        * WebCoreSupport/DumpRenderTreeSupportQt.cpp: Implementation of editing behavior control.
     12        (DumpRenderTreeSupportQt::setEditingBehavior):
     13        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     14
    1152010-05-24  Robert Hogan  <robert@webkit.org>
    216
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r60120 r60189  
    472472}
    473473
     474void DumpRenderTreeSupportQt::setEditingBehavior(QWebPage* page, const QString& editingBehavior)
     475{
     476    WebCore::EditingBehavior coreEditingBehavior;
     477
     478    if (editingBehavior == "win")
     479        coreEditingBehavior = EditingWindowsBehavior;
     480    else if (editingBehavior == "mac")
     481        coreEditingBehavior = EditingMacBehavior;
     482
     483    Page* corePage = QWebPagePrivate::core(page);
     484    if (!corePage)
     485        return;
     486
     487    corePage->settings()->setEditingBehavior(coreEditingBehavior);
     488}
     489
    474490void DumpRenderTreeSupportQt::dumpFrameLoader(bool b)
    475491{
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r60120 r60189  
    7979    static bool hasDocumentElement(QWebFrame* frame);
    8080    static bool elementDoesAutoCompleteForElementWithId(QWebFrame* frame, const QString& elementId);
     81    static void setEditingBehavior(QWebPage* page, const QString& editingBehavior);
    8182
    8283    static void whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
  • trunk/WebKitTools/ChangeLog

    r60184 r60189  
     12010-05-25  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        [Qt] Expose the editing behavior setting in DRT to test all editing code paths
     6        https://bugs.webkit.org/show_bug.cgi?id=39680
     7
     8        Implement LayoutTestController::setEditingBehavior in Qt's DRT.
     9
     10        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     11        (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
     12        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     13        (LayoutTestController::setEditingBehavior):
     14
    1152010-05-25  Kevin Ollivier  <kevino@theolliviers.com>
    216
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r59669 r60189  
    458458    DumpRenderTreeSupportQt::resetOriginAccessWhiteLists();
    459459
     460    // Qt defaults to Windows editing behavior.
     461    DumpRenderTreeSupportQt::setEditingBehavior(m_page, "win");
     462
    460463    QLocale::setDefault(QLocale::c());
    461464    setlocale(LC_ALL, "");
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r60120 r60189  
    641641void LayoutTestController::setEditingBehavior(const QString& editingBehavior)
    642642{
    643     // FIXME: Implement.
     643    DumpRenderTreeSupportQt::setEditingBehavior(m_drt->webPage(), editingBehavior);
    644644}
    645645
Note: See TracChangeset for help on using the changeset viewer.