Changeset 88446 in webkit


Ignore:
Timestamp:
Jun 9, 2011 7:06:51 AM (13 years ago)
Author:
dominicc@chromium.org
Message:

2011-06-09 Robert Hogan <robert@webkit.org>

Reviewed by Andreas Kling.

Teach Qt about window.internals
https://bugs.webkit.org/show_bug.cgi?id=61074

Unskip fast/harness/internals-object.html

  • platform/qt/Skipped:

2011-06-09 Robert Hogan <robert@webkit.org>

Reviewed by Andreas Kling.

Teach Qt about window.internals
https://bugs.webkit.org/show_bug.cgi?id=61074

A weakness of the Qt DRT setup is that things like JSContextRef are abstracted
away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals.
Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt
where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it
is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing.
Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame
and others. The only alternative seems like a compile time guard which we would have to teach the bots about.

  • CodeGenerators.pri:
  • WebCore.pri:
  • WebCore.pro:

2011-06-09 Robert Hogan <robert@webkit.org>

Reviewed by Andreas Kling.

Teach Qt about window.internals
https://bugs.webkit.org/show_bug.cgi?id=61074

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp: (DumpRenderTreeSupportQt::injectInternalsObject):
  • WebCoreSupport/DumpRenderTreeSupportQt.h:

2011-06-09 Robert Hogan <robert@webkit.org>

Reviewed by Andreas Kling.

