Changeset 54902 in webkit


Ignore:
Timestamp:
Feb 17, 2010, 11:06:22 AM (16 years ago)
Author:
eric@webkit.org
Message:

2010-02-17 Diego Gonzalez <diego.gonzalez@openbossa.org>

Reviewed by Ariya Hidayat.

Make possible Qt DRT to get total number of pages to be printed

LayoutTests:

printing/numberOfPages.html

[Qt] DRT: Get total number of pages to be printed
https://bugs.webkit.org/show_bug.cgi?id=34955

  • Api/qwebframe.cpp: (qt_drt_numberOfPages): (qt_drt_evaluateScriptInIsolatedWorld):

2010-02-17 Diego Gonzalez <diego.gonzalez@openbossa.org>

Reviewed by Ariya Hidayat.

Make possible Qt DRT to get total number of pages to be printed

LayoutTests:

printing/numberOfPages.html

[Qt] DRT: Get total number of pages to be printed
https://bugs.webkit.org/show_bug.cgi?id=34955

  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::numberOfPages):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebframe.cpp

    r54857 r54902  
    234234}
    235235
     236int QWEBKIT_EXPORT qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height)
     237{
     238    Frame* frame = QWebFramePrivate::core(qFrame);
     239    if (!frame)
     240        return -1;
     241
     242    return PrintContext::numberOfPages(frame, FloatSize(width, height));
     243}
     244
    236245// Suspend active DOM objects in this frame.
    237246void QWEBKIT_EXPORT qt_suspendActiveDOMObjects(QWebFrame* qFrame)
     
    249258        frame->document()->resumeActiveDOMObjects();
    250259}                       
     260
     261void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int worldId, const QString& script)
     262{
     263    Frame* frame = QWebFramePrivate::core(qFrame);
     264    if (frame)
     265        JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue();
     266}
    251267
    252268QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame,
  • trunk/WebKit/qt/ChangeLog

    r54857 r54902  
     12010-02-17  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        Make possible Qt DRT to get total number of pages to be printed
     6
     7        LayoutTests:
     8            printing/numberOfPages.html
     9
     10        [Qt] DRT: Get total number of pages to be printed
     11        https://bugs.webkit.org/show_bug.cgi?id=34955
     12
     13        * Api/qwebframe.cpp:
     14        (qt_drt_numberOfPages):
     15        (qt_drt_evaluateScriptInIsolatedWorld):
     16
    1172010-02-16  Ariya Hidayat  <ariya.hidayat@gmail.com>
    218
  • trunk/WebKitTools/ChangeLog

    r54900 r54902  
     12010-02-17  Diego Gonzalez  <diego.gonzalez@openbossa.org>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        Make possible Qt DRT to get total number of pages to be printed
     6
     7        LayoutTests:
     8            printing/numberOfPages.html
     9
     10        [Qt] DRT: Get total number of pages to be printed
     11        https://bugs.webkit.org/show_bug.cgi?id=34955
     12
     13        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     14        (LayoutTestController::numberOfPages):
     15        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     16
    1172010-02-17  Xan Lopez  <xlopez@igalia.com>
    218
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r54873 r54902  
    5353extern int qt_drt_workerThreadCount();
    5454extern int qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height);
     55extern int qt_drt_numberOfPages(QWebFrame* qFrame, float width, float height);
    5556extern void qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script);
    5657extern void qt_drt_webinspector_show(QWebPage *page);
     
    495496    return qt_drt_pageNumberForElementById(m_drt->webPage()->mainFrame(), id, width, height);
    496497}
     498
     499int LayoutTestController::numberOfPages(float width, float height)
     500{
     501    return qt_drt_numberOfPages(m_drt->webPage()->mainFrame(), width, height);
     502}
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r54873 r54902  
    154154    int workerThreadCount();
    155155    int pageNumberForElementById(const QString& id, float width = 0, float height = 0);
     156    int numberOfPages(float width, float height);
    156157
    157158private slots:
Note: See TracChangeset for help on using the changeset viewer.