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

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

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 years, 4 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
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 LayoutUnit marginLogicalHeight() const { return marginBefore() + marginAfter (); } 150 LayoutUnit marginLogicalHeight() const { return marginBefore() + marginAfter (); }
151 LayoutUnit marginLogicalWidth() const { return marginStart() + marginEnd(); } 151 LayoutUnit marginLogicalWidth() const { return marginStart() + marginEnd(); }
152 152
153 bool hasInlineDirectionBordersPaddingOrMargin() const { return hasInlineDire ctionBordersOrPadding() || marginStart()|| marginEnd(); } 153 bool hasInlineDirectionBordersPaddingOrMargin() const { return hasInlineDire ctionBordersOrPadding() || marginStart()|| marginEnd(); }
154 bool hasInlineDirectionBordersOrPadding() const { return borderStart() || bo rderEnd() || paddingStart()|| paddingEnd(); } 154 bool hasInlineDirectionBordersOrPadding() const { return borderStart() || bo rderEnd() || paddingStart()|| paddingEnd(); }
155 155
156 virtual LayoutUnit containingBlockLogicalWidthForContent() const; 156 virtual LayoutUnit containingBlockLogicalWidthForContent() const;
157 157
158 virtual void childBecameNonInline(RenderObject* /*child*/) { } 158 virtual void childBecameNonInline(RenderObject* /*child*/) { }
159 159
160 void paintBorder(const PaintInfo&, const LayoutRect&, const RenderStyle*, Ba ckgroundBleedAvoidance = BackgroundBleedNone, bool includeLogicalLeftEdge = true , bool includeLogicalRightEdge = true); 160 void paintBorder(PaintInfo&, const LayoutRect&, const RenderStyle*, Backgrou ndBleedAvoidance = BackgroundBleedNone, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true);
161 bool paintNinePieceImage(GraphicsContext*, const LayoutRect&, const RenderSt yle*, const NinePieceImage&, CompositeOperator = CompositeSourceOver); 161 bool paintNinePieceImage(GraphicsContext*, const LayoutRect&, const RenderSt yle*, const NinePieceImage&, CompositeOperator = CompositeSourceOver);
162 void paintBoxShadow(const PaintInfo&, const LayoutRect&, const RenderStyle*, ShadowStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); 162 void paintBoxShadow(PaintInfo&, const LayoutRect&, const RenderStyle*, Shado wStyle, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) ;
163 void paintFillLayerExtended(const PaintInfo&, const Color&, const FillLayer* , const LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox* = 0, const LayoutS ize& = LayoutSize(), CompositeOperator = CompositeSourceOver, RenderObject* back groundObject = 0); 163 void paintFillLayerExtended(PaintInfo&, const Color&, const FillLayer*, cons t LayoutRect&, BackgroundBleedAvoidance, InlineFlowBox* = 0, const LayoutSize& = LayoutSize(), CompositeOperator = CompositeSourceOver, RenderObject* background Object = 0);
164 164
165 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox* = 0) const; 165 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox* = 0) const;
166 166
167 // Overridden by subclasses to determine line height and baseline position. 167 // Overridden by subclasses to determine line height and baseline position.
168 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const = 0; 168 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const = 0;
169 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const = 0; 169 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const = 0;
170 170
171 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst OVERRIDE; 171 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst OVERRIDE;
172 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; 172 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE;
173 173
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBoxModelObject()); 334 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBoxModelObject());
335 return static_cast<const RenderBoxModelObject*>(object); 335 return static_cast<const RenderBoxModelObject*>(object);
336 } 336 }
337 337
338 // This will catch anyone doing an unnecessary cast. 338 // This will catch anyone doing an unnecessary cast.
339 void toRenderBoxModelObject(const RenderBoxModelObject*); 339 void toRenderBoxModelObject(const RenderBoxModelObject*);
340 340
341 } // namespace WebCore 341 } // namespace WebCore
342 342
343 #endif // RenderBoxModelObject_h 343 #endif // RenderBoxModelObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698