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

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

Issue 1180143003: Don't paint self-painting frameset frames in the layout tree paint recursion. (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 | « LayoutTests/platform/linux/paint/frames/frameset-with-stacking-contexts-expected.txt ('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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void FrameSetPainter::paintChildren(const PaintInfo& paintInfo, const LayoutPoin t& adjustedPaintOffset) 108 void FrameSetPainter::paintChildren(const PaintInfo& paintInfo, const LayoutPoin t& adjustedPaintOffset)
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.
119 if (child->isLayoutBoxModelObject() && toLayoutBoxModelObject(child) ->hasSelfPaintingLayer())
120 continue;
118 child->paint(paintInfo, adjustedPaintOffset); 121 child->paint(paintInfo, adjustedPaintOffset);
119 child = child->nextSibling(); 122 child = child->nextSibling();
120 if (!child) 123 if (!child)
121 return; 124 return;
122 } 125 }
123 } 126 }
124 } 127 }
125 128
126 void FrameSetPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint Offset) 129 void FrameSetPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint Offset)
127 { 130 {
128 if (paintInfo.phase != PaintPhaseForeground) 131 if (paintInfo.phase != PaintPhaseForeground)
129 return; 132 return;
130 133
131 LayoutObject* child = m_layoutFrameSet.firstChild(); 134 LayoutObject* child = m_layoutFrameSet.firstChild();
132 if (!child) 135 if (!child)
133 return; 136 return;
134 137
135 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location(); 138 LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location();
136 paintChildren(paintInfo, adjustedPaintOffset); 139 paintChildren(paintInfo, adjustedPaintOffset);
137 paintBorders(paintInfo, adjustedPaintOffset); 140 paintBorders(paintInfo, adjustedPaintOffset);
138 } 141 }
139 142
140 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/platform/linux/paint/frames/frameset-with-stacking-contexts-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698