| 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, 2007, 2009 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // In strict mode, box-sizing: content-box do the right thing and actual
ly add in the border and padding. | 102 // In strict mode, box-sizing: content-box do the right thing and actual
ly add in the border and padding. |
| 103 // Call computedCSSPadding* directly to avoid including implicitPadding. | 103 // Call computedCSSPadding* directly to avoid including implicitPadding. |
| 104 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) | 104 if (!document().inQuirksMode() && style()->boxSizing() != BORDER_BOX) |
| 105 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi
ngAfter()).floor() + borderBefore() + borderAfter(); | 105 styleLogicalHeight += (computedCSSPaddingBefore() + computedCSSPaddi
ngAfter()).floor() + borderBefore() + borderAfter(); |
| 106 return max(styleLogicalHeight, adjustedLogicalHeight); | 106 return max(styleLogicalHeight, adjustedLogicalHeight); |
| 107 } | 107 } |
| 108 | 108 |
| 109 | 109 |
| 110 void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&); | 110 void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&); |
| 111 | 111 |
| 112 virtual int borderLeft() const; | 112 virtual int borderLeft() const OVERRIDE; |
| 113 virtual int borderRight() const; | 113 virtual int borderRight() const OVERRIDE; |
| 114 virtual int borderTop() const; | 114 virtual int borderTop() const OVERRIDE; |
| 115 virtual int borderBottom() const; | 115 virtual int borderBottom() const OVERRIDE; |
| 116 virtual int borderStart() const; | 116 virtual int borderStart() const OVERRIDE; |
| 117 virtual int borderEnd() const; | 117 virtual int borderEnd() const OVERRIDE; |
| 118 virtual int borderBefore() const; | 118 virtual int borderBefore() const OVERRIDE; |
| 119 virtual int borderAfter() const; | 119 virtual int borderAfter() const OVERRIDE; |
| 120 | 120 |
| 121 void collectBorderValues(RenderTable::CollapsedBorderValues&) const; | 121 void collectBorderValues(RenderTable::CollapsedBorderValues&) const; |
| 122 static void sortBorderValues(RenderTable::CollapsedBorderValues&); | 122 static void sortBorderValues(RenderTable::CollapsedBorderValues&); |
| 123 | 123 |
| 124 virtual void layout(); | 124 virtual void layout() OVERRIDE; |
| 125 | 125 |
| 126 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 126 virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
| 127 | 127 |
| 128 virtual void paint(PaintInfo&, const LayoutPoint&); | 128 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 129 | 129 |
| 130 void paintCollapsedBorders(PaintInfo&, const LayoutPoint&); | 130 void paintCollapsedBorders(PaintInfo&, const LayoutPoint&); |
| 131 void paintBackgroundsBehindCell(PaintInfo&, const LayoutPoint&, RenderObject
* backgroundObject); | 131 void paintBackgroundsBehindCell(PaintInfo&, const LayoutPoint&, RenderObject
* backgroundObject); |
| 132 | 132 |
| 133 LayoutUnit cellBaselinePosition() const; | 133 LayoutUnit cellBaselinePosition() const; |
| 134 bool isBaselineAligned() const | 134 bool isBaselineAligned() const |
| 135 { | 135 { |
| 136 EVerticalAlign va = style()->verticalAlign(); | 136 EVerticalAlign va = style()->verticalAlign(); |
| 137 return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SU
PER || va == SUB || va == LENGTH; | 137 return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SU
PER || va == SUB || va == LENGTH; |
| 138 } | 138 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 return style()->borderEnd(); | 210 return style()->borderEnd(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 #ifndef NDEBUG | 213 #ifndef NDEBUG |
| 214 bool isFirstOrLastCellInRow() const | 214 bool isFirstOrLastCellInRow() const |
| 215 { | 215 { |
| 216 return !table()->cellAfter(this) || !table()->cellBefore(this); | 216 return !table()->cellAfter(this) || !table()->cellBefore(this); |
| 217 } | 217 } |
| 218 #endif | 218 #endif |
| 219 protected: | 219 protected: |
| 220 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 220 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE; |
| 221 virtual void computePreferredLogicalWidths(); | 221 virtual void computePreferredLogicalWidths() OVERRIDE; |
| 222 | 222 |
| 223 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& container
Rect) const OVERRIDE; | 223 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& container
Rect) const OVERRIDE; |
| 224 | 224 |
| 225 private: | 225 private: |
| 226 virtual const char* renderName() const { return (isAnonymous() || isPseudoEl
ement()) ? "RenderTableCell (anonymous)" : "RenderTableCell"; } | 226 virtual const char* renderName() const OVERRIDE { return (isAnonymous() || i
sPseudoElement()) ? "RenderTableCell (anonymous)" : "RenderTableCell"; } |
| 227 | 227 |
| 228 virtual bool isTableCell() const { return true; } | 228 virtual bool isTableCell() const OVERRIDE { return true; } |
| 229 | 229 |
| 230 virtual void willBeRemovedFromTree() OVERRIDE; | 230 virtual void willBeRemovedFromTree() OVERRIDE; |
| 231 | 231 |
| 232 virtual void updateLogicalWidth() OVERRIDE; | 232 virtual void updateLogicalWidth() OVERRIDE; |
| 233 | 233 |
| 234 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); | 234 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 235 virtual void paintMask(PaintInfo&, const LayoutPoint&); | 235 virtual void paintMask(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 236 | 236 |
| 237 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
InlineFlowBox*) const OVERRIDE; | 237 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
InlineFlowBox*) const OVERRIDE; |
| 238 | 238 |
| 239 virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bo
ol* offsetDependsOnPoint = 0) const; | 239 virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bo
ol* offsetDependsOnPoint = 0) const OVERRIDE; |
| 240 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE; | 240 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const OVERRIDE; |
| 241 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const OVERRIDE; | 241 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const OVERRIDE; |
| 242 | 242 |
| 243 int borderHalfLeft(bool outer) const; | 243 int borderHalfLeft(bool outer) const; |
| 244 int borderHalfRight(bool outer) const; | 244 int borderHalfRight(bool outer) const; |
| 245 int borderHalfTop(bool outer) const; | 245 int borderHalfTop(bool outer) const; |
| 246 int borderHalfBottom(bool outer) const; | 246 int borderHalfBottom(bool outer) const; |
| 247 | 247 |
| 248 int borderHalfStart(bool outer) const; | 248 int borderHalfStart(bool outer) const; |
| 249 int borderHalfEnd(bool outer) const; | 249 int borderHalfEnd(bool outer) const; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 unsigned m_hasRowSpan: 1; | 286 unsigned m_hasRowSpan: 1; |
| 287 int m_intrinsicPaddingBefore; | 287 int m_intrinsicPaddingBefore; |
| 288 int m_intrinsicPaddingAfter; | 288 int m_intrinsicPaddingAfter; |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell()); | 291 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell()); |
| 292 | 292 |
| 293 } // namespace WebCore | 293 } // namespace WebCore |
| 294 | 294 |
| 295 #endif // RenderTableCell_h | 295 #endif // RenderTableCell_h |
| OLD | NEW |