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 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 | 899 |
900 void RenderBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layou
tUnit& maxLogicalWidth) const | 900 void RenderBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layou
tUnit& maxLogicalWidth) const |
901 { | 901 { |
902 minLogicalWidth = minPreferredLogicalWidth() - borderAndPaddingLogicalWidth(
); | 902 minLogicalWidth = minPreferredLogicalWidth() - borderAndPaddingLogicalWidth(
); |
903 maxLogicalWidth = maxPreferredLogicalWidth() - borderAndPaddingLogicalWidth(
); | 903 maxLogicalWidth = maxPreferredLogicalWidth() - borderAndPaddingLogicalWidth(
); |
904 } | 904 } |
905 | 905 |
906 LayoutUnit RenderBox::minPreferredLogicalWidth() const | 906 LayoutUnit RenderBox::minPreferredLogicalWidth() const |
907 { | 907 { |
908 if (preferredLogicalWidthsDirty()) { | 908 if (preferredLogicalWidthsDirty()) { |
909 #ifndef NDEBUG | 909 #if ENABLE(ASSERT) |
910 SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox&
>(*this)); | 910 SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox&
>(*this)); |
911 #endif | 911 #endif |
912 const_cast<RenderBox*>(this)->computePreferredLogicalWidths(); | 912 const_cast<RenderBox*>(this)->computePreferredLogicalWidths(); |
913 } | 913 } |
914 | 914 |
915 return m_minPreferredLogicalWidth; | 915 return m_minPreferredLogicalWidth; |
916 } | 916 } |
917 | 917 |
918 LayoutUnit RenderBox::maxPreferredLogicalWidth() const | 918 LayoutUnit RenderBox::maxPreferredLogicalWidth() const |
919 { | 919 { |
920 if (preferredLogicalWidthsDirty()) { | 920 if (preferredLogicalWidthsDirty()) { |
921 #ifndef NDEBUG | 921 #if ENABLE(ASSERT) |
922 SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox&
>(*this)); | 922 SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox&
>(*this)); |
923 #endif | 923 #endif |
924 const_cast<RenderBox*>(this)->computePreferredLogicalWidths(); | 924 const_cast<RenderBox*>(this)->computePreferredLogicalWidths(); |
925 } | 925 } |
926 | 926 |
927 return m_maxPreferredLogicalWidth; | 927 return m_maxPreferredLogicalWidth; |
928 } | 928 } |
929 | 929 |
930 bool RenderBox::hasOverrideHeight() const | 930 bool RenderBox::hasOverrideHeight() const |
931 { | 931 { |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 computeLogicalWidth(computedValues); | 2072 computeLogicalWidth(computedValues); |
2073 | 2073 |
2074 setLogicalWidth(computedValues.m_extent); | 2074 setLogicalWidth(computedValues.m_extent); |
2075 setLogicalLeft(computedValues.m_position); | 2075 setLogicalLeft(computedValues.m_position); |
2076 setMarginStart(computedValues.m_margins.m_start); | 2076 setMarginStart(computedValues.m_margins.m_start); |
2077 setMarginEnd(computedValues.m_margins.m_end); | 2077 setMarginEnd(computedValues.m_margins.m_end); |
2078 } | 2078 } |
2079 | 2079 |
2080 static float getMaxWidthListMarker(const RenderBox* renderer) | 2080 static float getMaxWidthListMarker(const RenderBox* renderer) |
2081 { | 2081 { |
2082 #ifndef NDEBUG | 2082 #if ENABLE(ASSERT) |
2083 ASSERT(renderer); | 2083 ASSERT(renderer); |
2084 Node* parentNode = renderer->generatingNode(); | 2084 Node* parentNode = renderer->generatingNode(); |
2085 ASSERT(parentNode); | 2085 ASSERT(parentNode); |
2086 ASSERT(isHTMLOListElement(parentNode) || isHTMLUListElement(parentNode)); | 2086 ASSERT(isHTMLOListElement(parentNode) || isHTMLUListElement(parentNode)); |
2087 ASSERT(renderer->style()->textAutosizingMultiplier() != 1); | 2087 ASSERT(renderer->style()->textAutosizingMultiplier() != 1); |
2088 #endif | 2088 #endif |
2089 float maxWidth = 0; | 2089 float maxWidth = 0; |
2090 for (RenderObject* child = renderer->slowFirstChild(); child; child = child-
>nextSibling()) { | 2090 for (RenderObject* child = renderer->slowFirstChild(); child; child = child-
>nextSibling()) { |
2091 if (!child->isListItem()) | 2091 if (!child->isListItem()) |
2092 continue; | 2092 continue; |
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4667 | 4667 |
4668 // We need the old border box size only when the box has background or b
ox decorations. | 4668 // We need the old border box size only when the box has background or b
ox decorations. |
4669 if (!style()->hasBackground() && !style()->hasBoxDecorations()) | 4669 if (!style()->hasBackground() && !style()->hasBoxDecorations()) |
4670 return; | 4670 return; |
4671 } | 4671 } |
4672 | 4672 |
4673 ensureRareData().m_previousBorderBoxSize = size(); | 4673 ensureRareData().m_previousBorderBoxSize = size(); |
4674 } | 4674 } |
4675 | 4675 |
4676 } // namespace WebCore | 4676 } // namespace WebCore |
OLD | NEW |