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

Side by Side Diff: Source/core/rendering/RenderMultiColumnFlowThread.h

Issue 256743006: [New Multicolumn] Make offsetLeft, offsetTop and getClientRects() behave. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 7 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // renderers. Then destroy the flow thread. Called when a multicol container becomes a regular 71 // renderers. Then destroy the flow thread. Called when a multicol container becomes a regular
72 // block. 72 // block.
73 void evacuateAndDestroy(); 73 void evacuateAndDestroy();
74 74
75 unsigned columnCount() const { return m_columnCount; } 75 unsigned columnCount() const { return m_columnCount; }
76 LayoutUnit columnWidth() const { return m_columnWidth; } 76 LayoutUnit columnWidth() const { return m_columnWidth; }
77 LayoutUnit columnHeightAvailable() const { return m_columnHeightAvailable; } 77 LayoutUnit columnHeightAvailable() const { return m_columnHeightAvailable; }
78 void setColumnHeightAvailable(LayoutUnit available) { m_columnHeightAvailabl e = available; } 78 void setColumnHeightAvailable(LayoutUnit available) { m_columnHeightAvailabl e = available; }
79 bool requiresBalancing() const { return !columnHeightAvailable() || multiCol umnBlockFlow()->style()->columnFill() == ColumnFillBalance; } 79 bool requiresBalancing() const { return !columnHeightAvailable() || multiCol umnBlockFlow()->style()->columnFill() == ColumnFillBalance; }
80 80
81 virtual LayoutSize columnOffset(const LayoutPoint&) const OVERRIDE FINAL;
82
81 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&); 83 void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&);
82 bool computeColumnCountAndWidth(); 84 bool computeColumnCountAndWidth();
83 bool recalculateColumnHeights(); 85 bool recalculateColumnHeights();
84 86
85 private: 87 private:
86 RenderMultiColumnFlowThread(); 88 RenderMultiColumnFlowThread();
87 89
88 virtual const char* renderName() const OVERRIDE; 90 virtual const char* renderName() const OVERRIDE;
89 virtual void addRegionToThread(RenderRegion*) OVERRIDE; 91 virtual void addRegionToThread(RenderRegion*) OVERRIDE;
90 virtual void willBeRemovedFromTree() OVERRIDE; 92 virtual void willBeRemovedFromTree() OVERRIDE;
91 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE; 93 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE;
92 virtual LayoutUnit initialLogicalWidth() const OVERRIDE; 94 virtual LayoutUnit initialLogicalWidth() const OVERRIDE;
93 virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) OVERR IDE; 95 virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) OVERR IDE;
94 virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight ) OVERRIDE; 96 virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight ) OVERRIDE;
95 virtual RenderRegion* regionAtBlockOffset(LayoutUnit) const OVERRIDE; 97 virtual RenderRegion* regionAtBlockOffset(LayoutUnit) const OVERRIDE;
96 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) OVERRIDE; 98 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) OVERRIDE;
97 virtual bool isPageLogicalHeightKnown() const OVERRIDE; 99 virtual bool isPageLogicalHeightKnown() const OVERRIDE;
98 100
99 unsigned m_columnCount; // The used value of column-count 101 unsigned m_columnCount; // The used value of column-count
100 LayoutUnit m_columnWidth; // The used value of column-width 102 LayoutUnit m_columnWidth; // The used value of column-width
101 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto. 103 LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto.
102 bool m_inBalancingPass; // Set when relayouting for column balancing. 104 bool m_inBalancingPass; // Set when relayouting for column balancing.
103 bool m_needsRebalancing; 105 bool m_needsRebalancing;
104 }; 106 };
105 107
106 } // namespace WebCore 108 } // namespace WebCore
107 109
108 #endif // RenderMultiColumnFlowThread_h 110 #endif // RenderMultiColumnFlowThread_h
109 111
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlowThread.cpp ('k') | Source/core/rendering/RenderMultiColumnFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698