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 populated during layout. It is kept across layouts to handle sub- tree | |
94 // layouts. The map could be invalidated during style change but keeping track o f | |
mstensho (USE GERRIT)
2015/08/31 19:28:52
You mean "handle that we skip unchanged subtrees d
Julien - ping for review
2015/08/31 21:55:29
Me gusta! Changed for your less hand-wavy explanat
| |
95 // containing blocks at that time is complicated (we are in the middle of | |
96 // recomputing the style so we can't rely on any of its information), which is w hy | |
97 // it's easier to just update it for 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 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2906 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const | 2917 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const |
2907 { | 2918 { |
2908 showLayoutObject(); | 2919 showLayoutObject(); |
2909 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 2920 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) |
2910 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 2921 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); |
2911 } | 2922 } |
2912 | 2923 |
2913 #endif | 2924 #endif |
2914 | 2925 |
2915 } // namespace blink | 2926 } // namespace blink |
OLD | NEW |