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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
11 * | 11 * |
12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
16 * | 16 * |
17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
21 */ | 21 */ |
22 | 22 |
23 #ifndef LayoutBlock_h | 23 #ifndef LayoutBlock_h |
24 #define LayoutBlock_h | 24 #define LayoutBlock_h |
25 | 25 |
26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
27 #include "core/layout/LayoutBox.h" | 27 #include "core/layout/LayoutBox.h" |
28 #include "wtf/ListHashSet.h" | 28 #include "wtf/ListHashSet.h" |
29 #include <memory> | 29 #include "wtf/OwnPtr.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 struct PaintInfo; | 33 struct PaintInfo; |
34 class LineLayoutBox; | 34 class LineLayoutBox; |
35 class WordMeasurement; | 35 class WordMeasurement; |
36 | 36 |
37 typedef WTF::ListHashSet<LayoutBox*, 16> TrackedLayoutBoxListHashSet; | 37 typedef WTF::ListHashSet<LayoutBox*, 16> TrackedLayoutBoxListHashSet; |
38 typedef WTF::HashMap<const LayoutBlock*, std::unique_ptr<TrackedLayoutBoxListHas
hSet>> TrackedDescendantsMap; | 38 typedef WTF::HashMap<const LayoutBlock*, OwnPtr<TrackedLayoutBoxListHashSet>> Tr
ackedDescendantsMap; |
39 typedef WTF::HashMap<const LayoutBox*, LayoutBlock*> TrackedContainerMap; | 39 typedef WTF::HashMap<const LayoutBox*, LayoutBlock*> TrackedContainerMap; |
40 typedef Vector<WordMeasurement, 64> WordMeasurements; | 40 typedef Vector<WordMeasurement, 64> WordMeasurements; |
41 | 41 |
42 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; | 42 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; |
43 | 43 |
44 // LayoutBlock is the class that is used by any LayoutObject | 44 // LayoutBlock is the class that is used by any LayoutObject |
45 // that is a containing block. | 45 // that is a containing block. |
46 // http://www.w3.org/TR/CSS2/visuren.html#containing-block | 46 // http://www.w3.org/TR/CSS2/visuren.html#containing-block |
47 // See also LayoutObject::containingBlock() that is the function | 47 // See also LayoutObject::containingBlock() that is the function |
48 // used to get the containing block of a LayoutObject. | 48 // used to get the containing block of a LayoutObject. |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 // FIXME: This is temporary as we move code that accesses block flow | 413 // FIXME: This is temporary as we move code that accesses block flow |
414 // member variables out of LayoutBlock and into LayoutBlockFlow. | 414 // member variables out of LayoutBlock and into LayoutBlockFlow. |
415 friend class LayoutBlockFlow; | 415 friend class LayoutBlockFlow; |
416 }; | 416 }; |
417 | 417 |
418 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); | 418 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); |
419 | 419 |
420 } // namespace blink | 420 } // namespace blink |
421 | 421 |
422 #endif // LayoutBlock_h | 422 #endif // LayoutBlock_h |
OLD | NEW |