OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual LayoutUnit offsetLeft() const; | 69 virtual LayoutUnit offsetLeft() const; |
70 virtual LayoutUnit offsetTop() const; | 70 virtual LayoutUnit offsetTop() const; |
71 virtual LayoutUnit offsetWidth() const = 0; | 71 virtual LayoutUnit offsetWidth() const = 0; |
72 virtual LayoutUnit offsetHeight() const = 0; | 72 virtual LayoutUnit offsetHeight() const = 0; |
73 | 73 |
74 int pixelSnappedOffsetLeft() const { return roundToInt(offsetLeft()); } | 74 int pixelSnappedOffsetLeft() const { return roundToInt(offsetLeft()); } |
75 int pixelSnappedOffsetTop() const { return roundToInt(offsetTop()); } | 75 int pixelSnappedOffsetTop() const { return roundToInt(offsetTop()); } |
76 virtual int pixelSnappedOffsetWidth() const; | 76 virtual int pixelSnappedOffsetWidth() const; |
77 virtual int pixelSnappedOffsetHeight() const; | 77 virtual int pixelSnappedOffsetHeight() const; |
78 | 78 |
79 virtual void updateFromStyle() OVERRIDE; | 79 virtual void updateFromStyle() override; |
80 | 80 |
81 // This will work on inlines to return the bounding box of all of the lines'
border boxes. | 81 // This will work on inlines to return the bounding box of all of the lines'
border boxes. |
82 virtual IntRect borderBoundingBox() const = 0; | 82 virtual IntRect borderBoundingBox() const = 0; |
83 | 83 |
84 // These return the CSS computed padding values. | 84 // These return the CSS computed padding values. |
85 LayoutUnit computedCSSPaddingTop() const { return computedCSSPadding(style()
->paddingTop()); } | 85 LayoutUnit computedCSSPaddingTop() const { return computedCSSPadding(style()
->paddingTop()); } |
86 LayoutUnit computedCSSPaddingBottom() const { return computedCSSPadding(styl
e()->paddingBottom()); } | 86 LayoutUnit computedCSSPaddingBottom() const { return computedCSSPadding(styl
e()->paddingBottom()); } |
87 LayoutUnit computedCSSPaddingLeft() const { return computedCSSPadding(style(
)->paddingLeft()); } | 87 LayoutUnit computedCSSPaddingLeft() const { return computedCSSPadding(style(
)->paddingLeft()); } |
88 LayoutUnit computedCSSPaddingRight() const { return computedCSSPadding(style
()->paddingRight()); } | 88 LayoutUnit computedCSSPaddingRight() const { return computedCSSPadding(style
()->paddingRight()); } |
89 LayoutUnit computedCSSPaddingBefore() const { return computedCSSPadding(styl
e()->paddingBefore()); } | 89 LayoutUnit computedCSSPaddingBefore() const { return computedCSSPadding(styl
e()->paddingBefore()); } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 virtual LayoutUnit containingBlockLogicalWidthForContent() const; | 149 virtual LayoutUnit containingBlockLogicalWidthForContent() const; |
150 | 150 |
151 virtual void childBecameNonInline(RenderObject* /*child*/) { } | 151 virtual void childBecameNonInline(RenderObject* /*child*/) { } |
152 | 152 |
153 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
InlineFlowBox* = 0) const; | 153 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
InlineFlowBox* = 0) const; |
154 | 154 |
155 // Overridden by subclasses to determine line height and baseline position. | 155 // Overridden by subclasses to determine line height and baseline position. |
156 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const = 0; | 156 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const = 0; |
157 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const = 0; | 157 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const = 0; |
158 | 158 |
159 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst OVERRIDE; | 159 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; |
160 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; | 160 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const override; |
161 | 161 |
162 virtual void setSelectionState(SelectionState) OVERRIDE; | 162 virtual void setSelectionState(SelectionState) override; |
163 | 163 |
164 void contentChanged(ContentChangeType); | 164 void contentChanged(ContentChangeType); |
165 bool hasAcceleratedCompositing() const; | 165 bool hasAcceleratedCompositing() const; |
166 | 166 |
167 virtual void computeLayerHitTestRects(LayerHitTestRects&) const OVERRIDE; | 167 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override; |
168 | 168 |
169 protected: | 169 protected: |
170 virtual void willBeDestroyed() OVERRIDE; | 170 virtual void willBeDestroyed() override; |
171 | 171 |
172 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const
; | 172 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const
; |
173 | 173 |
174 bool calculateHasBoxDecorations() const; | 174 bool calculateHasBoxDecorations() const; |
175 | 175 |
176 RenderBoxModelObject* continuation() const; | 176 RenderBoxModelObject* continuation() const; |
177 void setContinuation(RenderBoxModelObject*); | 177 void setContinuation(RenderBoxModelObject*); |
178 | 178 |
179 LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIn
dentOffset); | 179 LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIn
dentOffset); |
180 | 180 |
(...skipping 27 matching lines...) Expand all Loading... |
208 { | 208 { |
209 moveChildrenTo(toBoxModelObject, startChild, endChild, 0, fullRemoveInse
rt); | 209 moveChildrenTo(toBoxModelObject, startChild, endChild, 0, fullRemoveInse
rt); |
210 } | 210 } |
211 void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* st
artChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInse
rt = false); | 211 void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* st
artChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInse
rt = false); |
212 | 212 |
213 enum ScaleByEffectiveZoomOrNot { ScaleByEffectiveZoom, DoNotScaleByEffective
Zoom }; | 213 enum ScaleByEffectiveZoomOrNot { ScaleByEffectiveZoom, DoNotScaleByEffective
Zoom }; |
214 IntSize calculateImageIntrinsicDimensions(StyleImage*, const IntSize& scaled
PositioningAreaSize, ScaleByEffectiveZoomOrNot) const; | 214 IntSize calculateImageIntrinsicDimensions(StyleImage*, const IntSize& scaled
PositioningAreaSize, ScaleByEffectiveZoomOrNot) const; |
215 | 215 |
216 private: | 216 private: |
217 LayoutUnit computedCSSPadding(const Length&) const; | 217 LayoutUnit computedCSSPadding(const Length&) const; |
218 virtual bool isBoxModelObject() const OVERRIDE FINAL { return true; } | 218 virtual bool isBoxModelObject() const override final { return true; } |
219 }; | 219 }; |
220 | 220 |
221 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject()); | 221 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject()); |
222 | 222 |
223 } // namespace blink | 223 } // namespace blink |
224 | 224 |
225 #endif // RenderBoxModelObject_h | 225 #endif // RenderBoxModelObject_h |
OLD | NEW |