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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/BlockPainter.h ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/Caret.h" 8 #include "core/editing/Caret.h"
9 #include "core/editing/FrameSelection.h" 9 #include "core/editing/FrameSelection.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (!paintInfo.shouldPaintWithinRoot(&inlineBox.renderer()) || (paintInfo.ph ase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)) 123 if (!paintInfo.shouldPaintWithinRoot(&inlineBox.renderer()) || (paintInfo.ph ase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
124 return; 124 return;
125 125
126 LayoutPoint childPoint = paintOffset; 126 LayoutPoint childPoint = paintOffset;
127 if (inlineBox.parent()->renderer().style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock(). 127 if (inlineBox.parent()->renderer().style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
128 childPoint = inlineBox.renderer().containingBlock()->flipForWritingModeF orChild(&toRenderBox(inlineBox.renderer()), childPoint); 128 childPoint = inlineBox.renderer().containingBlock()->flipForWritingModeF orChild(&toRenderBox(inlineBox.renderer()), childPoint);
129 129
130 paintAsInlineBlock(inlineBox.renderer(), paintInfo, childPoint); 130 paintAsInlineBlock(inlineBox.renderer(), paintInfo, childPoint);
131 } 131 }
132 132
133 void BlockPainter::paintAsInlineBlock(RenderObject& renderer, const PaintInfo& p aintInfo, const LayoutPoint& childPoint) 133 void BlockPainter::paintAsInlineBlock(LayoutObject& renderer, const PaintInfo& p aintInfo, const LayoutPoint& childPoint)
134 { 134 {
135 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection) 135 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase Selection)
136 return; 136 return;
137 137
138 // Paint all phases atomically, as though the element established its own 138 // Paint all phases atomically, as though the element established its own
139 // stacking context. (See Appendix E.2, section 7.2.1.4 on 139 // stacking context. (See Appendix E.2, section 7.2.1.4 on
140 // inline block/table/replaced elements in the CSS2.1 specification.) 140 // inline block/table/replaced elements in the CSS2.1 specification.)
141 // This is also used by other elements (e.g. flex items and grid items). 141 // This is also used by other elements (e.g. flex items and grid items).
142 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.pha se == PaintPhaseTextClip; 142 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.pha se == PaintPhaseTextClip;
143 PaintInfo info(paintInfo); 143 PaintInfo info(paintInfo);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 RenderBlock* block = flow->containingBlock(); 510 RenderBlock* block = flow->containingBlock();
511 for ( ; block && block != &m_renderBlock; block = block->containingBlock ()) 511 for ( ; block && block != &m_renderBlock; block = block->containingBlock ())
512 accumulatedPaintOffset.moveBy(block->location()); 512 accumulatedPaintOffset.moveBy(block->location());
513 ASSERT(block); 513 ASSERT(block);
514 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); 514 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset);
515 } 515 }
516 } 516 }
517 517
518 518
519 } // namespace blink 519 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BlockPainter.h ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698