Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1428)

Unified Diff: Source/core/rendering/RenderView.cpp

Issue 293063016: Exclude cases of full repaint on viewport height change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/repaint/window-resize-fixed-center-background-image-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 6c163ac70a17cf4bd91e3b6017e584283a647576..e03ec3d79228cc71ba969447be9e8a7df78cbb1b 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -201,8 +201,15 @@ bool RenderView::shouldDoFullRepaintForNextLayout() const
if (height() != viewHeight()) {
if (RenderObject* backgroundRenderer = this->backgroundRenderer()) {
- if (backgroundRenderer->mustRepaintFillLayersOnHeightChange(*backgroundRenderer->style()->backgroundLayers()))
+ // When background-attachment is 'fixed', we treat the viewport (instead of the 'root'
+ // i.e. html or body) as the background positioning area, and we should full repaint
+ // viewport resize if the background image is not composited and needs full repaint on
+ // background positioning area resize.
+ if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(layer())) {
+ if (backgroundRenderer->style()->hasFixedBackgroundImage()
+ && mustRepaintFillLayersOnHeightChange(*backgroundRenderer->style()->backgroundLayers()))
return true;
+ }
}
}
« no previous file with comments | « LayoutTests/fast/repaint/window-resize-fixed-center-background-image-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698