Teach Qt about window.internals
https://bugs.webkit.org/show_bug.cgi?id=61074

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::DumpRenderTree::initJSObjects):
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r88445 r88446  
     12011-06-09  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Teach Qt about window.internals
     6        https://bugs.webkit.org/show_bug.cgi?id=61074
     7
     8        Unskip fast/harness/internals-object.html
     9
     10        * platform/qt/Skipped:
     11
    1122011-06-09  Csaba Osztrogonác  <ossy@webkit.org>
    213
  • trunk/LayoutTests/platform/qt/Skipped

    r88442 r88446  
    25172517http/tests/security/isolatedWorld/cross-origin-xhr.html
    25182518
    2519 # https://bugs.webkit.org/show_bug.cgi?id=61074
    2520 fast/harness/internals-object.html
    2521 
    25222519# failing new tests
    25232520fast/block/float/overhanging-tall-block.html
  • trunk/Source/WebCore/ChangeLog

    r88444 r88446  
     12011-06-09  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Teach Qt about window.internals
     6        https://bugs.webkit.org/show_bug.cgi?id=61074
     7
     8        A weakness of the Qt DRT setup is that things like JSContextRef are abstracted
     9        away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals.
     10        Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt
     11        where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it
     12        is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing.
     13        Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame
     14        and others. The only alternative seems like a compile time guard which we would have to teach the bots about.
     15
     16        * CodeGenerators.pri:
     17        * WebCore.pri:
     18        * WebCore.pro:
     19
    1202011-06-08  Mikołaj Małecki  <m.malecki@samsung.com>
    221
  • trunk/Source/WebCore/CodeGenerators.pri

    r88343 r88446  
    525525    svg/SVGViewElement.idl \
    526526    svg/SVGVKernElement.idl \
     527    testing/Internals.idl \
    527528    webaudio/AudioBuffer.idl \
    528529    webaudio/AudioBufferSourceNode.idl \
     
    630631               --include $$PWD/storage \
    631632               --include $$PWD/css \
     633               --include $$PWD/testing \
    632634               --include $$PWD/webaudio \
    633635               --include $$PWD/workers \
  • trunk/Source/WebCore/WebCore.pri

    r88350 r88446  
    4949        $$SOURCE_DIR/WebCore/bindings/v8/custom \
    5050        $$SOURCE_DIR/WebCore/bindings/v8/specialization \
    51         $$SOURCE_DIR/WebCore/bridge/qt/v8
     51        $$SOURCE_DIR/WebCore/bridge/qt/v8 \
     52        $$SOURCE_DIR/WebCore/testing/v8
    5253
    5354} else {
     
    5657        $$SOURCE_DIR/WebCore/bindings/js \
    5758        $$SOURCE_DIR/WebCore/bindings/js/specialization \
    58         $$SOURCE_DIR/WebCore/bridge/c
     59        $$SOURCE_DIR/WebCore/bridge/c \
     60        $$SOURCE_DIR/WebCore/testing/js
    5961}
    6062
     
    111113    $$SOURCE_DIR/WebCore/svg/graphics/filters \
    112114    $$SOURCE_DIR/WebCore/svg/properties \
     115    $$SOURCE_DIR/WebCore/testing \
    113116    $$SOURCE_DIR/WebCore/webaudio \
    114117    $$SOURCE_DIR/WebCore/websockets \
  • trunk/Source/WebCore/WebCore.pro

    r88357 r88446  
    225225        bindings/v8/custom/V8ConsoleCustom.cpp \
    226226        bindings/v8/custom/V8SQLTransactionSyncCustom.cpp \
    227         bindings/v8/V8WorkerContextErrorHandler.cpp
     227        bindings/v8/V8WorkerContextErrorHandler.cpp \
     228        testing/v8/WebCoreTestSupport.cpp
    228229} else {
    229230    SOURCES += \
     
    377378        bridge/runtime_method.cpp \
    378379        bridge/runtime_object.cpp \
    379         bridge/runtime_root.cpp
     380        bridge/runtime_root.cpp \
     381        testing/js/WebCoreTestSupport.cpp
    380382}
    381383
     
    11831185    rendering/style/StyleTransformData.cpp \
    11841186    rendering/style/StyleVisualData.cpp \
     1187    testing/Internals.cpp \
    11851188    xml/DOMParser.cpp \
    11861189    xml/XMLHttpRequest.cpp \
     
    24482451    svg/SVGZoomAndPan.h \
    24492452    svg/SVGZoomEvent.h \
     2453    testing/Internals.h \
    24502454    workers/AbstractWorker.h \
    24512455    workers/DedicatedWorkerContext.h \
  • trunk/Source/WebKit/qt/ChangeLog

    r88339 r88446  
     12011-06-09  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Teach Qt about window.internals
     6        https://bugs.webkit.org/show_bug.cgi?id=61074
     7
     8        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     9        (DumpRenderTreeSupportQt::injectInternalsObject):
     10        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     11
    1122011-06-08  Andreas Kling  <kling@webkit.org>
    213
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r88052 r88446  
    2424#include "DumpRenderTreeSupportQt.h"
    2525
     26#if USE(JSC)
     27#include "APICast.h"
     28#endif
    2629#include "ApplicationCacheStorage.h"
    2730#include "CSSComputedStyleDeclaration.h"
     
    7578#endif
    7679#include "TextIterator.h"
     80#include "WebCoreTestSupport.h"
    7781#include "WorkerThread.h"
    7882#include <wtf/CurrentTime.h>
     
    11671171}
    11681172
     1173void DumpRenderTreeSupportQt::injectInternalsObject(QWebFrame* frame)
     1174{
     1175    WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
     1176#if USE(JSC)
     1177    JSC::JSLock lock(JSC::SilenceAssertionsOnly);
     1178
     1179    JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld());
     1180    Q_ASSERT(window);
     1181
     1182    JSC::ExecState* exec = window->globalExec();
     1183    Q_ASSERT(exec);
     1184
     1185    JSContextRef context = toRef(exec);
     1186    WebCoreTestSupport::injectInternalsObject(context);
     1187#elif USE(V8)
     1188    WebCoreTestSupport::injectInternalsObject(V8Proxy::mainWorldContext(coreFrame));
     1189#endif
     1190}
     1191
    11691192// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
    11701193
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r88041 r88446  
    217217
    218218    static QString layerTreeAsText(QWebFrame*);
     219
     220    static void injectInternalsObject(QWebFrame*);
    219221};
    220222
  • trunk/Tools/ChangeLog

    r88437 r88446  
     12011-06-09  Robert Hogan  <robert@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Teach Qt about window.internals
     6        https://bugs.webkit.org/show_bug.cgi?id=61074
     7
     8        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     9        (WebCore::DumpRenderTree::initJSObjects):
     10
    1112011-06-09  Eric Seidel  <eric@webkit.org>
    212
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r87311 r88446  
    752752    frame->addToJavaScriptWindowObject(QLatin1String("GCController"), m_gcController);
    753753    frame->addToJavaScriptWindowObject(QLatin1String("plainText"), m_plainTextController);
     754    DumpRenderTreeSupportQt::injectInternalsObject(frame);
    754755}
    755756
Note: See TracChangeset for help on using the changeset viewer.