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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 LayoutUnit BorderOver() const { | 279 LayoutUnit BorderOver() const { |
280 return LayoutUnit(Style()->BorderOverWidth()); | 280 return LayoutUnit(Style()->BorderOverWidth()); |
281 } | 281 } |
282 LayoutUnit BorderUnder() const { | 282 LayoutUnit BorderUnder() const { |
283 return LayoutUnit(Style()->BorderUnderWidth()); | 283 return LayoutUnit(Style()->BorderUnderWidth()); |
284 } | 284 } |
285 | 285 |
286 LayoutUnit BorderWidth() const { return BorderLeft() + BorderRight(); } | 286 LayoutUnit BorderWidth() const { return BorderLeft() + BorderRight(); } |
287 LayoutUnit BorderHeight() const { return BorderTop() + BorderBottom(); } | 287 LayoutUnit BorderHeight() const { return BorderTop() + BorderBottom(); } |
288 | 288 |
| 289 virtual LayoutRectOutsets BorderBoxOutsets() const { |
| 290 return LayoutRectOutsets(BorderTop(), BorderRight(), BorderBottom(), |
| 291 BorderLeft()); |
| 292 } |
| 293 |
289 // Insets from the border box to the inside of the border. | 294 // Insets from the border box to the inside of the border. |
290 LayoutRectOutsets BorderInsets() const { | 295 LayoutRectOutsets BorderInsets() const { |
291 return LayoutRectOutsets(-BorderTop(), -BorderRight(), -BorderBottom(), | 296 return LayoutRectOutsets(-BorderTop(), -BorderRight(), -BorderBottom(), |
292 -BorderLeft()); | 297 -BorderLeft()); |
293 } | 298 } |
294 | 299 |
295 bool HasBorderOrPadding() const { | 300 bool HasBorderOrPadding() const { |
296 return Style()->HasBorder() || Style()->HasPadding(); | 301 return Style()->HasBorder() || Style()->HasPadding(); |
297 } | 302 } |
298 | 303 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 551 } |
547 | 552 |
548 std::unique_ptr<LayoutBoxModelObjectRareData> rare_data_; | 553 std::unique_ptr<LayoutBoxModelObjectRareData> rare_data_; |
549 }; | 554 }; |
550 | 555 |
551 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, IsBoxModelObject()); | 556 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, IsBoxModelObject()); |
552 | 557 |
553 } // namespace blink | 558 } // namespace blink |
554 | 559 |
555 #endif // LayoutBoxModelObject_h | 560 #endif // LayoutBoxModelObject_h |
OLD | NEW |