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

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: Rebase to master 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
« no previous file with comments | « no previous file | Source/core/rendering/LayoutRectRecorder.cpp » ('j') | Source/core/rendering/RenderBox.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index b2cb7359a68f53b55c55af84554c523b8af8c1e1..f0866396318ea4abe69d283d87c48f21fd8dfa5e 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1072,29 +1072,35 @@ 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();
+ }
Julien - ping for review 2014/03/07 18:26:38 Shouldn't we compute these only in the branch wher
dsinclair 2014/03/07 19:29:48 Done.
- LayoutRect newOutlineRect = newRepaintRect;
- newOutlineRect.inflate(renderView()->maximalOutlineSize());
+ if ((renderer->shouldDoFullRepaintIfNotComposited() && renderer->compositingState() != PaintsIntoOwnBacking)
+ || (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())
@@ -1116,7 +1122,7 @@ void FrameView::repaintTree(RenderObject* root)
listBox->repaintScrollbarIfNeeded();
}
- renderer->clearRepaintRects();
+ renderer->clearRepaintState();
}
renderView()->setOldMaximalOutlineSize(0);
« no previous file with comments | « no previous file | Source/core/rendering/LayoutRectRecorder.cpp » ('j') | Source/core/rendering/RenderBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698