OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 return m_gridItemsOverflowingGridArea; | 83 return m_gridItemsOverflowingGridArea; |
84 } | 84 } |
85 | 85 |
86 int paintIndexForGridItem(const LayoutBox* layoutBox) | 86 int paintIndexForGridItem(const LayoutBox* layoutBox) |
87 { | 87 { |
88 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); | 88 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); |
89 return m_gridItemsIndexesMap.get(layoutBox); | 89 return m_gridItemsIndexesMap.get(layoutBox); |
90 } | 90 } |
91 | 91 |
92 private: | 92 private: |
93 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); | |
94 | |
95 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); } | 93 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutGrid || LayoutBlock::isOfType(type); } |
96 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; | 94 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; |
97 virtual void computePreferredLogicalWidths() override; | 95 virtual void computePreferredLogicalWidths() override; |
98 | 96 |
99 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = nu
llptr) override; | 97 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = nu
llptr) override; |
100 virtual void removeChild(LayoutObject*) override; | 98 virtual void removeChild(LayoutObject*) override; |
101 | 99 |
102 virtual void styleDidChange(StyleDifference, const ComputedStyle*) override; | 100 virtual void styleDidChange(StyleDifference, const ComputedStyle*) override; |
103 | 101 |
104 bool explicitGridDidResize(const ComputedStyle&) const; | 102 bool explicitGridDidResize(const ComputedStyle&) const; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 OrderIterator m_orderIterator; | 191 OrderIterator m_orderIterator; |
194 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; | 192 Vector<LayoutBox*> m_gridItemsOverflowingGridArea; |
195 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; | 193 HashMap<const LayoutBox*, size_t> m_gridItemsIndexesMap; |
196 }; | 194 }; |
197 | 195 |
198 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 196 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
199 | 197 |
200 } // namespace blink | 198 } // namespace blink |
201 | 199 |
202 #endif // LayoutGrid_h | 200 #endif // LayoutGrid_h |
OLD | NEW |