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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h

Issue 2729903003: Isolate strictly unbreakable multicol containers that are nested. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
index 8264eb4944e68bce1e292071b88e67b17e350c02..91fb0d701095c9232c04cb2d6a73b1d25d17f229 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
@@ -260,10 +260,25 @@ class CORE_EXPORT LayoutMultiColumnFlowThread : public LayoutFlowThread,
bool removeSpannerPlaceholderIfNoLongerValid(
LayoutBox* spannerObjectInFlowThread);
+ // Search mode when looking for an enclosing fragmentation context.
+ enum AncestorSearchConstraint {
+ // No constraints. Sometimes we just want to find all enclosing
+ // fragmentation contexts, e.g. to calculate the accumulated visual
+ // translation.
+ AnyAncestor,
+
+ // Consider fragmentation contexts that are strictly unbreakable (seen from
+ // the outside) to be isolated from the rest, so that such fragmentation
+ // contexts don't participate in fragmentation of enclosing fragmentation
+ // contexts, apart from taking up space and otherwise being completely
+ // unbreakable. This is typically what we want to do during layout.
+ IsolateUnbreakableContainers,
+ };
LayoutMultiColumnFlowThread* enclosingFlowThread() const;
- FragmentationContext* enclosingFragmentationContext() const;
+ FragmentationContext* enclosingFragmentationContext(
+ AncestorSearchConstraint = IsolateUnbreakableContainers) const;
LayoutUnit blockOffsetInEnclosingFragmentationContext() const {
- ASSERT(enclosingFragmentationContext());
+ DCHECK(enclosingFragmentationContext(AnyAncestor));
return m_blockOffsetInEnclosingFragmentationContext;
}

Powered by Google App Engine
This is Rietveld 408576698