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

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

Issue 201573009: Remove -webkit-column-progression and -webkit-column-axis properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master (fixed the DOS-style line break issue there) Created 6 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
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2010, 2011 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 20 matching lines...) Expand all
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class ColumnInfo { 34 class ColumnInfo {
35 WTF_MAKE_NONCOPYABLE(ColumnInfo); WTF_MAKE_FAST_ALLOCATED; 35 WTF_MAKE_NONCOPYABLE(ColumnInfo); WTF_MAKE_FAST_ALLOCATED;
36 public: 36 public:
37 ColumnInfo() 37 ColumnInfo()
38 : m_desiredColumnWidth(0) 38 : m_desiredColumnWidth(0)
39 , m_desiredColumnCount(1) 39 , m_desiredColumnCount(1)
40 , m_progressionAxis(InlineAxis) 40 , m_progressionAxis(InlineAxis)
41 , m_progressionIsReversed(false)
42 , m_columnCount(1) 41 , m_columnCount(1)
43 , m_columnHeight(0) 42 , m_columnHeight(0)
44 , m_minimumColumnHeight(0) 43 , m_minimumColumnHeight(0)
45 , m_forcedBreaks(0) 44 , m_forcedBreaks(0)
46 , m_maximumDistanceBetweenForcedBreaks(0) 45 , m_maximumDistanceBetweenForcedBreaks(0)
47 , m_forcedBreakOffset(0) 46 , m_forcedBreakOffset(0)
48 { 47 {
49 } 48 }
50 49
51 LayoutUnit desiredColumnWidth() const { return m_desiredColumnWidth; } 50 LayoutUnit desiredColumnWidth() const { return m_desiredColumnWidth; }
52 void setDesiredColumnWidth(LayoutUnit width) { m_desiredColumnWidth = width; } 51 void setDesiredColumnWidth(LayoutUnit width) { m_desiredColumnWidth = width; }
53 52
54 unsigned desiredColumnCount() const { return m_desiredColumnCount; } 53 unsigned desiredColumnCount() const { return m_desiredColumnCount; }
55 void setDesiredColumnCount(unsigned count) { m_desiredColumnCount = count; } 54 void setDesiredColumnCount(unsigned count) { m_desiredColumnCount = count; }
56 55
57 enum Axis { InlineAxis, BlockAxis }; 56 enum Axis { InlineAxis, BlockAxis };
58 57
59 Axis progressionAxis() const { return m_progressionAxis; } 58 Axis progressionAxis() const { return m_progressionAxis; }
60 void setProgressionAxis(Axis progressionAxis) { m_progressionAxis = progress ionAxis; } 59 void setProgressionAxis(Axis progressionAxis) { m_progressionAxis = progress ionAxis; }
61 60
62 bool progressionIsReversed() const { return m_progressionIsReversed; }
63 void setProgressionIsReversed(bool reversed) { m_progressionIsReversed = rev ersed; }
64
65 unsigned columnCount() const { return m_columnCount; } 61 unsigned columnCount() const { return m_columnCount; }
66 LayoutUnit columnHeight() const { return m_columnHeight; } 62 LayoutUnit columnHeight() const { return m_columnHeight; }
67 63
68 // Set our count and height. This is enough info for a RenderBlock to compu te page rects 64 // Set our count and height. This is enough info for a RenderBlock to compu te page rects
69 // dynamically. 65 // dynamically.
70 void setColumnCountAndHeight(int count, LayoutUnit height) 66 void setColumnCountAndHeight(int count, LayoutUnit height)
71 { 67 {
72 m_columnCount = count; 68 m_columnCount = count;
73 m_columnHeight = height; 69 m_columnHeight = height;
74 } 70 }
(...skipping 19 matching lines...) Expand all
94 return; 90 return;
95 m_forcedBreaks++; 91 m_forcedBreaks++;
96 m_maximumDistanceBetweenForcedBreaks = std::max(m_maximumDistanceBetween ForcedBreaks, distanceFromLastBreak); 92 m_maximumDistanceBetweenForcedBreaks = std::max(m_maximumDistanceBetween ForcedBreaks, distanceFromLastBreak);
97 m_forcedBreakOffset = offsetFromFirstPage; 93 m_forcedBreakOffset = offsetFromFirstPage;
98 } 94 }
99 95
100 private: 96 private:
101 LayoutUnit m_desiredColumnWidth; 97 LayoutUnit m_desiredColumnWidth;
102 unsigned m_desiredColumnCount; 98 unsigned m_desiredColumnCount;
103 Axis m_progressionAxis; 99 Axis m_progressionAxis;
104 bool m_progressionIsReversed;
105 100
106 unsigned m_columnCount; 101 unsigned m_columnCount;
107 LayoutUnit m_columnHeight; 102 LayoutUnit m_columnHeight;
108 LayoutUnit m_minimumColumnHeight; 103 LayoutUnit m_minimumColumnHeight;
109 int m_forcedBreaks; // FIXME: We will ultimately need to cache more informat ion to balance around forced breaks properly. 104 int m_forcedBreaks; // FIXME: We will ultimately need to cache more informat ion to balance around forced breaks properly.
110 LayoutUnit m_maximumDistanceBetweenForcedBreaks; 105 LayoutUnit m_maximumDistanceBetweenForcedBreaks;
111 LayoutUnit m_forcedBreakOffset; 106 LayoutUnit m_forcedBreakOffset;
112 }; 107 };
113 108
114 } 109 }
115 110
116 #endif 111 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698