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

Side by Side Diff: Source/core/rendering/LayoutRectRecorder.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, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 LayoutRectRecorder::LayoutRectRecorder(RenderObject& object, bool skipRecording) 45 LayoutRectRecorder::LayoutRectRecorder(RenderObject& object, bool skipRecording)
46 : m_object(object) 46 : m_object(object)
47 , m_skipRecording(skipRecording) 47 , m_skipRecording(skipRecording)
48 { 48 {
49 if (!shouldRecordLayoutRects()) 49 if (!shouldRecordLayoutRects())
50 return; 50 return;
51 if (m_skipRecording) 51 if (m_skipRecording)
52 return; 52 return;
53 53
54 if (!m_object.layoutDidGetCalled()) 54 if (!m_object.layoutDidGetCalled()) {
55 m_object.setOldRepaintRect(m_object.clippedOverflowRectForRepaint(m_obje ct.containerForRepaint())); 55 RenderLayerModelObject* containerForRepaint = m_object.containerForRepai nt();
56 m_object.setOldRepaintRect(m_object.clippedOverflowRectForRepaint(contai nerForRepaint));
57
58 if (m_object.hasOutline())
59 m_object.setOldOutlineRect(m_object.outlineBoundsForRepaint(containe rForRepaint));
60 }
56 61
57 // If should do repaint was set previously make sure we don't accidentally u nset it. 62 // If should do repaint was set previously make sure we don't accidentally u nset it.
58 if (!m_object.shouldDoFullRepaintAfterLayout()) 63 if (!m_object.shouldDoFullRepaintAfterLayout())
59 m_object.setShouldDoFullRepaintAfterLayout(m_object.selfNeedsLayout()); 64 m_object.setShouldDoFullRepaintAfterLayout(m_object.selfNeedsLayout());
60 65
61 m_object.setLayoutDidGetCalled(true); 66 m_object.setLayoutDidGetCalled(true);
62 } 67 }
63 68
64 LayoutRectRecorder::~LayoutRectRecorder() 69 LayoutRectRecorder::~LayoutRectRecorder()
65 { 70 {
66 if (!shouldRecordLayoutRects()) 71 if (!shouldRecordLayoutRects())
67 return; 72 return;
68 if (m_skipRecording) 73 if (m_skipRecording)
69 return; 74 return;
70 75
71 // Note, we don't store the repaint container because it can change during l ayout. 76 // Note, we don't store the repaint container because it can change during l ayout.
72 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(m_object.c ontainerForRepaint())); 77 RenderLayerModelObject* containerForRepaint = m_object.containerForRepaint() ;
78 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(containerF orRepaint));
79
80 if (m_object.hasOutline())
81 m_object.setNewOutlineRect(m_object.outlineBoundsForRepaint(containerFor Repaint));
73 } 82 }
74 83
75 } // namespace WebCore 84 } // namespace WebCore
76 85
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698