diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
commit | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch) | |
tree | b7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebCore/page/FrameView.cpp | |
parent | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff) | |
download | qtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz |
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebCore/page/FrameView.cpp')
-rw-r--r-- | Source/WebCore/page/FrameView.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp index 0f3fc6de1..8d141b8d1 100644 --- a/Source/WebCore/page/FrameView.cpp +++ b/Source/WebCore/page/FrameView.cpp @@ -1522,7 +1522,14 @@ void FrameView::scrollContentsSlowPath(const IntRect& updateRect) if (contentsInCompositedLayer()) { RenderView* root = rootRenderer(this); ASSERT(root); - root->layer()->setBackingNeedsRepaintInRect(visibleContentRect()); + + IntRect updateRect = visibleContentRect(); + + // Make sure to "apply" the scale factor here since we're converting from frame view + // coordinates to layer backing coordinates. + updateRect.scale(1 / m_frame->frameScaleFactor()); + + root->layer()->setBackingNeedsRepaintInRect(updateRect); } if (RenderPart* frameRenderer = m_frame->ownerRenderer()) { if (isEnclosedInCompositingLayer()) { @@ -2041,7 +2048,7 @@ void FrameView::scheduleRelayout() // When frame flattening is enabled, the contents of the frame could affect the layout of the parent frames. // Also invalidate parent frame starting from the owner element of this frame. - if (isInChildFrameWithFrameFlattening() && m_frame->ownerRenderer()) + if (m_frame->ownerRenderer() && isInChildFrameWithFrameFlattening()) m_frame->ownerRenderer()->setNeedsLayout(true, MarkContainingBlockChain); int delay = m_frame->document()->minimumLayoutDelay(); @@ -2918,18 +2925,21 @@ FrameView* FrameView::parentFrameView() const bool FrameView::isInChildFrameWithFrameFlattening() { - if (!parent() || !m_frame->ownerElement() || !m_frame->settings() || !m_frame->settings()->frameFlatteningEnabled()) + if (!parent() || !m_frame->ownerElement()) return false; // Frame flattening applies when the owner element is either in a frameset or // an iframe with flattening parameters. if (m_frame->ownerElement()->hasTagName(iframeTag)) { RenderIFrame* iframeRenderer = toRenderIFrame(m_frame->ownerElement()->renderPart()); - - if (iframeRenderer->flattenFrame()) + if (iframeRenderer->flattenFrame() || iframeRenderer->isSeamless()) return true; + } + + if (!m_frame->settings() || !m_frame->settings()->frameFlatteningEnabled()) + return false; - } else if (m_frame->ownerElement()->hasTagName(frameTag)) + if (m_frame->ownerElement()->hasTagName(frameTag)) return true; return false; @@ -3279,8 +3289,8 @@ void FrameView::adjustPageHeightDeprecated(float *newBottom, float oldTop, float if (RenderView* root = rootRenderer(this)) { // Use a context with painting disabled. GraphicsContext context((PlatformGraphicsContext*)0); - root->setTruncatedAt((int)floorf(oldBottom)); - IntRect dirtyRect(0, (int)floorf(oldTop), root->maxXLayoutOverflow(), (int)ceilf(oldBottom - oldTop)); + root->setTruncatedAt(static_cast<int>(floorf(oldBottom))); + IntRect dirtyRect(0, static_cast<int>(floorf(oldTop)), root->layoutOverflowRect().maxX(), static_cast<int>(ceilf(oldBottom - oldTop))); root->setPrintRect(dirtyRect); root->layer()->paint(&context, dirtyRect); *newBottom = root->bestTruncatedAt(); |