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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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.cpp ('k') | Source/core/paint/EllipsisBoxPainter.cpp » ('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/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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::t heme().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect))) 116 && (!boxDecorationData.hasAppearance || (!themePainted && LayoutTheme::t heme().paintBorderOnly(&m_layoutBox, paintInfo, snappedPaintRect)))
117 && !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorde rs())) 117 && !(m_layoutBox.isTable() && toLayoutTable(&m_layoutBox)->collapseBorde rs()))
118 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData. bleedAvoidance()); 118 paintBorder(m_layoutBox, paintInfo, paintRect, style, boxDecorationData. bleedAvoidance());
119 } 119 }
120 120
121 static bool skipBodyBackground(const LayoutBox* bodyElementRenderer) 121 static bool skipBodyBackground(const LayoutBox* bodyElementRenderer)
122 { 122 {
123 ASSERT(bodyElementRenderer->isBody()); 123 ASSERT(bodyElementRenderer->isBody());
124 // The <body> only paints its background if the root element has defined a b ackground independent of the body, 124 // The <body> only paints its background if the root element has defined a b ackground independent of the body,
125 // or if the <body>'s parent is not the document element's renderer (e.g. in side SVG foreignObject). 125 // or if the <body>'s parent is not the document element's renderer (e.g. in side SVG foreignObject).
126 LayoutObject* documentElementRenderer = bodyElementRenderer->document().docu mentElement()->renderer(); 126 LayoutObject* documentElementRenderer = bodyElementRenderer->document().docu mentElement()->layoutObject();
127 return documentElementRenderer 127 return documentElementRenderer
128 && !documentElementRenderer->hasBackground() 128 && !documentElementRenderer->hasBackground()
129 && (documentElementRenderer == bodyElementRenderer->parent()); 129 && (documentElementRenderer == bodyElementRenderer->parent());
130 } 130 }
131 131
132 void BoxPainter::paintBackground(const PaintInfo& paintInfo, const LayoutRect& p aintRect, const Color& backgroundColor, BackgroundBleedAvoidance bleedAvoidance) 132 void BoxPainter::paintBackground(const PaintInfo& paintInfo, const LayoutRect& p aintRect, const Color& backgroundColor, BackgroundBleedAvoidance bleedAvoidance)
133 { 133 {
134 if (m_layoutBox.isDocumentElement()) { 134 if (m_layoutBox.isDocumentElement()) {
135 paintRootBoxFillLayers(paintInfo); 135 paintRootBoxFillLayers(paintInfo);
136 return; 136 return;
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 2192
2193 FloatPoint secondQuad[4]; 2193 FloatPoint secondQuad[4];
2194 secondQuad[0] = quad[0]; 2194 secondQuad[0] = quad[0];
2195 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); 2195 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy);
2196 secondQuad[2] = quad[2]; 2196 secondQuad[2] = quad[2];
2197 secondQuad[3] = quad[3]; 2197 secondQuad[3] = quad[3];
2198 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); 2198 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches);
2199 } 2199 }
2200 2200
2201 } // namespace blink 2201 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/EllipsisBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698