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

Side by Side Diff: Source/core/layout/LayoutTableCell.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/layout/LayoutTableCaption.h ('k') | Source/core/layout/LayoutTableCell.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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 virtual LayoutUnit paddingAfter() const override; 153 virtual LayoutUnit paddingAfter() const override;
154 154
155 void setOverrideLogicalContentHeightFromRowHeight(LayoutUnit); 155 void setOverrideLogicalContentHeightFromRowHeight(LayoutUnit);
156 156
157 virtual void scrollbarsChanged(bool horizontalScrollbarChanged, bool vertica lScrollbarChanged) override; 157 virtual void scrollbarsChanged(bool horizontalScrollbarChanged, bool vertica lScrollbarChanged) override;
158 158
159 bool cellWidthChanged() const { return m_cellWidthChanged; } 159 bool cellWidthChanged() const { return m_cellWidthChanged; }
160 void setCellWidthChanged(bool b = true) { m_cellWidthChanged = b; } 160 void setCellWidthChanged(bool b = true) { m_cellWidthChanged = b; }
161 161
162 static LayoutTableCell* createAnonymous(Document*); 162 static LayoutTableCell* createAnonymous(Document*);
163 static LayoutTableCell* createAnonymousWithParentRenderer(const RenderObject *); 163 static LayoutTableCell* createAnonymousWithParentRenderer(const LayoutObject *);
164 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare nt) const override 164 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override
165 { 165 {
166 return createAnonymousWithParentRenderer(parent); 166 return createAnonymousWithParentRenderer(parent);
167 } 167 }
168 168
169 // This function is used to unify which table part's style we use for comput ing direction and 169 // This function is used to unify which table part's style we use for comput ing direction and
170 // writing mode. Writing modes are not allowed on row group and row but dire ction is. 170 // writing mode. Writing modes are not allowed on row group and row but dire ction is.
171 // This means we can safely use the same style in all cases to simplify our code. 171 // This means we can safely use the same style in all cases to simplify our code.
172 // FIXME: Eventually this function should replaced by style() once we suppor t direction 172 // FIXME: Eventually this function should replaced by style() once we suppor t direction
173 // on all table parts and writing-mode on cells. 173 // on all table parts and writing-mode on cells.
174 const RenderStyle* styleForCellFlow() const 174 const RenderStyle* styleForCellFlow() const
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 #endif 216 #endif
217 protected: 217 protected:
218 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride; 218 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride;
219 virtual void computePreferredLogicalWidths() override; 219 virtual void computePreferredLogicalWidths() override;
220 220
221 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override; 221 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const override;
222 222
223 private: 223 private:
224 virtual const char* renderName() const override { return (isAnonymous() || i sPseudoElement()) ? "LayoutTableCell (anonymous)" : "LayoutTableCell"; } 224 virtual const char* renderName() const override { return (isAnonymous() || i sPseudoElement()) ? "LayoutTableCell (anonymous)" : "LayoutTableCell"; }
225 225
226 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectTableCell || RenderBlockFlow::isOfType(type); } 226 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectTableCell || RenderBlockFlow::isOfType(type); }
227 227
228 virtual void willBeRemovedFromTree() override; 228 virtual void willBeRemovedFromTree() override;
229 229
230 virtual void updateLogicalWidth() override; 230 virtual void updateLogicalWidth() override;
231 231
232 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin t&) override; 232 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin t&) override;
233 virtual void paintMask(const PaintInfo&, const LayoutPoint&) override; 233 virtual void paintMask(const PaintInfo&, const LayoutPoint&) override;
234 234
235 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const override; 235 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance, InlineFlowBox*) const override;
236 236
237 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const override; 237 virtual LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const override;
238 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t override; 238 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t override;
239 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o verride; 239 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o verride;
240 240
241 int borderHalfLeft(bool outer) const; 241 int borderHalfLeft(bool outer) const;
242 int borderHalfRight(bool outer) const; 242 int borderHalfRight(bool outer) const;
243 int borderHalfTop(bool outer) const; 243 int borderHalfTop(bool outer) const;
244 int borderHalfBottom(bool outer) const; 244 int borderHalfBottom(bool outer) const;
245 245
246 int borderHalfStart(bool outer) const; 246 int borderHalfStart(bool outer) const;
247 int borderHalfEnd(bool outer) const; 247 int borderHalfEnd(bool outer) const;
(...skipping 29 matching lines...) Expand all
277 277
278 // Note MSVC will only pack members if they have identical types, hence we u se unsigned instead of bool here. 278 // Note MSVC will only pack members if they have identical types, hence we u se unsigned instead of bool here.
279 unsigned m_column : 29; 279 unsigned m_column : 29;
280 unsigned m_cellWidthChanged : 1; 280 unsigned m_cellWidthChanged : 1;
281 unsigned m_hasColSpan: 1; 281 unsigned m_hasColSpan: 1;
282 unsigned m_hasRowSpan: 1; 282 unsigned m_hasRowSpan: 1;
283 int m_intrinsicPaddingBefore; 283 int m_intrinsicPaddingBefore;
284 int m_intrinsicPaddingAfter; 284 int m_intrinsicPaddingAfter;
285 }; 285 };
286 286
287 DEFINE_RENDER_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell()); 287 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell());
288 288
289 inline LayoutTableCell* LayoutTableCell::previousCell() const 289 inline LayoutTableCell* LayoutTableCell::previousCell() const
290 { 290 {
291 return toLayoutTableCell(RenderObject::previousSibling()); 291 return toLayoutTableCell(LayoutObject::previousSibling());
292 } 292 }
293 293
294 inline LayoutTableCell* LayoutTableCell::nextCell() const 294 inline LayoutTableCell* LayoutTableCell::nextCell() const
295 { 295 {
296 return toLayoutTableCell(RenderObject::nextSibling()); 296 return toLayoutTableCell(LayoutObject::nextSibling());
297 } 297 }
298 298
299 inline LayoutTableCell* LayoutTableRow::firstCell() const 299 inline LayoutTableCell* LayoutTableRow::firstCell() const
300 { 300 {
301 ASSERT(children() == virtualChildren()); 301 ASSERT(children() == virtualChildren());
302 return toLayoutTableCell(children()->firstChild()); 302 return toLayoutTableCell(children()->firstChild());
303 } 303 }
304 304
305 inline LayoutTableCell* LayoutTableRow::lastCell() const 305 inline LayoutTableCell* LayoutTableRow::lastCell() const
306 { 306 {
307 ASSERT(children() == virtualChildren()); 307 ASSERT(children() == virtualChildren());
308 return toLayoutTableCell(children()->lastChild()); 308 return toLayoutTableCell(children()->lastChild());
309 } 309 }
310 310
311 } // namespace blink 311 } // namespace blink
312 312
313 #endif // LayoutTableCell_h 313 #endif // LayoutTableCell_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTableCaption.h ('k') | Source/core/layout/LayoutTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698