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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 ASSERT(hasOverrideLogicalContentWidth()); | 1085 ASSERT(hasOverrideLogicalContentWidth()); |
1086 return m_rareData->m_overrideLogicalContentWidth; | 1086 return m_rareData->m_overrideLogicalContentWidth; |
1087 } | 1087 } |
1088 | 1088 |
1089 LayoutUnit LayoutBox::overrideLogicalContentHeight() const | 1089 LayoutUnit LayoutBox::overrideLogicalContentHeight() const |
1090 { | 1090 { |
1091 ASSERT(hasOverrideLogicalContentHeight()); | 1091 ASSERT(hasOverrideLogicalContentHeight()); |
1092 return m_rareData->m_overrideLogicalContentHeight; | 1092 return m_rareData->m_overrideLogicalContentHeight; |
1093 } | 1093 } |
1094 | 1094 |
| 1095 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1095 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalWidth() const | 1096 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalWidth() const |
1096 { | 1097 { |
1097 ASSERT(hasOverrideContainingBlockLogicalWidth()); | 1098 ASSERT(hasOverrideContainingBlockLogicalWidth()); |
1098 return gOverrideContainingBlockLogicalWidthMap->get(this); | 1099 return gOverrideContainingBlockLogicalWidthMap->get(this); |
1099 } | 1100 } |
1100 | 1101 |
| 1102 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1101 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalHeight() const | 1103 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalHeight() const |
1102 { | 1104 { |
1103 ASSERT(hasOverrideContainingBlockLogicalHeight()); | 1105 ASSERT(hasOverrideContainingBlockLogicalHeight()); |
1104 return gOverrideContainingBlockLogicalHeightMap->get(this); | 1106 return gOverrideContainingBlockLogicalHeightMap->get(this); |
1105 } | 1107 } |
1106 | 1108 |
| 1109 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1107 bool LayoutBox::hasOverrideContainingBlockLogicalWidth() const | 1110 bool LayoutBox::hasOverrideContainingBlockLogicalWidth() const |
1108 { | 1111 { |
1109 return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLo
gicalWidthMap->contains(this); | 1112 return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLo
gicalWidthMap->contains(this); |
1110 } | 1113 } |
1111 | 1114 |
| 1115 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1112 bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const | 1116 bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const |
1113 { | 1117 { |
1114 return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockL
ogicalHeightMap->contains(this); | 1118 return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockL
ogicalHeightMap->contains(this); |
1115 } | 1119 } |
1116 | 1120 |
| 1121 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1117 void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical
Width) | 1122 void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical
Width) |
1118 { | 1123 { |
1119 if (!gOverrideContainingBlockLogicalWidthMap) | 1124 if (!gOverrideContainingBlockLogicalWidthMap) |
1120 gOverrideContainingBlockLogicalWidthMap = new OverrideSizeMap; | 1125 gOverrideContainingBlockLogicalWidthMap = new OverrideSizeMap; |
1121 gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth); | 1126 gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth); |
1122 } | 1127 } |
1123 | 1128 |
| 1129 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1124 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica
lHeight) | 1130 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica
lHeight) |
1125 { | 1131 { |
1126 if (!gOverrideContainingBlockLogicalHeightMap) | 1132 if (!gOverrideContainingBlockLogicalHeightMap) |
1127 gOverrideContainingBlockLogicalHeightMap = new OverrideSizeMap; | 1133 gOverrideContainingBlockLogicalHeightMap = new OverrideSizeMap; |
1128 gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight); | 1134 gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight); |
1129 } | 1135 } |
1130 | 1136 |
| 1137 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1131 void LayoutBox::clearContainingBlockOverrideSize() | 1138 void LayoutBox::clearContainingBlockOverrideSize() |
1132 { | 1139 { |
1133 if (gOverrideContainingBlockLogicalWidthMap) | 1140 if (gOverrideContainingBlockLogicalWidthMap) |
1134 gOverrideContainingBlockLogicalWidthMap->remove(this); | 1141 gOverrideContainingBlockLogicalWidthMap->remove(this); |
1135 clearOverrideContainingBlockContentLogicalHeight(); | 1142 clearOverrideContainingBlockContentLogicalHeight(); |
1136 } | 1143 } |
1137 | 1144 |
| 1145 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1138 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() | 1146 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() |
1139 { | 1147 { |
1140 if (gOverrideContainingBlockLogicalHeightMap) | 1148 if (gOverrideContainingBlockLogicalHeightMap) |
1141 gOverrideContainingBlockLogicalHeightMap->remove(this); | 1149 gOverrideContainingBlockLogicalHeightMap->remove(this); |
1142 } | 1150 } |
1143 | 1151 |
| 1152 LayoutUnit LayoutBox::overrideContainingBlockContentWidth() const |
| 1153 { |
| 1154 return containingBlock()->isHorizontalWritingMode() ? overrideContainingBloc
kContentLogicalWidth() : overrideContainingBlockContentLogicalHeight(); |
| 1155 } |
| 1156 |
| 1157 LayoutUnit LayoutBox::overrideContainingBlockContentHeight() const |
| 1158 { |
| 1159 return containingBlock()->isHorizontalWritingMode() ? overrideContainingBloc
kContentLogicalHeight() : overrideContainingBlockContentLogicalWidth(); |
| 1160 } |
| 1161 |
| 1162 bool LayoutBox::hasOverrideContainingBlockWidth() const |
| 1163 { |
| 1164 return containingBlock()->isHorizontalWritingMode() ? hasOverrideContainingB
lockLogicalWidth() : hasOverrideContainingBlockLogicalHeight(); |
| 1165 } |
| 1166 |
| 1167 bool LayoutBox::hasOverrideContainingBlockHeight() const |
| 1168 { |
| 1169 return containingBlock()->isHorizontalWritingMode() ? hasOverrideContainingB
lockLogicalHeight() : hasOverrideContainingBlockLogicalWidth(); |
| 1170 } |
| 1171 |
1144 LayoutUnit LayoutBox::extraInlineOffset() const | 1172 LayoutUnit LayoutBox::extraInlineOffset() const |
1145 { | 1173 { |
1146 return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit
(); | 1174 return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit
(); |
1147 } | 1175 } |
1148 | 1176 |
1149 LayoutUnit LayoutBox::extraBlockOffset() const | 1177 LayoutUnit LayoutBox::extraBlockOffset() const |
1150 { | 1178 { |
1151 return gExtraBlockOffsetMap ? gExtraBlockOffsetMap->get(this) : LayoutUnit()
; | 1179 return gExtraBlockOffsetMap ? gExtraBlockOffsetMap->get(this) : LayoutUnit()
; |
1152 } | 1180 } |
1153 | 1181 |
(...skipping 3772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4926 m_rareData->m_snapAreas->remove(&snapArea); | 4954 m_rareData->m_snapAreas->remove(&snapArea); |
4927 } | 4955 } |
4928 } | 4956 } |
4929 | 4957 |
4930 SnapAreaSet* LayoutBox::snapAreas() const | 4958 SnapAreaSet* LayoutBox::snapAreas() const |
4931 { | 4959 { |
4932 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4960 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4933 } | 4961 } |
4934 | 4962 |
4935 } // namespace blink | 4963 } // namespace blink |
OLD | NEW |