Changeset 71806 in webkit


Ignore:
Timestamp:
Nov 11, 2010 4:46:41 AM (13 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>

Reviewed by Andreas Kling.

[Qt] Add an API for overriding the actual visible content rect in WebCore
https://bugs.webkit.org/show_bug.cgi?id=49373

  • Api/qwebpage.cpp: (QWebPage::setActualVisibleContentRect):
  • Api/qwebpage.h:
Location:
trunk/WebKit/qt
Files:
3 edited

Legend:

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

    r71593 r71806  
    25412541}
    25422542
     2543/*
     2544    This function is to be called after any (animated) scroll/pan has ended, in the case the application handles the
     2545    scrolling/panning of the web contents. This is commonly used in combination with tiling where is it common for
     2546    the application to pan the actual view, which then resizes itself to the size of the contents.
     2547
     2548    \note Calling this function makes WebKit stop trying to calculate the visibleContentRect. To turn that on
     2549    again, call this method with an empty rect.
     2550
     2551    \sa QGraphicsWebView::resizesToContents, QWebSettings::TiledBackingStoreEnabled
     2552*/
     2553void QWebPage::setActualVisibleContentRect(const QRect& rect) const
     2554{
     2555    QWebFrame* frame = mainFrame();
     2556    if (!frame->d->frame || !frame->d->frame->view())
     2557        return;
     2558
     2559    WebCore::FrameView* view = frame->d->frame->view();
     2560    view->setActualVisibleContentRect(rect);
     2561}
     2562
    25432563/*!
    25442564    \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
  • trunk/WebKit/qt/Api/qwebpage.h

    r70030 r71806  
    281281    QSize preferredContentsSize() const;
    282282    void setPreferredContentsSize(const QSize &size) const;
     283    void setActualVisibleContentRect(const QRect& rect) const;
    283284
    284285    virtual bool event(QEvent*);
  • trunk/WebKit/qt/ChangeLog

    r71803 r71806  
     12010-11-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Add an API for overriding the actual visible content rect in WebCore
     6        https://bugs.webkit.org/show_bug.cgi?id=49373
     7
     8        * Api/qwebpage.cpp:
     9        (QWebPage::setActualVisibleContentRect):
     10        * Api/qwebpage.h:
     11
    1122010-11-11  Andreas Kling  <kling@webkit.org>
    213
Note: See TracChangeset for help on using the changeset viewer.