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

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

Issue 1095043003: Convert LayoutObject renderer names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/BoxPainter.h" 6 #include "core/paint/BoxPainter.h"
7 7
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/html/HTMLFrameOwnerElement.h" 10 #include "core/html/HTMLFrameOwnerElement.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (m_layoutBox.boxDecorationBackgroundIsKnownToBeObscured()) 157 if (m_layoutBox.boxDecorationBackgroundIsKnownToBeObscured())
158 return; 158 return;
159 paintFillLayers(paintInfo, backgroundColor, m_layoutBox.style()->backgroundL ayers(), paintRect, bleedAvoidance); 159 paintFillLayers(paintInfo, backgroundColor, m_layoutBox.style()->backgroundL ayers(), paintRect, bleedAvoidance);
160 } 160 }
161 161
162 void BoxPainter::paintRootBoxFillLayers(const PaintInfo& paintInfo) 162 void BoxPainter::paintRootBoxFillLayers(const PaintInfo& paintInfo)
163 { 163 {
164 if (paintInfo.skipRootBackground()) 164 if (paintInfo.skipRootBackground())
165 return; 165 return;
166 166
167 LayoutObject* rootBackgroundRenderer = m_layoutBox.rendererForRootBackground (); 167 LayoutObject* rootBackgroundLayoutObject = m_layoutBox.layoutObjectForRootBa ckground();
168 168
169 const FillLayer& bgLayer = rootBackgroundRenderer->style()->backgroundLayers (); 169 const FillLayer& bgLayer = rootBackgroundLayoutObject->style()->backgroundLa yers();
170 Color bgColor = rootBackgroundRenderer->resolveColor(CSSPropertyBackgroundCo lor); 170 Color bgColor = rootBackgroundLayoutObject->resolveColor(CSSPropertyBackgrou ndColor);
171 171
172 paintFillLayers(paintInfo, bgColor, bgLayer, scrolledBackgroundRect(), Backg roundBleedNone, SkXfermode::kSrcOver_Mode, rootBackgroundRenderer); 172 paintFillLayers(paintInfo, bgColor, bgLayer, scrolledBackgroundRect(), Backg roundBleedNone, SkXfermode::kSrcOver_Mode, rootBackgroundLayoutObject);
173 } 173 }
174 174
175 void BoxPainter::paintFillLayers(const PaintInfo& paintInfo, const Color& c, con st FillLayer& fillLayer, const LayoutRect& rect, 175 void BoxPainter::paintFillLayers(const PaintInfo& paintInfo, const Color& c, con st FillLayer& fillLayer, const LayoutRect& rect,
176 BackgroundBleedAvoidance bleedAvoidance, SkXfermode::Mode op, LayoutObject* backgroundObject) 176 BackgroundBleedAvoidance bleedAvoidance, SkXfermode::Mode op, LayoutObject* backgroundObject)
177 { 177 {
178 Vector<const FillLayer*, 8> layers; 178 Vector<const FillLayer*, 8> layers;
179 const FillLayer* curLayer = &fillLayer; 179 const FillLayer* curLayer = &fillLayer;
180 bool shouldDrawBackgroundInSeparateBuffer = false; 180 bool shouldDrawBackgroundInSeparateBuffer = false;
181 bool isBottomLayerOccluded = false; 181 bool isBottomLayerOccluded = false;
182 while (curLayer) { 182 while (curLayer) {
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 2272
2273 FloatPoint secondQuad[4]; 2273 FloatPoint secondQuad[4];
2274 secondQuad[0] = quad[0]; 2274 secondQuad[0] = quad[0];
2275 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); 2275 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy);
2276 secondQuad[2] = quad[2]; 2276 secondQuad[2] = quad[2];
2277 secondQuad[3] = quad[3]; 2277 secondQuad[3] = quad[3];
2278 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); 2278 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches);
2279 } 2279 }
2280 2280
2281 } // namespace blink 2281 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp ('k') | Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698