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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1096 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalWidth() const | 1096 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalWidth() const |
1097 { | 1097 { |
1098 ASSERT(hasOverrideContainingBlockLogicalWidth()); | 1098 ASSERT(hasOverrideContainingBlockLogicalWidth()); |
1099 return gOverrideContainingBlockLogicalWidthMap->get(this); | 1099 return gOverrideContainingBlockLogicalWidthMap->get(this); |
1100 } | 1100 } |
1101 | 1101 |
1102 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1102 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1103 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalHeight() const | 1103 LayoutUnit LayoutBox::overrideContainingBlockContentLogicalHeight() const |
1104 { | 1104 { |
1105 ASSERT(hasOverrideContainingBlockLogicalHeight()); | 1105 ASSERT(hasOverrideContainingBlockLogicalHeight()); |
1106 return gOverrideContainingBlockLogicalHeightMap->get(this); | 1106 return gOverrideContainingBlockLogicalHeightMap->get(this); |
1107 } | 1107 } |
1108 | 1108 |
1109 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1109 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1110 bool LayoutBox::hasOverrideContainingBlockLogicalWidth() const | 1110 bool LayoutBox::hasOverrideContainingBlockLogicalWidth() const |
1111 { | 1111 { |
1112 return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLo
gicalWidthMap->contains(this); | 1112 return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLo
gicalWidthMap->contains(this); |
1113 } | 1113 } |
1114 | 1114 |
1115 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1115 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1116 bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const | 1116 bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const |
1117 { | 1117 { |
1118 return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockL
ogicalHeightMap->contains(this); | 1118 return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockL
ogicalHeightMap->contains(this); |
1119 } | 1119 } |
1120 | 1120 |
1121 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1121 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1122 void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical
Width) | 1122 void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical
Width) |
1123 { | 1123 { |
1124 if (!gOverrideContainingBlockLogicalWidthMap) | 1124 if (!gOverrideContainingBlockLogicalWidthMap) |
1125 gOverrideContainingBlockLogicalWidthMap = new OverrideSizeMap; | 1125 gOverrideContainingBlockLogicalWidthMap = new OverrideSizeMap; |
1126 gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth); | 1126 gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth); |
1127 } | 1127 } |
1128 | 1128 |
1129 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1129 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1130 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica
lHeight) | 1130 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica
lHeight) |
1131 { | 1131 { |
1132 if (!gOverrideContainingBlockLogicalHeightMap) | 1132 if (!gOverrideContainingBlockLogicalHeightMap) |
1133 gOverrideContainingBlockLogicalHeightMap = new OverrideSizeMap; | 1133 gOverrideContainingBlockLogicalHeightMap = new OverrideSizeMap; |
1134 gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight); | 1134 gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight); |
1135 } | 1135 } |
1136 | 1136 |
1137 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1137 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1138 void LayoutBox::clearContainingBlockOverrideSize() | 1138 void LayoutBox::clearContainingBlockOverrideSize() |
1139 { | 1139 { |
1140 if (gOverrideContainingBlockLogicalWidthMap) | 1140 if (gOverrideContainingBlockLogicalWidthMap) |
1141 gOverrideContainingBlockLogicalWidthMap->remove(this); | 1141 gOverrideContainingBlockLogicalWidthMap->remove(this); |
1142 clearOverrideContainingBlockContentLogicalHeight(); | 1142 clearOverrideContainingBlockContentLogicalHeight(); |
1143 } | 1143 } |
1144 | 1144 |
1145 // TODO (lajava) Shouldn't we implement these functions based on physical direct
ion ?. | 1145 // TODO (lajava) Now that we have implemented these functions based on physical
direction, we'd rather remove the logical ones. |
1146 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() | 1146 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() |
1147 { | 1147 { |
1148 if (gOverrideContainingBlockLogicalHeightMap) | 1148 if (gOverrideContainingBlockLogicalHeightMap) |
1149 gOverrideContainingBlockLogicalHeightMap->remove(this); | 1149 gOverrideContainingBlockLogicalHeightMap->remove(this); |
1150 } | 1150 } |
1151 | 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 |
1152 LayoutUnit LayoutBox::extraInlineOffset() const | 1172 LayoutUnit LayoutBox::extraInlineOffset() const |
1153 { | 1173 { |
1154 return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit
(); | 1174 return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit
(); |
1155 } | 1175 } |
1156 | 1176 |
1157 LayoutUnit LayoutBox::extraBlockOffset() const | 1177 LayoutUnit LayoutBox::extraBlockOffset() const |
1158 { | 1178 { |
1159 return gExtraBlockOffsetMap ? gExtraBlockOffsetMap->get(this) : LayoutUnit()
; | 1179 return gExtraBlockOffsetMap ? gExtraBlockOffsetMap->get(this) : LayoutUnit()
; |
1160 } | 1180 } |
1161 | 1181 |
(...skipping 3790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4952 m_rareData->m_snapAreas->remove(&snapArea); | 4972 m_rareData->m_snapAreas->remove(&snapArea); |
4953 } | 4973 } |
4954 } | 4974 } |
4955 | 4975 |
4956 SnapAreaSet* LayoutBox::snapAreas() const | 4976 SnapAreaSet* LayoutBox::snapAreas() const |
4957 { | 4977 { |
4958 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4978 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
4959 } | 4979 } |
4960 | 4980 |
4961 } // namespace blink | 4981 } // namespace blink |
OLD | NEW |