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

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

Issue 1187033004: No need for both isLayoutBoxModelObject() and isBoxModelObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/layout/LayoutObject.cpp ('k') | no next file » | 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/FrameSetPainter.h" 6 #include "core/paint/FrameSetPainter.h"
7 7
8 #include "core/html/HTMLFrameSetElement.h" 8 #include "core/html/HTMLFrameSetElement.h"
9 #include "core/layout/LayoutFrameSet.h" 9 #include "core/layout/LayoutFrameSet.h"
10 #include "core/paint/LayoutObjectDrawingRecorder.h" 10 #include "core/paint/LayoutObjectDrawingRecorder.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 { 109 {
110 // Paint only those children that fit in the grid. 110 // Paint only those children that fit in the grid.
111 // Remaining frames are "hidden". 111 // Remaining frames are "hidden".
112 // See also LayoutFrameSet::positionFrames. 112 // See also LayoutFrameSet::positionFrames.
113 LayoutObject* child = m_layoutFrameSet.firstChild(); 113 LayoutObject* child = m_layoutFrameSet.firstChild();
114 size_t rows = m_layoutFrameSet.rows().m_sizes.size(); 114 size_t rows = m_layoutFrameSet.rows().m_sizes.size();
115 size_t cols = m_layoutFrameSet.columns().m_sizes.size(); 115 size_t cols = m_layoutFrameSet.columns().m_sizes.size();
116 for (size_t r = 0; r < rows; r++) { 116 for (size_t r = 0; r < rows; r++) {
117 for (size_t c = 0; c < cols; c++) { 117 for (size_t c = 0; c < cols; c++) {
118 // Self-painting layers are painted during the DeprecatedPaintLayer paint recursion, not LayoutObject. 118 // Self-painting layers are painted during the DeprecatedPaintLayer paint recursion, not LayoutObject.
119 if (child->isLayoutBoxModelObject() && toLayoutBoxModelObject(child) ->hasSelfPaintingLayer()) 119 if (child->isBoxModelObject() && toLayoutBoxModelObject(child)->hasS elfPaintingLayer())
120 continue; 120 continue;
121 child->paint(paintInfo, adjustedPaintOffset); 121 child->paint(paintInfo, adjustedPaintOffset);
122 child = child->nextSibling(); 122 child = child->nextSibling();
123 if (!child) 123 if (!child)
124 return; 124 return;
125 } 125 }
126 } 126 }
127 } 127 }
128 128
129 void FrameSetPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint Offset) 129 void FrameSetPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint Offset)
130 { 130 {
131 if (paintInfo.phase != PaintPhaseForeground) 131 if (paintInfo.phase != PaintPhaseForeground)
132 return; 132 return;
133 133
134 LayoutObject* child = m_layoutFrameSet.firstChild(); 134 LayoutObject* child = m_layoutFrameSet.firstChild();
135 if (!child) 135 if (!child)
136 return; 136 return;
137 137
138 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location(); 138 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location();
139 paintChildren(paintInfo, adjustedPaintOffset); 139 paintChildren(paintInfo, adjustedPaintOffset);
140 paintBorders(paintInfo, adjustedPaintOffset); 140 paintBorders(paintInfo, adjustedPaintOffset);
141 } 141 }
142 142
143 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698