OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 public: | 66 public: |
67 LayoutFlowThread(); | 67 LayoutFlowThread(); |
68 ~LayoutFlowThread() override {} | 68 ~LayoutFlowThread() override {} |
69 | 69 |
70 bool isLayoutFlowThread() const final { return true; } | 70 bool isLayoutFlowThread() const final { return true; } |
71 virtual bool isLayoutMultiColumnFlowThread() const { return false; } | 71 virtual bool isLayoutMultiColumnFlowThread() const { return false; } |
72 virtual bool isLayoutPagedFlowThread() const { return false; } | 72 virtual bool isLayoutPagedFlowThread() const { return false; } |
73 | 73 |
74 // Search mode when looking for an enclosing fragmentation context. | 74 // Search mode when looking for an enclosing fragmentation context. |
75 enum AncestorSearchConstraint { | 75 enum AncestorSearchConstraint { |
76 // No constraints. Sometimes we just want to find all enclosing | 76 // No constraints. When we're not laying out (but rather e.g. painting or |
77 // fragmentation contexts, e.g. to calculate the accumulated visual | 77 // hit-testing), we just want to find all enclosing fragmentation contexts, |
78 // translation. | 78 // e.g. to calculate the accumulated visual translation. |
79 AnyAncestor, | 79 AnyAncestor, |
80 | 80 |
81 // Consider fragmentation contexts that are strictly unbreakable (seen from | 81 // Consider fragmentation contexts that are strictly unbreakable (seen from |
82 // the outside) to be isolated from the rest, so that such fragmentation | 82 // the outside) to be isolated from the rest, so that such fragmentation |
83 // contexts don't participate in fragmentation of enclosing fragmentation | 83 // contexts don't participate in fragmentation of enclosing fragmentation |
84 // contexts, apart from taking up space and otherwise being completely | 84 // contexts, apart from taking up space and otherwise being completely |
85 // unbreakable. This is typically what we want to do during layout. | 85 // unbreakable. This is typically what we want to do during layout. |
86 IsolateUnbreakableContainers, | 86 IsolateUnbreakableContainers, |
87 }; | 87 }; |
88 | 88 |
89 static LayoutFlowThread* locateFlowThreadContainingBlockOf( | 89 static LayoutFlowThread* locateFlowThreadContainingBlockOf( |
90 const LayoutObject&, | 90 const LayoutObject&, |
91 AncestorSearchConstraint = IsolateUnbreakableContainers); | 91 AncestorSearchConstraint); |
92 | 92 |
93 void layout() override; | 93 void layout() override; |
94 | 94 |
95 // Always create a Layer for the LayoutFlowThread so that we | 95 // Always create a Layer for the LayoutFlowThread so that we |
96 // can easily avoid drawing the children directly. | 96 // can easily avoid drawing the children directly. |
97 PaintLayerType layerTypeRequired() const final { return NormalPaintLayer; } | 97 PaintLayerType layerTypeRequired() const final { return NormalPaintLayer; } |
98 | 98 |
99 virtual void flowThreadDescendantWasInserted(LayoutObject*) {} | 99 virtual void flowThreadDescendantWasInserted(LayoutObject*) {} |
100 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) {} | 100 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) {} |
101 virtual void flowThreadDescendantStyleWillChange( | 101 virtual void flowThreadDescendantStyleWillChange( |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 struct ValueToString<LayoutMultiColumnSet*> { | 220 struct ValueToString<LayoutMultiColumnSet*> { |
221 static String toString(const LayoutMultiColumnSet* value) { | 221 static String toString(const LayoutMultiColumnSet* value) { |
222 return String::format("%p", value); | 222 return String::format("%p", value); |
223 } | 223 } |
224 }; | 224 }; |
225 #endif | 225 #endif |
226 | 226 |
227 } // namespace blink | 227 } // namespace blink |
228 | 228 |
229 #endif // LayoutFlowThread_h | 229 #endif // LayoutFlowThread_h |
OLD | NEW |