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

Side by Side Diff: third_party/WebKit/Source/core/paint/BlockPainter.cpp

Issue 1363613002: Save previous paint offset in LayoutObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No union (many compilers don't allow constructors); Fix a typo perhaps caused by switching to combiā€¦ Created 5 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/BlockPainter.h" 6 #include "core/paint/BlockPainter.h"
7 7
8 #include "core/editing/DragCaretController.h" 8 #include "core/editing/DragCaretController.h"
9 #include "core/editing/FrameSelection.h" 9 #include "core/editing/FrameSelection.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 layoutObject.paint(info, childPoint); 135 layoutObject.paint(info, childPoint);
136 info.phase = PaintPhaseForeground; 136 info.phase = PaintPhaseForeground;
137 layoutObject.paint(info, childPoint); 137 layoutObject.paint(info, childPoint);
138 info.phase = PaintPhaseOutline; 138 info.phase = PaintPhaseOutline;
139 layoutObject.paint(info, childPoint); 139 layoutObject.paint(info, childPoint);
140 } 140 }
141 } 141 }
142 142
143 void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset) 143 void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& pa intOffset)
144 { 144 {
145 if (RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && m_layoutB lock.childrenInline() && m_layoutBlock.paintOffsetChanged(paintOffset))
146 LineBoxListPainter(*m_layoutBlock.lineBoxes()).invalidateLineBoxPaintOff sets(paintInfo);
147
145 const PaintPhase paintPhase = paintInfo.phase; 148 const PaintPhase paintPhase = paintInfo.phase;
146 149
147 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground) 150 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChil dBlockBackground)
148 && m_layoutBlock.style()->visibility() == VISIBLE 151 && m_layoutBlock.style()->visibility() == VISIBLE
149 && m_layoutBlock.hasBoxDecorationBackground()) 152 && m_layoutBlock.hasBoxDecorationBackground())
150 m_layoutBlock.paintBoxDecorationBackground(paintInfo, paintOffset); 153 m_layoutBlock.paintBoxDecorationBackground(paintInfo, paintOffset);
151 154
152 if (paintPhase == PaintPhaseMask && m_layoutBlock.style()->visibility() == V ISIBLE) { 155 if (paintPhase == PaintPhaseMask && m_layoutBlock.style()->visibility() == V ISIBLE) {
153 m_layoutBlock.paintMask(paintInfo, paintOffset); 156 m_layoutBlock.paintMask(paintInfo, paintOffset);
154 return; 157 return;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 275
273 // We don't paint our own background, but we do let the kids paint their backgrounds. 276 // We don't paint our own background, but we do let the kids paint their backgrounds.
274 PaintInfo paintInfoForChild(paintInfo); 277 PaintInfo paintInfoForChild(paintInfo);
275 paintInfoForChild.phase = newPhase; 278 paintInfoForChild.phase = newPhase;
276 paintInfoForChild.updatePaintingRootForChildren(&m_layoutBlock); 279 paintInfoForChild.updatePaintingRootForChildren(&m_layoutBlock);
277 m_layoutBlock.paintChildren(paintInfoForChild, paintOffset); 280 m_layoutBlock.paintChildren(paintInfoForChild, paintOffset);
278 } 281 }
279 } 282 }
280 283
281 } // namespace blink 284 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698