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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1168 if (m_rareData) | 1168 if (m_rareData) |
1169 m_rareData->m_overrideLogicalContentHeight = LayoutUnit(-1); | 1169 m_rareData->m_overrideLogicalContentHeight = LayoutUnit(-1); |
1170 } | 1170 } |
1171 | 1171 |
1172 void LayoutBox::clearOverrideLogicalContentWidth() | 1172 void LayoutBox::clearOverrideLogicalContentWidth() |
1173 { | 1173 { |
1174 if (m_rareData) | 1174 if (m_rareData) |
1175 m_rareData->m_overrideLogicalContentWidth = LayoutUnit(-1); | 1175 m_rareData->m_overrideLogicalContentWidth = LayoutUnit(-1); |
1176 } | 1176 } |
1177 | 1177 |
1178 bool LayoutBox::hasOverrideSize() | |
1179 { | |
1180 return hasOverrideLogicalContentWidth() || hasOverrideLogicalContentHeight() ; | |
1181 } | |
1182 | |
1178 void LayoutBox::clearOverrideSize() | 1183 void LayoutBox::clearOverrideSize() |
1179 { | 1184 { |
1180 clearOverrideLogicalContentHeight(); | 1185 clearOverrideLogicalContentHeight(); |
1181 clearOverrideLogicalContentWidth(); | 1186 clearOverrideLogicalContentWidth(); |
1182 } | 1187 } |
1183 | 1188 |
1184 LayoutUnit LayoutBox::overrideLogicalContentWidth() const | 1189 LayoutUnit LayoutBox::overrideLogicalContentWidth() const |
1185 { | 1190 { |
1186 ASSERT(hasOverrideLogicalContentWidth()); | 1191 ASSERT(hasOverrideLogicalContentWidth()); |
1187 return m_rareData->m_overrideLogicalContentWidth; | 1192 return m_rareData->m_overrideLogicalContentWidth; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1228 } | 1233 } |
1229 | 1234 |
1230 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. | 1235 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. |
1231 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica lHeight) | 1236 void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica lHeight) |
1232 { | 1237 { |
1233 DCHECK_GE(logicalHeight, LayoutUnit(-1)); | 1238 DCHECK_GE(logicalHeight, LayoutUnit(-1)); |
1234 ensureRareData().m_overrideContainingBlockContentLogicalHeight = logicalHeig ht; | 1239 ensureRareData().m_overrideContainingBlockContentLogicalHeight = logicalHeig ht; |
1235 ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight = true; | 1240 ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight = true; |
1236 } | 1241 } |
1237 | 1242 |
1238 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. | 1243 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. |
cbiesinger
2016/09/26 11:48:33
I don't think this new function needs that comment
jfernandez
2016/09/26 13:38:02
Acknowledged.
| |
1244 bool LayoutBox::hasContainingBlockOverrideSize() | |
1245 { | |
1246 if (!m_rareData) | |
1247 return false; | |
1248 return ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth || e nsureRareData().m_hasOverrideContainingBlockContentLogicalHeight; | |
1249 } | |
1250 | |
1251 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. | |
1239 void LayoutBox::clearContainingBlockOverrideSize() | 1252 void LayoutBox::clearContainingBlockOverrideSize() |
1240 { | 1253 { |
1241 if (!m_rareData) | 1254 if (!m_rareData) |
1242 return; | 1255 return; |
1243 ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth = false; | 1256 ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth = false; |
1244 ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight = false; | 1257 ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight = false; |
1245 } | 1258 } |
1246 | 1259 |
1247 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. | 1260 // TODO (lajava) Shouldn't we implement these functions based on physical direct ion ?. |
1248 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() | 1261 void LayoutBox::clearOverrideContainingBlockContentLogicalHeight() |
(...skipping 3625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4874 LayoutRect rect = frameRect(); | 4887 LayoutRect rect = frameRect(); |
4875 | 4888 |
4876 LayoutBlock* block = containingBlock(); | 4889 LayoutBlock* block = containingBlock(); |
4877 if (block) | 4890 if (block) |
4878 block->adjustChildDebugRect(rect); | 4891 block->adjustChildDebugRect(rect); |
4879 | 4892 |
4880 return rect; | 4893 return rect; |
4881 } | 4894 } |
4882 | 4895 |
4883 } // namespace blink | 4896 } // namespace blink |
OLD | NEW |