Changeset 28384 in webkit


Ignore:
Timestamp:
Dec 4, 2007 4:16:38 AM (16 years ago)
Author:
alp@webkit.org
Message:

2007-12-04 Xan Lopez <xan@gnome.org>

Reviewed by Alp Toker.

http://bugs.webkit.org/show_bug.cgi?id=15561
GTK port needs DumpRenderTree implementation

Start work on the GTK+ DRT.

This does not work yet, and there are a few lingering style issues
(nothing major) but this patch has been stuck in the bug tracker for
too long already.

Location:
trunk
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r28273 r28384  
     12007-12-04  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Alp Toker.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=15561
     6        GTK port needs DumpRenderTree implementation
     7
     8        Start work on the GTK+ DRT.
     9
     10        * WebKit.pro:
     11
    1122007-11-30  Alp Toker  <alp@atoker.com>
    213
  • trunk/WebKit.pro

    r25969 r28384  
    1515
    1616gtk-port:SUBDIRS += \
    17         WebKitTools/GtkLauncher
     17        WebKitTools/GtkLauncher \
     18        WebKitTools/DumpRenderTree/gtk/DumpRenderTree.pro
  • trunk/WebKit/gtk/ChangeLog

    r28371 r28384  
     12007-12-04  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Alp Toker.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=15561
     6        GTK port needs DumpRenderTree implementation
     7
     8        Start work on the GTK+ DRT.
     9
     10        Add a couple of proposed new API entry points. They are currently for
     11        internal use only by DRT and not in the public headers.
     12
     13        * WebView/webkitprivate.h:
     14        * WebView/webkitwebframe.cpp:
     15
    1162007-12-03  Dan Bernstein  <mitz@apple.com>
    217
  • trunk/WebKit/gtk/WebView/webkitprivate.h

    r28273 r28384  
    3636 */
    3737
     38#include "webkitdefines.h"
    3839#include "webkitsettings.h"
    3940#include "webkitwebview.h"
     
    9293
    9394    WebKitWebFrame* webkit_web_frame_init_with_web_view(WebKitWebView*, WebCore::HTMLFrameOwnerElement*);
     95
     96
     97    // TODO: Move these to webkitwebframe.h once these functions are fully
     98    // implemented and their API has been discussed.
     99
     100    WEBKIT_API GSList*
     101    webkit_web_frame_get_children (WebKitWebFrame* frame);
     102
     103    WEBKIT_API gchar*
     104    webkit_web_frame_get_inner_text (WebKitWebFrame* frame);
    94105}
    95106
  • trunk/WebKit/gtk/WebView/webkitwebframe.cpp

    r28332 r28384  
    386386}
    387387
    388 }
     388/**
     389 * webkit_web_frame_get_children:
     390 * @frame: a #WebKitWebFrame
     391 *
     392 * Return value: child frames of @frame
     393 */
     394GSList* webkit_web_frame_get_children(WebKitWebFrame* frame)
     395{
     396    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
     397
     398    GSList* children = NULL;
     399    Frame* coreFrame = core(frame);
     400
     401    for (Frame* child = coreFrame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
     402        FrameLoader* loader = child->loader();
     403        WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(loader->client());
     404        if (client)
     405          children = g_slist_append(children, client->webFrame());
     406    }
     407
     408    return children;
     409}
     410
     411/**
     412 * webkit_web_frame_get_inner_text:
     413 * @frame: a #WebKitWebFrame
     414 *
     415 * Return value: inner text of @frame
     416 */
     417gchar* webkit_web_frame_get_inner_text(WebKitWebFrame* frame)
     418{
     419    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
     420
     421    Frame* coreFrame = core(frame);
     422    FrameView* view = coreFrame->view();
     423
     424    if (view->layoutPending())
     425        view->layout();
     426
     427    Element* documentElement = coreFrame->document()->documentElement();
     428    String string =  documentElement->innerText();
     429    return g_strdup(string.utf8().data());
     430}
     431
     432}
  • trunk/WebKitTools/ChangeLog

    r28379 r28384  
     12007-12-04  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Alp Toker.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=15561
     6        GTK port needs DumpRenderTree implementation
     7
     8        Start work on the GTK+ DRT.
     9
     10        This does not work yet, and there are a few lingering style issues
     11        (nothing major) but this patch has been stuck in the bug tracker for
     12        too long already.
     13
     14        * DumpRenderTree/DumpRenderTree.h:
     15        * DumpRenderTree/gtk: Added.
     16        * DumpRenderTree/gtk/DumpRenderTree.cpp: Added.
     17        (autocorrectURL):
     18        (shouldLogFrameLoadDelegates):
     19        (dumpFrameScrollPosition):
     20        (displayWebView):
     21        (appendString):
     22        (dumpFramesAsText):
     23        (dumpRenderTreeAsText):
     24        (dump):
     25        (runTest):
     26        (main):
     27        * DumpRenderTree/gtk/DumpRenderTree.pro: Added.
     28        * DumpRenderTree/gtk/DumpRenderTreeGtk.h: Added.
     29        * DumpRenderTree/gtk/GCControllerGtk.cpp: Added.
     30        (GCController::collect):
     31        (GCController::collectOnAlternateThread):
     32        (GCController::getJSObjectCount):
     33        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Added.
     34        (LayoutTestController::~LayoutTestController):
     35        (LayoutTestController::addDisallowedURL):
     36        (LayoutTestController::clearBackForwardList):
     37        (LayoutTestController::copyDecodedHostName):
     38        (LayoutTestController::copyEncodedHostName):
     39        (LayoutTestController::display):
     40        (LayoutTestController::keepWebHistory):
     41        (LayoutTestController::notifyDone):
     42        (LayoutTestController::queueBackNavigation):
     43        (LayoutTestController::queueForwardNavigation):
     44        (LayoutTestController::queueLoad):
     45        (LayoutTestController::queueReload):
     46        (LayoutTestController::queueScript):
     47        (LayoutTestController::setAcceptsEditing):
     48        (LayoutTestController::setCustomPolicyDelegate):
     49        (LayoutTestController::setMainFrameIsFirstResponder):
     50        (LayoutTestController::setTabKeyCyclesThroughElements):
     51        (LayoutTestController::setUseDashboardCompatibilityMode):
     52        (LayoutTestController::setUserStyleSheetEnabled):
     53        (LayoutTestController::setUserStyleSheetLocation):
     54        (LayoutTestController::setWindowIsKey):
     55        (LayoutTestController::setWaitToDump):
     56        (LayoutTestController::windowCount):
     57        (LayoutTestController::setPrivateBrowsingEnabled):
     58        (LayoutTestController::setAuthorAndUserStylesEnabled):
     59        * DumpRenderTree/gtk/WorkQueueItemGtk.cpp: Added.
     60        (JSStringCopyUTF8CString):
     61        (LoadItem::invoke):
     62        (ReloadItem::invoke):
     63        (ScriptItem::invoke):
     64        (BackForwardItem::invoke):
     65
    1662007-12-03  Sam Weinig  <sam@webkit.org>
    267
  • trunk/WebKitTools/DumpRenderTree/DumpRenderTree.h

    r28030 r28384  
    3434#if PLATFORM(MAC)
    3535#include "DumpRenderTreeMac.h"
    36 #else if PLATFORM(WIN)
     36#elif PLATFORM(WIN)
    3737#include "DumpRenderTreeWin.h"
     38#elif PLATFORM(GTK)
     39#include "DumpRenderTreeGtk.h"
    3840#endif
    3941
     42#if PLATFORM(CF)
    4043#include <CoreFoundation/CoreFoundation.h>
     44extern CFRunLoopTimerRef waitToDumpWatchdog;
     45#endif
    4146
    4247class LayoutTestController;
    4348
    4449extern volatile bool done;
    45 
    46 extern CFRunLoopTimerRef waitToDumpWatchdog;
    4750
    4851// FIXME: This is a bad abstraction.  We should insted pass this to other controller objects which need access to it.
Note: See TracChangeset for help on using the changeset viewer.