| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 int borderWidth() const { return borderLeft() + borderRight(); } | 226 int borderWidth() const { return borderLeft() + borderRight(); } |
| 227 int borderHeight() const { return borderTop() + borderBottom(); } | 227 int borderHeight() const { return borderTop() + borderBottom(); } |
| 228 | 228 |
| 229 // Insets from the border box to the inside of the border. | 229 // Insets from the border box to the inside of the border. |
| 230 LayoutRectOutsets borderInsets() const { return LayoutRectOutsets(-borderTop
(), -borderRight(), -borderBottom(), -borderLeft()); } | 230 LayoutRectOutsets borderInsets() const { return LayoutRectOutsets(-borderTop
(), -borderRight(), -borderBottom(), -borderLeft()); } |
| 231 | 231 |
| 232 bool hasBorderOrPadding() const { return style()->hasBorder() || style()->ha
sPadding(); } | 232 bool hasBorderOrPadding() const { return style()->hasBorder() || style()->ha
sPadding(); } |
| 233 | 233 |
| 234 LayoutUnit borderAndPaddingStart() const { return borderStart() + paddingSta
rt(); } | 234 LayoutUnit borderAndPaddingStart() const { return borderStart() + paddingSta
rt(); } |
| 235 LayoutUnit borderAndPaddingBefore() const { return borderBefore() + paddingB
efore(); } | 235 DISABLE_CFI_PERF LayoutUnit borderAndPaddingBefore() const { return borderBe
fore() + paddingBefore(); } |
| 236 LayoutUnit borderAndPaddingAfter() const { return borderAfter() + paddingAft
er(); } | 236 DISABLE_CFI_PERF LayoutUnit borderAndPaddingAfter() const { return borderAft
er() + paddingAfter(); } |
| 237 LayoutUnit borderAndPaddingOver() const { return borderOver() + paddingOver(
); } | 237 LayoutUnit borderAndPaddingOver() const { return borderOver() + paddingOver(
); } |
| 238 LayoutUnit borderAndPaddingUnder() const { return borderUnder() + paddingUnd
er(); } | 238 LayoutUnit borderAndPaddingUnder() const { return borderUnder() + paddingUnd
er(); } |
| 239 | 239 |
| 240 LayoutUnit borderAndPaddingHeight() const { return borderTop() + borderBotto
m() + paddingTop() + paddingBottom(); } | 240 DISABLE_CFI_PERF LayoutUnit borderAndPaddingHeight() const { return borderTo
p() + borderBottom() + paddingTop() + paddingBottom(); } |
| 241 LayoutUnit borderAndPaddingWidth() const { return borderLeft() + borderRight
() + paddingLeft() + paddingRight(); } | 241 DISABLE_CFI_PERF LayoutUnit borderAndPaddingWidth() const { return borderLef
t() + borderRight() + paddingLeft() + paddingRight(); } |
| 242 LayoutUnit borderAndPaddingLogicalHeight() const { return hasBorderOrPadding
() ? borderAndPaddingBefore() + borderAndPaddingAfter() : LayoutUnit(); } | 242 DISABLE_CFI_PERF LayoutUnit borderAndPaddingLogicalHeight() const { return h
asBorderOrPadding() ? borderAndPaddingBefore() + borderAndPaddingAfter() : Layou
tUnit(); } |
| 243 LayoutUnit borderAndPaddingLogicalWidth() const { return borderStart() + bor
derEnd() + paddingStart() + paddingEnd(); } | 243 DISABLE_CFI_PERF LayoutUnit borderAndPaddingLogicalWidth() const { return bo
rderStart() + borderEnd() + paddingStart() + paddingEnd(); } |
| 244 LayoutUnit borderAndPaddingLogicalLeft() const { return style()->isHorizonta
lWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } | 244 DISABLE_CFI_PERF LayoutUnit borderAndPaddingLogicalLeft() const { return sty
le()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + p
addingTop(); } |
| 245 | 245 |
| 246 LayoutUnit borderLogicalLeft() const { return LayoutUnit(style()->isHorizont
alWritingMode() ? borderLeft() : borderTop()); } | 246 LayoutUnit borderLogicalLeft() const { return LayoutUnit(style()->isHorizont
alWritingMode() ? borderLeft() : borderTop()); } |
| 247 LayoutUnit borderLogicalRight() const { return LayoutUnit(style()->isHorizon
talWritingMode() ? borderRight() : borderBottom()); } | 247 LayoutUnit borderLogicalRight() const { return LayoutUnit(style()->isHorizon
talWritingMode() ? borderRight() : borderBottom()); } |
| 248 | 248 |
| 249 LayoutUnit paddingLogicalWidth() const { return paddingStart() + paddingEnd(
); } | 249 LayoutUnit paddingLogicalWidth() const { return paddingStart() + paddingEnd(
); } |
| 250 LayoutUnit paddingLogicalHeight() const { return paddingBefore() + paddingAf
ter(); } | 250 LayoutUnit paddingLogicalHeight() const { return paddingBefore() + paddingAf
ter(); } |
| 251 | 251 |
| 252 virtual LayoutRectOutsets marginBoxOutsets() const = 0; | 252 virtual LayoutRectOutsets marginBoxOutsets() const = 0; |
| 253 virtual LayoutUnit marginTop() const = 0; | 253 virtual LayoutUnit marginTop() const = 0; |
| 254 virtual LayoutUnit marginBottom() const = 0; | 254 virtual LayoutUnit marginBottom() const = 0; |
| 255 virtual LayoutUnit marginLeft() const = 0; | 255 virtual LayoutUnit marginLeft() const = 0; |
| 256 virtual LayoutUnit marginRight() const = 0; | 256 virtual LayoutUnit marginRight() const = 0; |
| 257 virtual LayoutUnit marginBefore(const ComputedStyle* otherStyle = nullptr) c
onst = 0; | 257 virtual LayoutUnit marginBefore(const ComputedStyle* otherStyle = nullptr) c
onst = 0; |
| 258 virtual LayoutUnit marginAfter(const ComputedStyle* otherStyle = nullptr) co
nst = 0; | 258 virtual LayoutUnit marginAfter(const ComputedStyle* otherStyle = nullptr) co
nst = 0; |
| 259 virtual LayoutUnit marginStart(const ComputedStyle* otherStyle = nullptr) co
nst = 0; | 259 virtual LayoutUnit marginStart(const ComputedStyle* otherStyle = nullptr) co
nst = 0; |
| 260 virtual LayoutUnit marginEnd(const ComputedStyle* otherStyle = nullptr) cons
t = 0; | 260 virtual LayoutUnit marginEnd(const ComputedStyle* otherStyle = nullptr) cons
t = 0; |
| 261 virtual LayoutUnit marginOver() const = 0; | 261 virtual LayoutUnit marginOver() const = 0; |
| 262 virtual LayoutUnit marginUnder() const = 0; | 262 virtual LayoutUnit marginUnder() const = 0; |
| 263 LayoutUnit marginHeight() const { return marginTop() + marginBottom(); } | 263 DISABLE_CFI_PERF LayoutUnit marginHeight() const { return marginTop() + marg
inBottom(); } |
| 264 LayoutUnit marginWidth() const { return marginLeft() + marginRight(); } | 264 DISABLE_CFI_PERF LayoutUnit marginWidth() const { return marginLeft() + marg
inRight(); } |
| 265 LayoutUnit marginLogicalHeight() const { return marginBefore() + marginAfter
(); } | 265 DISABLE_CFI_PERF LayoutUnit marginLogicalHeight() const { return marginBefor
e() + marginAfter(); } |
| 266 LayoutUnit marginLogicalWidth() const { return marginStart() + marginEnd();
} | 266 DISABLE_CFI_PERF LayoutUnit marginLogicalWidth() const { return marginStart(
) + marginEnd(); } |
| 267 | 267 |
| 268 bool hasInlineDirectionBordersPaddingOrMargin() const { return hasInlineDire
ctionBordersOrPadding() || marginStart() || marginEnd(); } | 268 bool hasInlineDirectionBordersPaddingOrMargin() const { return hasInlineDire
ctionBordersOrPadding() || marginStart() || marginEnd(); } |
| 269 bool hasInlineDirectionBordersOrPadding() const { return borderStart() || bo
rderEnd() || paddingStart() || paddingEnd(); } | 269 bool hasInlineDirectionBordersOrPadding() const { return borderStart() || bo
rderEnd() || paddingStart() || paddingEnd(); } |
| 270 | 270 |
| 271 virtual LayoutUnit containingBlockLogicalWidthForContent() const; | 271 virtual LayoutUnit containingBlockLogicalWidthForContent() const; |
| 272 | 272 |
| 273 virtual void childBecameNonInline(LayoutObject* /*child*/) { } | 273 virtual void childBecameNonInline(LayoutObject* /*child*/) { } |
| 274 | 274 |
| 275 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
const InlineFlowBox* = nullptr) const; | 275 virtual bool boxShadowShouldBeAppliedToBackground(BackgroundBleedAvoidance,
const InlineFlowBox* = nullptr) const; |
| 276 | 276 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 std::unique_ptr<PaintLayer> m_layer; | 380 std::unique_ptr<PaintLayer> m_layer; |
| 381 | 381 |
| 382 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; | 382 std::unique_ptr<LayoutBoxModelObjectRareData> m_rareData; |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); | 385 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBoxModelObject, isBoxModelObject()); |
| 386 | 386 |
| 387 } // namespace blink | 387 } // namespace blink |
| 388 | 388 |
| 389 #endif // LayoutBoxModelObject_h | 389 #endif // LayoutBoxModelObject_h |
| OLD | NEW |