| 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 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 | 1662 |
| 1663 inline LayoutBox* LayoutBox::firstChildBox() const { | 1663 inline LayoutBox* LayoutBox::firstChildBox() const { |
| 1664 return toLayoutBox(slowFirstChild()); | 1664 return toLayoutBox(slowFirstChild()); |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 inline LayoutBox* LayoutBox::lastChildBox() const { | 1667 inline LayoutBox* LayoutBox::lastChildBox() const { |
| 1668 return toLayoutBox(slowLastChild()); | 1668 return toLayoutBox(slowLastChild()); |
| 1669 } | 1669 } |
| 1670 | 1670 |
| 1671 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const { | 1671 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const { |
| 1672 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 1672 DCHECK(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
| 1673 LayoutBox* previousBox = previousSiblingBox(); | 1673 LayoutBox* previousBox = previousSiblingBox(); |
| 1674 if (previousBox->isLayoutFlowThread()) | 1674 if (previousBox->isLayoutFlowThread()) |
| 1675 return nullptr; | 1675 return nullptr; |
| 1676 return previousBox; | 1676 return previousBox; |
| 1677 } | 1677 } |
| 1678 | 1678 |
| 1679 inline LayoutBox* LayoutBox::nextSiblingMultiColumnBox() const { | 1679 inline LayoutBox* LayoutBox::nextSiblingMultiColumnBox() const { |
| 1680 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 1680 DCHECK(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
| 1681 return nextSiblingBox(); | 1681 return nextSiblingBox(); |
| 1682 } | 1682 } |
| 1683 | 1683 |
| 1684 inline void LayoutBox::setInlineBoxWrapper(InlineBox* boxWrapper) { | 1684 inline void LayoutBox::setInlineBoxWrapper(InlineBox* boxWrapper) { |
| 1685 if (boxWrapper) { | 1685 if (boxWrapper) { |
| 1686 ASSERT(!m_inlineBoxWrapper); | 1686 DCHECK(!m_inlineBoxWrapper); |
| 1687 // m_inlineBoxWrapper should already be nullptr. Deleting it is a safeguard | 1687 // m_inlineBoxWrapper should already be nullptr. Deleting it is a safeguard |
| 1688 // against security issues. Otherwise, there will two line box wrappers | 1688 // against security issues. Otherwise, there will two line box wrappers |
| 1689 // keeping the reference to this layoutObject, and only one will be notified | 1689 // keeping the reference to this layoutObject, and only one will be notified |
| 1690 // when the layoutObject is getting destroyed. The second line box wrapper | 1690 // when the layoutObject is getting destroyed. The second line box wrapper |
| 1691 // will keep a stale reference. | 1691 // will keep a stale reference. |
| 1692 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) | 1692 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) |
| 1693 deleteLineBoxWrapper(); | 1693 deleteLineBoxWrapper(); |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 m_inlineBoxWrapper = boxWrapper; | 1696 m_inlineBoxWrapper = boxWrapper; |
| 1697 } | 1697 } |
| 1698 | 1698 |
| 1699 inline bool LayoutBox::isForcedFragmentainerBreakValue( | 1699 inline bool LayoutBox::isForcedFragmentainerBreakValue( |
| 1700 EBreakBetween breakValue) { | 1700 EBreakBetween breakValue) { |
| 1701 return breakValue == EBreakBetween::kColumn || | 1701 return breakValue == EBreakBetween::kColumn || |
| 1702 breakValue == EBreakBetween::kLeft || | 1702 breakValue == EBreakBetween::kLeft || |
| 1703 breakValue == EBreakBetween::kPage || | 1703 breakValue == EBreakBetween::kPage || |
| 1704 breakValue == EBreakBetween::kRecto || | 1704 breakValue == EBreakBetween::kRecto || |
| 1705 breakValue == EBreakBetween::kRight || | 1705 breakValue == EBreakBetween::kRight || |
| 1706 breakValue == EBreakBetween::kVerso; | 1706 breakValue == EBreakBetween::kVerso; |
| 1707 } | 1707 } |
| 1708 | 1708 |
| 1709 } // namespace blink | 1709 } // namespace blink |
| 1710 | 1710 |
| 1711 #endif // LayoutBox_h | 1711 #endif // LayoutBox_h |
| OLD | NEW |