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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderBoxModelObject.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 /* 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 LayoutUnit marginHeight() const { return marginTop() + marginBottom(); } 143 LayoutUnit marginHeight() const { return marginTop() + marginBottom(); }
144 LayoutUnit marginWidth() const { return marginLeft() + marginRight(); } 144 LayoutUnit marginWidth() const { return marginLeft() + marginRight(); }
145 LayoutUnit marginLogicalHeight() const { return marginBefore() + marginAfter (); } 145 LayoutUnit marginLogicalHeight() const { return marginBefore() + marginAfter (); }
146 LayoutUnit marginLogicalWidth() const { return marginStart() + marginEnd(); } 146 LayoutUnit marginLogicalWidth() const { return marginStart() + marginEnd(); }
147 147
148 bool hasInlineDirectionBordersPaddingOrMargin() const { return hasInlineDire ctionBordersOrPadding() || marginStart()|| marginEnd(); } 148 bool hasInlineDirectionBordersPaddingOrMargin() const { return hasInlineDire ctionBordersOrPadding() || marginStart()|| marginEnd(); }
149 bool hasInlineDirectionBordersOrPadding() const { return borderStart() || bo rderEnd() || paddingStart()|| paddingEnd(); } 149 bool hasInlineDirectionBordersOrPadding() const { return borderStart() || bo rderEnd() || paddingStart()|| paddingEnd(); }
150 150
151 virtual LayoutUnit containingBlockLogicalWidthForContent() const; 151 virtual LayoutUnit containingBlockLogicalWidthForContent() const;
152 152
153 virtual void childBecameNonInline(RenderObject* /*child*/) { } 153 virtual void childBecameNonInline(LayoutObject* /*child*/) { }
154 154
155 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox* = 0) const; 155 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox* = 0) const;
156 156
157 // Overridden by subclasses to determine line height and baseline position. 157 // Overridden by subclasses to determine line height and baseline position.
158 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const = 0; 158 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const = 0;
159 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const = 0; 159 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const = 0;
160 160
161 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override; 161 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst override;
162 virtual const RenderObject* pushMappingToContainer(const LayoutLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override; 162 virtual const LayoutObject* pushMappingToContainer(const LayoutLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const override;
163 163
164 virtual void setSelectionState(SelectionState) override; 164 virtual void setSelectionState(SelectionState) override;
165 165
166 void contentChanged(ContentChangeType); 166 void contentChanged(ContentChangeType);
167 bool hasAcceleratedCompositing() const; 167 bool hasAcceleratedCompositing() const;
168 168
169 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override; 169 virtual void computeLayerHitTestRects(LayerHitTestRects&) const override;
170 170
171 protected: 171 protected:
172 virtual void willBeDestroyed() override; 172 virtual void willBeDestroyed() override;
173 173
174 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const ; 174 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const ;
175 175
176 bool calculateHasBoxDecorations() const; 176 bool calculateHasBoxDecorations() const;
177 177
178 RenderBoxModelObject* continuation() const; 178 RenderBoxModelObject* continuation() const;
179 void setContinuation(RenderBoxModelObject*); 179 void setContinuation(RenderBoxModelObject*);
180 180
181 LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIn dentOffset); 181 LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIn dentOffset);
182 182
183 bool hasAutoHeightOrContainingBlockWithAutoHeight() const; 183 bool hasAutoHeightOrContainingBlockWithAutoHeight() const;
184 RenderBlock* containingBlockForAutoHeightDetection(Length logicalHeight) con st; 184 RenderBlock* containingBlockForAutoHeightDetection(Length logicalHeight) con st;
185 185
186 public: 186 public:
187 // These functions are only used internally to manipulate the render tree st ructure via remove/insert/appendChildNode. 187 // These functions are only used internally to manipulate the render tree st ructure via remove/insert/appendChildNode.
188 // Since they are typically called only to move objects around within anonym ous blocks (which only have layers in 188 // Since they are typically called only to move objects around within anonym ous blocks (which only have layers in
189 // the case of column spans), the default for fullRemoveInsert is false rath er than true. 189 // the case of column spans), the default for fullRemoveInsert is false rath er than true.
190 void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child , RenderObject* beforeChild, bool fullRemoveInsert = false); 190 void moveChildTo(RenderBoxModelObject* toBoxModelObject, LayoutObject* child , LayoutObject* beforeChild, bool fullRemoveInsert = false);
191 void moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child , bool fullRemoveInsert = false) 191 void moveChildTo(RenderBoxModelObject* toBoxModelObject, LayoutObject* child , bool fullRemoveInsert = false)
192 { 192 {
193 moveChildTo(toBoxModelObject, child, 0, fullRemoveInsert); 193 moveChildTo(toBoxModelObject, child, 0, fullRemoveInsert);
194 } 194 }
195 void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, bool fullRemo veInsert = false) 195 void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, bool fullRemo veInsert = false)
196 { 196 {
197 moveAllChildrenTo(toBoxModelObject, 0, fullRemoveInsert); 197 moveAllChildrenTo(toBoxModelObject, 0, fullRemoveInsert);
198 } 198 }
199 void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* beforeChild, bool fullRemoveInsert = false) 199 void moveAllChildrenTo(RenderBoxModelObject* toBoxModelObject, LayoutObject* beforeChild, bool fullRemoveInsert = false)
200 { 200 {
201 moveChildrenTo(toBoxModelObject, slowFirstChild(), 0, beforeChild, fullR emoveInsert); 201 moveChildrenTo(toBoxModelObject, slowFirstChild(), 0, beforeChild, fullR emoveInsert);
202 } 202 }
203 // Move all of the kids from |startChild| up to but excluding |endChild|. 0 can be passed as the |endChild| to denote 203 // Move all of the kids from |startChild| up to but excluding |endChild|. 0 can be passed as the |endChild| to denote
204 // that all the kids from |startChild| onwards should be moved. 204 // that all the kids from |startChild| onwards should be moved.
205 void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* st artChild, RenderObject* endChild, bool fullRemoveInsert = false) 205 void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, LayoutObject* st artChild, LayoutObject* endChild, bool fullRemoveInsert = false)
206 { 206 {
207 moveChildrenTo(toBoxModelObject, startChild, endChild, 0, fullRemoveInse rt); 207 moveChildrenTo(toBoxModelObject, startChild, endChild, 0, fullRemoveInse rt);
208 } 208 }
209 virtual void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderOb ject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRe moveInsert = false); 209 virtual void moveChildrenTo(RenderBoxModelObject* toBoxModelObject, LayoutOb ject* startChild, LayoutObject* endChild, LayoutObject* beforeChild, bool fullRe moveInsert = false);
210 210
211 enum ScaleByEffectiveZoomOrNot { ScaleByEffectiveZoom, DoNotScaleByEffective Zoom }; 211 enum ScaleByEffectiveZoomOrNot { ScaleByEffectiveZoom, DoNotScaleByEffective Zoom };
212 IntSize calculateImageIntrinsicDimensions(StyleImage*, const IntSize& scaled PositioningAreaSize, ScaleByEffectiveZoomOrNot) const; 212 IntSize calculateImageIntrinsicDimensions(StyleImage*, const IntSize& scaled PositioningAreaSize, ScaleByEffectiveZoomOrNot) const;
213 213
214 private: 214 private:
215 LayoutUnit computedCSSPadding(const Length&) const; 215 LayoutUnit computedCSSPadding(const Length&) const;
216 virtual bool isBoxModelObject() const override final { return true; } 216 virtual bool isBoxModelObject() const override final { return true; }
217 }; 217 };
218 218
219 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject()); 219 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject());
220 220
221 } // namespace blink 221 } // namespace blink
222 222
223 #endif // RenderBoxModelObject_h 223 #endif // RenderBoxModelObject_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698