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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 160903002: Move RenderLayer repainting to repaint-after-layout framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 10 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
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 55a282301363347d3cfa190398315f57102a9a30..688416573eea5465d9a770a00b5eb6194e3ccc8c 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1058,29 +1058,33 @@ void FrameView::repaintTree(RenderObject* root)
const LayoutRect& oldRepaintRect = renderer->oldRepaintRect();
const LayoutRect& newRepaintRect = renderer->newRepaintRect();
+ LayoutRect oldOutlineRect;
+ LayoutRect newOutlineRect;
- LayoutRect oldOutlineRect = oldRepaintRect;
- oldOutlineRect.inflate(renderView()->oldMaximalOutlineSize());
+ if (renderer->hasOutline()) {
+ newOutlineRect = renderer->newOutlineRect();
+ oldOutlineRect = renderer->oldOutlineRect();
+ }
- LayoutRect newOutlineRect = newRepaintRect;
- newOutlineRect.inflate(renderView()->maximalOutlineSize());
+ if (renderer->shouldDoFullRepaintIfSelfPaintingLayer()
+ && renderer->hasLayer()
+ && toRenderLayerModelObject(renderer)->layer()->isSelfPaintingLayer())
+ renderer->setShouldDoFullRepaintAfterLayout(true);
// FIXME: Currently renderers with layers will get repainted when we call updateLayerPositionsAfterLayout.
// That call should be broken apart to position the layers be done before
// the repaintTree call so this will repaint everything.
bool didFullRepaint = false;
- if (!renderer->hasLayer()) {
- if (!renderer->layoutDidGetCalled()) {
- if (renderer->shouldDoFullRepaintAfterLayout()) {
- renderer->repaint();
- didFullRepaint = true;
- }
-
- } else {
- didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->containerForRepaint(),
- renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldOutlineRect,
- &newRepaintRect, &newOutlineRect);
+ if (!renderer->layoutDidGetCalled()) {
+ if (renderer->shouldDoFullRepaintAfterLayout()) {
+ renderer->repaint();
+ didFullRepaint = true;
}
+
+ } else {
+ didFullRepaint = renderer->repaintAfterLayoutIfNeeded(renderer->containerForRepaint(),
+ renderer->shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldOutlineRect,
+ &newRepaintRect, &newOutlineRect);
}
if (!didFullRepaint && renderer->shouldRepaintOverflowIfNeeded())
@@ -1102,7 +1106,7 @@ void FrameView::repaintTree(RenderObject* root)
listBox->repaintScrollbarIfNeeded();
}
- renderer->clearRepaintRects();
+ renderer->clearRepaintState();
}
renderView()->setOldMaximalOutlineSize(0);

Powered by Google App Engine
This is Rietveld 408576698