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

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

Issue 1492143002: Add support for printing multicol containers, and enable it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review Created 5 years 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 084b16e45e5e74d261db6f5bd8b23282a8d6d94e..bacdc4e7363564750291bc16ddb78bbf0890ccce 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.h
@@ -28,6 +28,7 @@
#define LayoutMultiColumnFlowThread_h
#include "core/CoreExport.h"
+#include "core/layout/FragmentationContext.h"
#include "core/layout/LayoutFlowThread.h"
namespace blink {
@@ -112,7 +113,7 @@ class LayoutMultiColumnSpannerPlaceholder;
//
// There's also some documentation online:
// https://sites.google.com/a/chromium.org/dev/developers/design-documents/multi-column-layout
-class CORE_EXPORT LayoutMultiColumnFlowThread : public LayoutFlowThread {
+class CORE_EXPORT LayoutMultiColumnFlowThread : public LayoutFlowThread, public FragmentationContext {
public:
~LayoutMultiColumnFlowThread() override;
@@ -190,13 +191,20 @@ public:
bool removeSpannerPlaceholderIfNoLongerValid(LayoutBox* spannerObjectInFlowThread);
LayoutMultiColumnFlowThread* enclosingFlowThread() const;
- LayoutUnit blockOffsetInEnclosingFlowThread() const { ASSERT(enclosingFlowThread()); return m_blockOffsetInEnclosingFlowThread; }
+ FragmentationContext* enclosingFragmentationContext() const;
+ LayoutUnit blockOffsetInEnclosingFragmentationContext() const { ASSERT(enclosingFragmentationContext()); return m_blockOffsetInEnclosingFragmentationContext; }
// If we've run out of columns in the last fragmentainer group (column row), we have to insert
// another fragmentainer group in order to hold more columns. This means that we're moving to
// the next outer column (in the enclosing fragmentation context).
void appendNewFragmentainerGroupIfNeeded(LayoutUnit offsetInFlowThread);
+ // Implementing FragmentationContext:
+ bool isFragmentainerLogicalHeightKnown() final;
+ LayoutUnit fragmentainerLogicalHeightAt(LayoutUnit blockOffset) final;
+ LayoutUnit remainingLogicalHeightAt(LayoutUnit blockOffset) final;
+ LayoutMultiColumnFlowThread* associatedFlowThread() final { return this; }
+
const char* name() const override { return "LayoutMultiColumnFlowThread"; }
protected:
@@ -231,9 +239,9 @@ private:
unsigned m_columnCount; // The used value of column-count
LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto.
- // Cached block offset from this flow thread to the enclosing flow thread, if any. In the
- // coordinate space of the enclosing flow thread.
- LayoutUnit m_blockOffsetInEnclosingFlowThread;
+ // Cached block offset from this flow thread to the enclosing fragmentation context, if any. In
+ // the coordinate space of the enclosing fragmentation context.
+ LayoutUnit m_blockOffsetInEnclosingFragmentationContext;
bool m_inBalancingPass; // Set when relayouting for column balancing.
bool m_needsColumnHeightsRecalculation; // Set when we need to recalculate the column set heights after layout.

Powered by Google App Engine
This is Rietveld 408576698