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

Side by Side Diff: Source/core/rendering/RenderBoxModelObject.h

Issue 550363004: Factor painting code out of RenderBox into a new class called BoxPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Created 6 years, 3 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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 IntPoint m_phase; 238 IntPoint m_phase;
239 IntSize m_tileSize; 239 IntSize m_tileSize;
240 IntSize m_repeatSpacing; 240 IntSize m_repeatSpacing;
241 bool m_hasNonLocalGeometry; // Has background-attachment: fixed. Implies that we can't always cheaply compute destRect. 241 bool m_hasNonLocalGeometry; // Has background-attachment: fixed. Implies that we can't always cheaply compute destRect.
242 }; 242 };
243 243
244 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const ; 244 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const ;
245 245
246 bool calculateHasBoxDecorations() const; 246 bool calculateHasBoxDecorations() const;
247 void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintCon tainer, const FillLayer&, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderObject* = 0) const; 247 void calculateBackgroundImageGeometry(const RenderLayerModelObject* paintCon tainer, const FillLayer&, const LayoutRect& paintRect, BackgroundImageGeometry&, RenderObject* = 0) const;
248 void getBorderEdgeInfo(class BorderEdge[], const RenderStyle*, bool includeL ogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
249 bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
250 bool borderObscuresBackground() const;
251 RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const; 248 RoundedRect backgroundRoundedRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox*, const LayoutSize&, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
252 LayoutRect borderInnerRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance) const; 249 LayoutRect borderInnerRectAdjustedForBleedAvoidance(GraphicsContext*, const LayoutRect&, BackgroundBleedAvoidance) const;
253 250
254 InterpolationQuality chooseInterpolationQuality(GraphicsContext*, Image*, co nst void*, const LayoutSize&); 251 InterpolationQuality chooseInterpolationQuality(GraphicsContext*, Image*, co nst void*, const LayoutSize&);
255 252
256 RenderBoxModelObject* continuation() const; 253 RenderBoxModelObject* continuation() const;
257 virtual void setContinuation(RenderBoxModelObject*); 254 virtual void setContinuation(RenderBoxModelObject*);
258 255
259 LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIn dentOffset); 256 LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIn dentOffset);
260 257
261 static void clipRoundedInnerRect(GraphicsContext*, const LayoutRect&, const RoundedRect& clipRect); 258 static void clipRoundedInnerRect(GraphicsContext*, const LayoutRect&, const RoundedRect& clipRect);
262 259
263 bool hasAutoHeightOrContainingBlockWithAutoHeight() const; 260 bool hasAutoHeightOrContainingBlockWithAutoHeight() const;
264 261
262 public:
Stephen Chennney 2014/09/09 16:14:37 You're making a whole lot of stuff public now. It
chrishtr 2014/09/09 16:55:45 isDocumentElementWithOpaqueBackground() is called
263 void paintRootBackgroundColor(const PaintInfo&, const LayoutRect&, const Col or&);
265 bool isDocumentElementWithOpaqueBackground() const; 264 bool isDocumentElementWithOpaqueBackground() const;
266 265
267 void paintRootBackgroundColor(const PaintInfo&, const LayoutRect&, const Col or&);
268
269 public:
270 static bool shouldAntialiasLines(GraphicsContext*); 266 static bool shouldAntialiasLines(GraphicsContext*);
271 267
272 // For RenderBlocks and RenderInlines with m_style->styleType() == FIRST_LET TER, this tracks their remaining text fragments 268 // For RenderBlocks and RenderInlines with m_style->styleType() == FIRST_LET TER, this tracks their remaining text fragments
273 RenderTextFragment* firstLetterRemainingText() const; 269 RenderTextFragment* firstLetterRemainingText() const;
274 void setFirstLetterRemainingText(RenderTextFragment*); 270 void setFirstLetterRemainingText(RenderTextFragment*);
275 271
276 // These functions are only used internally to manipulate the render tree st ructure via remove/insert/appendChildNode. 272 // These functions are only used internally to manipulate the render tree st ructure via remove/insert/appendChildNode.
277 // Since they are typically called only to move objects around within anonym ous blocks (which only have layers in 273 // Since they are typically called only to move objects around within anonym ous blocks (which only have layers in
278 // the case of column spans), the default for fullRemoveInsert is false rath er than true. 274 // the case of column spans), the default for fullRemoveInsert is false rath er than true.
279 void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child , RenderObject* beforeChild, bool fullRemoveInsert = false); 275 void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child , RenderObject* beforeChild, bool fullRemoveInsert = false);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, c onst class BorderEdge[], 321 void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, c onst class BorderEdge[],
326 float thickness, float drawThickness, BoxSide, const RenderStyle*, 322 float thickness, float drawThickness, BoxSide, const RenderStyle*,
327 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); 323 Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
328 }; 324 };
329 325
330 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject()); 326 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject());
331 327
332 } // namespace blink 328 } // namespace blink
333 329
334 #endif // RenderBoxModelObject_h 330 #endif // RenderBoxModelObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698