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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 virtual LayoutUnit paddingRight() const { return computedCSSPaddingRight(); } | 243 virtual LayoutUnit paddingRight() const { return computedCSSPaddingRight(); } |
244 virtual LayoutUnit paddingBefore() const { | 244 virtual LayoutUnit paddingBefore() const { |
245 return computedCSSPaddingBefore(); | 245 return computedCSSPaddingBefore(); |
246 } | 246 } |
247 virtual LayoutUnit paddingAfter() const { return computedCSSPaddingAfter(); } | 247 virtual LayoutUnit paddingAfter() const { return computedCSSPaddingAfter(); } |
248 virtual LayoutUnit paddingStart() const { return computedCSSPaddingStart(); } | 248 virtual LayoutUnit paddingStart() const { return computedCSSPaddingStart(); } |
249 virtual LayoutUnit paddingEnd() const { return computedCSSPaddingEnd(); } | 249 virtual LayoutUnit paddingEnd() const { return computedCSSPaddingEnd(); } |
250 LayoutUnit paddingOver() const { return computedCSSPaddingOver(); } | 250 LayoutUnit paddingOver() const { return computedCSSPaddingOver(); } |
251 LayoutUnit paddingUnder() const { return computedCSSPaddingUnder(); } | 251 LayoutUnit paddingUnder() const { return computedCSSPaddingUnder(); } |
252 | 252 |
253 virtual int borderTop() const { return style()->borderTopWidth(); } | 253 virtual LayoutUnit borderTop() const { |
254 virtual int borderBottom() const { return style()->borderBottomWidth(); } | 254 return LayoutUnit(style()->borderTopWidth()); |
255 virtual int borderLeft() const { return style()->borderLeftWidth(); } | 255 } |
256 virtual int borderRight() const { return style()->borderRightWidth(); } | 256 virtual LayoutUnit borderBottom() const { |
257 virtual int borderBefore() const { return style()->borderBeforeWidth(); } | 257 return LayoutUnit(style()->borderBottomWidth()); |
258 virtual int borderAfter() const { return style()->borderAfterWidth(); } | 258 } |
259 virtual int borderStart() const { return style()->borderStartWidth(); } | 259 virtual LayoutUnit borderLeft() const { |
260 virtual int borderEnd() const { return style()->borderEndWidth(); } | 260 return LayoutUnit(style()->borderLeftWidth()); |
261 int borderOver() const { return style()->borderOverWidth(); } | 261 } |
262 int borderUnder() const { return style()->borderUnderWidth(); } | 262 virtual LayoutUnit borderRight() const { |
| 263 return LayoutUnit(style()->borderRightWidth()); |
| 264 } |
| 265 virtual LayoutUnit borderBefore() const { |
| 266 return LayoutUnit(style()->borderBeforeWidth()); |
| 267 } |
| 268 virtual LayoutUnit borderAfter() const { |
| 269 return LayoutUnit(style()->borderAfterWidth()); |
| 270 } |
| 271 virtual LayoutUnit borderStart() const { |
| 272 return LayoutUnit(style()->borderStartWidth()); |
| 273 } |
| 274 virtual LayoutUnit borderEnd() const { |
| 275 return LayoutUnit(style()->borderEndWidth()); |
| 276 } |
| 277 LayoutUnit borderOver() const { |
| 278 return LayoutUnit(style()->borderOverWidth()); |
| 279 } |
| 280 LayoutUnit borderUnder() const { |
| 281 return LayoutUnit(style()->borderUnderWidth()); |
| 282 } |
263 | 283 |
264 int borderWidth() const { return borderLeft() + borderRight(); } | 284 LayoutUnit borderWidth() const { return borderLeft() + borderRight(); } |
265 int borderHeight() const { return borderTop() + borderBottom(); } | 285 LayoutUnit borderHeight() const { return borderTop() + borderBottom(); } |
266 | 286 |
267 // Insets from the border box to the inside of the border. | 287 // Insets from the border box to the inside of the border. |
268 LayoutRectOutsets borderInsets() const { | 288 LayoutRectOutsets borderInsets() const { |
269 return LayoutRectOutsets(-borderTop(), -borderRight(), -borderBottom(), | 289 return LayoutRectOutsets(-borderTop(), -borderRight(), -borderBottom(), |
270 -borderLeft()); | 290 -borderLeft()); |
271 } | 291 } |
272 | 292 |
273 bool hasBorderOrPadding() const { | 293 bool hasBorderOrPadding() const { |
274 return style()->hasBorder() || style()->hasPadding(); | 294 return style()->hasBorder() || style()->hasPadding(); |
275 } | 295 } |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 std::unique_ptr<PaintLayer> m_layer; | 546 std::unique_ptr<PaintLayer> m_layer; |
527 | 547 |
528 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; | 548 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; |
529 }; | 549 }; |
530 | 550 |
531 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); | 551 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); |
532 | 552 |
533 } // namespace blink | 553 } // namespace blink |
534 | 554 |
535 #endif // LayoutBoxModelObject_h | 555 #endif // LayoutBoxModelObject_h |
OLD | NEW |