Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFlowThread.h

Issue 2748973002: Strictly unbreakable objects need to prevent interaction with the outside. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // LayoutMultiColumnSet will actually be a viewPort of the LayoutFlowThread. 64 // LayoutMultiColumnSet will actually be a viewPort of the LayoutFlowThread.
65 class CORE_EXPORT LayoutFlowThread : public LayoutBlockFlow { 65 class CORE_EXPORT LayoutFlowThread : public LayoutBlockFlow {
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.
75 enum AncestorSearchConstraint {
76 // No constraints. Sometimes we just want to find all enclosing
77 // fragmentation contexts, e.g. to calculate the accumulated visual
78 // translation.
79 AnyAncestor,
80
81 // Consider fragmentation contexts that are strictly unbreakable (seen from
82 // the outside) to be isolated from the rest, so that such fragmentation
83 // contexts don't participate in fragmentation of enclosing fragmentation
84 // contexts, apart from taking up space and otherwise being completely
85 // unbreakable. This is typically what we want to do during layout.
86 IsolateUnbreakableContainers,
87 };
88
74 static LayoutFlowThread* locateFlowThreadContainingBlockOf( 89 static LayoutFlowThread* locateFlowThreadContainingBlockOf(
75 const LayoutObject&); 90 const LayoutObject&,
91 AncestorSearchConstraint = IsolateUnbreakableContainers);
76 92
77 void layout() override; 93 void layout() override;
78 94
79 // Always create a Layer for the LayoutFlowThread so that we 95 // Always create a Layer for the LayoutFlowThread so that we
80 // can easily avoid drawing the children directly. 96 // can easily avoid drawing the children directly.
81 PaintLayerType layerTypeRequired() const final { return NormalPaintLayer; } 97 PaintLayerType layerTypeRequired() const final { return NormalPaintLayer; }
82 98
83 virtual void flowThreadDescendantWasInserted(LayoutObject*) {} 99 virtual void flowThreadDescendantWasInserted(LayoutObject*) {}
84 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) {} 100 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) {}
85 virtual void flowThreadDescendantStyleWillChange( 101 virtual void flowThreadDescendantStyleWillChange(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 struct ValueToString<LayoutMultiColumnSet*> { 220 struct ValueToString<LayoutMultiColumnSet*> {
205 static String toString(const LayoutMultiColumnSet* value) { 221 static String toString(const LayoutMultiColumnSet* value) {
206 return String::format("%p", value); 222 return String::format("%p", value);
207 } 223 }
208 }; 224 };
209 #endif 225 #endif
210 226
211 } // namespace blink 227 } // namespace blink
212 228
213 #endif // LayoutFlowThread_h 229 #endif // LayoutFlowThread_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698