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

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: Rebase to master 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
65 if (m_object.needsPositionedMovementLayoutOnly())
66 m_object.setOnlyNeededPositionedMovementLayout(true);
60 67
61 m_object.setLayoutDidGetCalled(true); 68 m_object.setLayoutDidGetCalled(true);
62 } 69 }
63 70
64 LayoutRectRecorder::~LayoutRectRecorder() 71 LayoutRectRecorder::~LayoutRectRecorder()
65 { 72 {
66 if (!shouldRecordLayoutRects()) 73 if (!shouldRecordLayoutRects())
67 return; 74 return;
68 if (m_skipRecording) 75 if (m_skipRecording)
69 return; 76 return;
70 77
71 // Note, we don't store the repaint container because it can change during l ayout. 78 // 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())); 79 RenderLayerModelObject* containerForRepaint = m_object.containerForRepaint() ;
80 m_object.setNewRepaintRect(m_object.clippedOverflowRectForRepaint(containerF orRepaint));
81
82 if (m_object.hasOutline())
83 m_object.setNewOutlineRect(m_object.outlineBoundsForRepaint(containerFor Repaint));
73 } 84 }
74 85
75 } // namespace WebCore 86 } // namespace WebCore
76 87
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698