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. All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 using namespace HTMLNames; | 81 using namespace HTMLNames; |
82 | 82 |
83 struct SameSizeAsLayoutBlock : public LayoutBox { | 83 struct SameSizeAsLayoutBlock : public LayoutBox { |
84 LayoutObjectChildList children; | 84 LayoutObjectChildList children; |
85 LineBoxList lineBoxes; | 85 LineBoxList lineBoxes; |
86 uint32_t bitfields; | 86 uint32_t bitfields; |
87 }; | 87 }; |
88 | 88 |
89 static_assert(sizeof(LayoutBlock) == sizeof(SameSizeAsLayoutBlock), "LayoutBlock should stay small"); | 89 static_assert(sizeof(LayoutBlock) == sizeof(SameSizeAsLayoutBlock), "LayoutBlock should stay small"); |
90 | 90 |
91 // This map keeps track of the positioned objects associated with a containing b lock. | |
92 // | |
93 // This map is cleared at the beginning of layout and populated during layout. T he map | |
mstensho (USE GERRIT)
2015/08/31 12:00:45
It is populated during layout, but it's not cleare
Julien - ping for review
2015/08/31 18:08:30
Indeed, my bad for not checking thoroughly. I have
| |
94 // could be invalidated during style change but keeping track of containing bloc ks at | |
95 // that time is complicated (we are in the middle of recomputing the style so we can't | |
96 // rely on any of its information), which is why it's easier to just recompute i t for | |
97 // every layout. | |
91 static TrackedDescendantsMap* gPositionedDescendantsMap = nullptr; | 98 static TrackedDescendantsMap* gPositionedDescendantsMap = nullptr; |
99 | |
100 // This map keeps track of the descendants whose 'height' is percentage associat ed | |
101 // with a containing block. Like |gPositionedDescendantsMap|, it is also recompu ted | |
102 // for every layout (see the comment above about why). | |
92 static TrackedDescendantsMap* gPercentHeightDescendantsMap = nullptr; | 103 static TrackedDescendantsMap* gPercentHeightDescendantsMap = nullptr; |
93 | 104 |
94 static TrackedContainerMap* gPositionedContainerMap = nullptr; | 105 static TrackedContainerMap* gPositionedContainerMap = nullptr; |
95 static TrackedContainerMap* gPercentHeightContainerMap = nullptr; | 106 static TrackedContainerMap* gPercentHeightContainerMap = nullptr; |
96 | 107 |
97 typedef WTF::HashSet<LayoutBlock*> DelayedUpdateScrollInfoSet; | 108 typedef WTF::HashSet<LayoutBlock*> DelayedUpdateScrollInfoSet; |
98 static int gDelayUpdateScrollInfo = 0; | 109 static int gDelayUpdateScrollInfo = 0; |
99 static DelayedUpdateScrollInfoSet* gDelayedUpdateScrollInfoSet = nullptr; | 110 static DelayedUpdateScrollInfoSet* gDelayedUpdateScrollInfoSet = nullptr; |
100 | 111 |
101 LayoutBlock::LayoutBlock(ContainerNode* node) | 112 LayoutBlock::LayoutBlock(ContainerNode* node) |
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2914 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const | 2925 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const |
2915 { | 2926 { |
2916 showLayoutObject(); | 2927 showLayoutObject(); |
2917 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 2928 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) |
2918 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 2929 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); |
2919 } | 2930 } |
2920 | 2931 |
2921 #endif | 2932 #endif |
2922 | 2933 |
2923 } // namespace blink | 2934 } // namespace blink |
OLD | NEW |