| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 gPositionedContainerMap->set(o, this); | 997 gPositionedContainerMap->set(o, this); |
| 998 | 998 |
| 999 if (!gPositionedDescendantsMap) | 999 if (!gPositionedDescendantsMap) |
| 1000 gPositionedDescendantsMap = new TrackedDescendantsMap; | 1000 gPositionedDescendantsMap = new TrackedDescendantsMap; |
| 1001 TrackedLayoutBoxListHashSet* descendantSet = | 1001 TrackedLayoutBoxListHashSet* descendantSet = |
| 1002 gPositionedDescendantsMap->at(this); | 1002 gPositionedDescendantsMap->at(this); |
| 1003 if (!descendantSet) { | 1003 if (!descendantSet) { |
| 1004 descendantSet = new TrackedLayoutBoxListHashSet; | 1004 descendantSet = new TrackedLayoutBoxListHashSet; |
| 1005 gPositionedDescendantsMap->set(this, WTF::wrapUnique(descendantSet)); | 1005 gPositionedDescendantsMap->set(this, WTF::wrapUnique(descendantSet)); |
| 1006 } | 1006 } |
| 1007 descendantSet->add(o); | 1007 descendantSet->insert(o); |
| 1008 | 1008 |
| 1009 m_hasPositionedObjects = true; | 1009 m_hasPositionedObjects = true; |
| 1010 } | 1010 } |
| 1011 | 1011 |
| 1012 void LayoutBlock::removePositionedObject(LayoutBox* o) { | 1012 void LayoutBlock::removePositionedObject(LayoutBox* o) { |
| 1013 if (!gPositionedContainerMap) | 1013 if (!gPositionedContainerMap) |
| 1014 return; | 1014 return; |
| 1015 | 1015 |
| 1016 LayoutBlock* container = gPositionedContainerMap->take(o); | 1016 LayoutBlock* container = gPositionedContainerMap->take(o); |
| 1017 if (!container) | 1017 if (!container) |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 descendant->setPercentHeightContainer(this); | 1106 descendant->setPercentHeightContainer(this); |
| 1107 | 1107 |
| 1108 if (!gPercentHeightDescendantsMap) | 1108 if (!gPercentHeightDescendantsMap) |
| 1109 gPercentHeightDescendantsMap = new TrackedDescendantsMap; | 1109 gPercentHeightDescendantsMap = new TrackedDescendantsMap; |
| 1110 TrackedLayoutBoxListHashSet* descendantSet = | 1110 TrackedLayoutBoxListHashSet* descendantSet = |
| 1111 gPercentHeightDescendantsMap->at(this); | 1111 gPercentHeightDescendantsMap->at(this); |
| 1112 if (!descendantSet) { | 1112 if (!descendantSet) { |
| 1113 descendantSet = new TrackedLayoutBoxListHashSet; | 1113 descendantSet = new TrackedLayoutBoxListHashSet; |
| 1114 gPercentHeightDescendantsMap->set(this, WTF::wrapUnique(descendantSet)); | 1114 gPercentHeightDescendantsMap->set(this, WTF::wrapUnique(descendantSet)); |
| 1115 } | 1115 } |
| 1116 descendantSet->add(descendant); | 1116 descendantSet->insert(descendant); |
| 1117 | 1117 |
| 1118 m_hasPercentHeightDescendants = true; | 1118 m_hasPercentHeightDescendants = true; |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 void LayoutBlock::removePercentHeightDescendant(LayoutBox* descendant) { | 1121 void LayoutBlock::removePercentHeightDescendant(LayoutBox* descendant) { |
| 1122 if (TrackedLayoutBoxListHashSet* descendants = percentHeightDescendants()) { | 1122 if (TrackedLayoutBoxListHashSet* descendants = percentHeightDescendants()) { |
| 1123 descendants->remove(descendant); | 1123 descendants->remove(descendant); |
| 1124 descendant->setPercentHeightContainer(nullptr); | 1124 descendant->setPercentHeightContainer(nullptr); |
| 1125 if (descendants->isEmpty()) { | 1125 if (descendants->isEmpty()) { |
| 1126 gPercentHeightDescendantsMap->erase(this); | 1126 gPercentHeightDescendantsMap->erase(this); |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2217 } | 2217 } |
| 2218 | 2218 |
| 2219 return availableHeight; | 2219 return availableHeight; |
| 2220 } | 2220 } |
| 2221 | 2221 |
| 2222 bool LayoutBlock::hasDefiniteLogicalHeight() const { | 2222 bool LayoutBlock::hasDefiniteLogicalHeight() const { |
| 2223 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); | 2223 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); |
| 2224 } | 2224 } |
| 2225 | 2225 |
| 2226 } // namespace blink | 2226 } // namespace blink |
| OLD | NEW |