OLD | NEW |
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, 2009, 2010 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserv
ed. |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 { | 115 { |
116 if (style()->isHorizontalWritingMode()) | 116 if (style()->isHorizontalWritingMode()) |
117 return style()->isFlippedBlocksWritingMode() ? outerBorderBefore() :
outerBorderAfter(); | 117 return style()->isFlippedBlocksWritingMode() ? outerBorderBefore() :
outerBorderAfter(); |
118 return style()->isLeftToRightDirection() ? outerBorderEnd() : outerBorde
rStart(); | 118 return style()->isLeftToRightDirection() ? outerBorderEnd() : outerBorde
rStart(); |
119 } | 119 } |
120 | 120 |
121 int calcBorderStart() const; | 121 int calcBorderStart() const; |
122 int calcBorderEnd() const; | 122 int calcBorderEnd() const; |
123 void recalcBordersInRowDirection(); | 123 void recalcBordersInRowDirection(); |
124 | 124 |
125 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) ov
erride; | 125 virtual void addChild(LayoutObject* child, LayoutObject* beforeChild = 0) ov
erride; |
126 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje
ct* beforeChild = 0) override; | 126 virtual void addChildIgnoringContinuation(LayoutObject* newChild, LayoutObje
ct* beforeChild = 0) override; |
127 | 127 |
128 struct ColumnStruct { | 128 struct ColumnStruct { |
129 explicit ColumnStruct(unsigned initialSpan = 1) | 129 explicit ColumnStruct(unsigned initialSpan = 1) |
130 : span(initialSpan) | 130 : span(initialSpan) |
131 { | 131 { |
132 } | 132 } |
133 | 133 |
134 unsigned span; | 134 unsigned span; |
135 }; | 135 }; |
136 | 136 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 void setCurrentBorderValue(const CollapsedBorderValue* val) { m_currentBorde
r = val; } | 249 void setCurrentBorderValue(const CollapsedBorderValue* val) { m_currentBorde
r = val; } |
250 | 250 |
251 bool hasSections() const { return m_head || m_foot || m_firstBody; } | 251 bool hasSections() const { return m_head || m_foot || m_firstBody; } |
252 | 252 |
253 void recalcSectionsIfNeeded() const | 253 void recalcSectionsIfNeeded() const |
254 { | 254 { |
255 if (m_needsSectionRecalc) | 255 if (m_needsSectionRecalc) |
256 recalcSections(); | 256 recalcSections(); |
257 } | 257 } |
258 | 258 |
259 static LayoutTable* createAnonymousWithParentRenderer(const RenderObject*); | 259 static LayoutTable* createAnonymousWithParentRenderer(const LayoutObject*); |
260 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare
nt) const override | 260 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare
nt) const override |
261 { | 261 { |
262 return createAnonymousWithParentRenderer(parent); | 262 return createAnonymousWithParentRenderer(parent); |
263 } | 263 } |
264 | 264 |
265 const BorderValue& tableStartBorderAdjoiningCell(const LayoutTableCell*) con
st; | 265 const BorderValue& tableStartBorderAdjoiningCell(const LayoutTableCell*) con
st; |
266 const BorderValue& tableEndBorderAdjoiningCell(const LayoutTableCell*) const
; | 266 const BorderValue& tableEndBorderAdjoiningCell(const LayoutTableCell*) const
; |
267 | 267 |
268 void addCaption(const LayoutTableCaption*); | 268 void addCaption(const LayoutTableCaption*); |
269 void removeCaption(const LayoutTableCaption*); | 269 void removeCaption(const LayoutTableCaption*); |
270 void addColumn(const LayoutTableCol*); | 270 void addColumn(const LayoutTableCol*); |
271 void removeColumn(const LayoutTableCol*); | 271 void removeColumn(const LayoutTableCol*); |
272 | 272 |
273 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin
t&) override final; | 273 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin
t&) override final; |
274 | 274 |
275 virtual void paintMask(const PaintInfo&, const LayoutPoint&) override final; | 275 virtual void paintMask(const PaintInfo&, const LayoutPoint&) override final; |
276 | 276 |
277 const CollapsedBorderValues& collapsedBorders() { return m_collapsedBorders;
} | 277 const CollapsedBorderValues& collapsedBorders() { return m_collapsedBorders;
} |
278 void subtractCaptionRect(LayoutRect&) const; | 278 void subtractCaptionRect(LayoutRect&) const; |
279 void recalcCollapsedBorders(); | 279 void recalcCollapsedBorders(); |
280 | 280 |
281 protected: | 281 protected: |
282 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; | 282 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
283 virtual void simplifiedNormalFlowLayout() override; | 283 virtual void simplifiedNormalFlowLayout() override; |
284 | 284 |
285 private: | 285 private: |
286 virtual const char* renderName() const override { return "LayoutTable"; } | 286 virtual const char* renderName() const override { return "LayoutTable"; } |
287 | 287 |
288 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectTable || RenderBlock::isOfType(type); } | 288 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectTable || RenderBlock::isOfType(type); } |
289 | 289 |
290 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; | 290 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; |
291 virtual void layout() override; | 291 virtual void layout() override; |
292 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit&
maxWidth) const override; | 292 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit&
maxWidth) const override; |
293 virtual void computePreferredLogicalWidths() override; | 293 virtual void computePreferredLogicalWidths() override; |
294 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; | 294 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override; |
295 | 295 |
296 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; | 296 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; |
297 virtual int firstLineBoxBaseline() const override; | 297 virtual int firstLineBoxBaseline() const override; |
298 virtual int inlineBlockBaseline(LineDirectionMode) const override; | 298 virtual int inlineBlockBaseline(LineDirectionMode) const override; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 inline LayoutTableSection* LayoutTable::topSection() const | 355 inline LayoutTableSection* LayoutTable::topSection() const |
356 { | 356 { |
357 ASSERT(!needsSectionRecalc()); | 357 ASSERT(!needsSectionRecalc()); |
358 if (m_head) | 358 if (m_head) |
359 return m_head; | 359 return m_head; |
360 if (m_firstBody) | 360 if (m_firstBody) |
361 return m_firstBody; | 361 return m_firstBody; |
362 return m_foot; | 362 return m_foot; |
363 } | 363 } |
364 | 364 |
365 DEFINE_RENDER_OBJECT_TYPE_CASTS(LayoutTable, isTable()); | 365 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); |
366 | 366 |
367 } // namespace blink | 367 } // namespace blink |
368 | 368 |
369 #endif // LayoutTable_h | 369 #endif // LayoutTable_h |
OLD | NEW |