Skip to content
Permalink
Browse files
2009-10-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
        Reviewed by Simon Hausmann.

        Rename fixedContentsSize property to preferredContentsSize as
        agreed upon with Siman Hausmann and Matthias Ettrich.

        * Api/qwebpage.cpp:
        (QWebPage::preferredContentsSize):
        (QWebPage::setPreferredContentsSize):
        * Api/qwebpage.h:
        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
2009-10-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Reviewed by Simon Hausmann.

        Use the setPreferredContentsSize method instead
        of setFixedContentsSize, as the method has been renamed.

        * DumpRenderTree/qt/DumpRenderTree.cpp:
        (WebCore::DumpRenderTree::open):
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        (LayoutTestController::setFixedContentsSize):

Canonical link: https://commits.webkit.org/41220@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@49766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Oct 19, 2009
1 parent f7c25ab commit 93f9e4b17eba2e539c9e4a21317de3caf21cf6d2
Showing 7 changed files with 37 additions and 11 deletions.
@@ -1956,7 +1956,7 @@ void QWebPage::setViewportSize(const QSize &size) const
}
}

QSize QWebPage::fixedContentsSize() const
QSize QWebPage::preferredContentsSize() const
{
QWebFrame* frame = d->mainFrame;
if (frame) {
@@ -1969,15 +1969,15 @@ QSize QWebPage::fixedContentsSize() const
}

/*!
\property QWebPage::fixedContentsSize
\property QWebPage::preferredContentsSize
\since 4.6
\brief the size of the fixed layout
The size affects the layout of the page in the viewport. If set to a fixed size of
1024x768 for example then webkit will layout the page as if the viewport were that size
rather than something different.
*/
void QWebPage::setFixedContentsSize(const QSize &size) const
void QWebPage::setPreferredContentsSize(const QSize &size) const
{
d->fixedLayoutSize = size;

@@ -67,7 +67,7 @@ class QWEBKIT_EXPORT QWebPage : public QObject {
Q_PROPERTY(bool modified READ isModified)
Q_PROPERTY(QString selectedText READ selectedText)
Q_PROPERTY(QSize viewportSize READ viewportSize WRITE setViewportSize)
Q_PROPERTY(QSize fixedContentsSize READ fixedContentsSize WRITE setFixedContentsSize)
Q_PROPERTY(QSize preferredContentsSize READ preferredContentsSize WRITE setPreferredContentsSize)
Q_PROPERTY(bool forwardUnsupportedContent READ forwardUnsupportedContent WRITE setForwardUnsupportedContent)
Q_PROPERTY(LinkDelegationPolicy linkDelegationPolicy READ linkDelegationPolicy WRITE setLinkDelegationPolicy)
Q_PROPERTY(QPalette palette READ palette WRITE setPalette)
@@ -237,8 +237,8 @@ class QWEBKIT_EXPORT QWebPage : public QObject {
QSize viewportSize() const;
void setViewportSize(const QSize &size) const;

QSize fixedContentsSize() const;
void setFixedContentsSize(const QSize &size) const;
QSize preferredContentsSize() const;
void setPreferredContentsSize(const QSize &size) const;

virtual bool event(QEvent*);
bool focusNextPrevChild(bool next);
@@ -1,3 +1,17 @@
2009-10-18 Kenneth Rohde Christiansen <kenneth@webkit.org>

Reviewed by Simon Hausmann.

Rename fixedContentsSize property to preferredContentsSize as
agreed upon with Siman Hausmann and Matthias Ettrich.

* Api/qwebpage.cpp:
(QWebPage::preferredContentsSize):
(QWebPage::setPreferredContentsSize):
* Api/qwebpage.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):

2009-10-16 Antonio Gomes <tonikitoo@webkit.org>

Reviewed by Simon Hausmann.
@@ -214,12 +214,12 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage()
QColor backgroundColor = brush.style() == Qt::SolidPattern ? brush.color() : QColor();

QWebPage* page = m_webFrame->page();
const QSize fixedLayoutSize = page->fixedContentsSize();
const QSize preferredLayoutSize = page->preferredContentsSize();

m_frame->createView(m_webFrame->page()->viewportSize(),
backgroundColor, !backgroundColor.alpha(),
fixedLayoutSize.isValid() ? IntSize(fixedLayoutSize) : IntSize(),
fixedLayoutSize.isValid(),
preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(),
preferredLayoutSize.isValid(),
(ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Horizontal),
(ScrollbarMode)m_webFrame->scrollBarPolicy(Qt::Vertical));
}
@@ -1,3 +1,15 @@
2009-10-18 Kenneth Rohde Christiansen <kenneth@webkit.org>

Reviewed by Simon Hausmann.

Use the setPreferredContentsSize method instead
of setFixedContentsSize, as the method has been renamed.

* DumpRenderTree/qt/DumpRenderTree.cpp:
(WebCore::DumpRenderTree::open):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setFixedContentsSize):

2009-10-16 Steve Falkenburg <sfalken@apple.com>

Reviewed by Dan Bernstein.
@@ -316,7 +316,7 @@ void DumpRenderTree::open(const QUrl& aurl)
int width = isW3CTest ? 480 : maxViewWidth;
int height = isW3CTest ? 360 : maxViewHeight;
m_page->view()->resize(QSize(width, height));
m_page->setFixedContentsSize(QSize());
m_page->setPreferredContentsSize(QSize());
m_page->setViewportSize(QSize(width, height));

QFocusEvent ev(QEvent::FocusIn);
@@ -211,7 +211,7 @@ void LayoutTestController::setJavaScriptProfilingEnabled(bool enable)

void LayoutTestController::setFixedContentsSize(int width, int height)
{
m_topLoadingFrame->page()->setFixedContentsSize(QSize(width, height));
m_topLoadingFrame->page()->setPreferredContentsSize(QSize(width, height));
}

void LayoutTestController::setPrivateBrowsingEnabled(bool enable)

0 comments on commit 93f9e4b

Please sign in to comment.