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

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

Issue 265293005: [New Multicolumn] Update sets' flow thread portion rectangles properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par ent()); } 59 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par ent()); }
60 RenderMultiColumnFlowThread* multiColumnFlowThread() const 60 RenderMultiColumnFlowThread* multiColumnFlowThread() const
61 { 61 {
62 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isRender MultiColumnFlowThread()); 62 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isRender MultiColumnFlowThread());
63 return static_cast<RenderMultiColumnFlowThread*>(flowThread()); 63 return static_cast<RenderMultiColumnFlowThread*>(flowThread());
64 } 64 }
65 65
66 RenderMultiColumnSet* nextSiblingMultiColumnSet() const; 66 RenderMultiColumnSet* nextSiblingMultiColumnSet() const;
67 67
68 LayoutUnit logicalHeightInFlowThread() const { return isHorizontalWritingMod e() ? flowThreadPortionRect().height() : flowThreadPortionRect().width(); }
69
68 unsigned computedColumnCount() const { return m_computedColumnCount; } 70 unsigned computedColumnCount() const { return m_computedColumnCount; }
69 LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; } 71 LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; }
70 LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; } 72 LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; }
71 73
72 void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count) 74 void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count)
73 { 75 {
74 m_computedColumnWidth = width; 76 m_computedColumnWidth = width;
75 m_computedColumnCount = count; 77 m_computedColumnCount = count;
76 } 78 }
77 79
(...skipping 21 matching lines...) Expand all
99 // after layout that the columns weren't tall enough. 101 // after layout that the columns weren't tall enough.
100 void recordSpaceShortage(LayoutUnit spaceShortage); 102 void recordSpaceShortage(LayoutUnit spaceShortage);
101 103
102 virtual void updateLogicalWidth() OVERRIDE; 104 virtual void updateLogicalWidth() OVERRIDE;
103 105
104 void prepareForLayout(); 106 void prepareForLayout();
105 107
106 private: 108 private:
107 RenderMultiColumnSet(RenderFlowThread*); 109 RenderMultiColumnSet(RenderFlowThread*);
108 110
111 virtual void layout() OVERRIDE;
109 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE; 112 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const OVERRIDE;
110 113
111 virtual void paintObject(PaintInfo&, const LayoutPoint& paintOffset) OVERRID E; 114 virtual void paintObject(PaintInfo&, const LayoutPoint& paintOffset) OVERRID E;
112 115
113 virtual LayoutUnit pageLogicalWidth() const OVERRIDE { return m_computedColu mnWidth; } 116 virtual LayoutUnit pageLogicalWidth() const OVERRIDE { return m_computedColu mnWidth; }
114 virtual LayoutUnit pageLogicalHeight() const OVERRIDE { return m_computedCol umnHeight; } 117 virtual LayoutUnit pageLogicalHeight() const OVERRIDE { return m_computedCol umnHeight; }
115 118
116 virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const OVERRIDE ; 119 virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const OVERRIDE ;
117 120
118 // FIXME: This will change once we have column sets constrained by enclosing pages, etc. 121 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const OVERRIDE { re turn logicalHeightInFlowThread(); }
119 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const OVERRIDE { re turn m_computedColumnHeight; }
120 122
121 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const O VERRIDE; 123 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const O VERRIDE;
122 124
123 virtual void collectLayerFragments(LayerFragments&, const LayoutRect& layerB oundingBox, const LayoutRect& dirtyRect) OVERRIDE; 125 virtual void collectLayerFragments(LayerFragments&, const LayoutRect& layerB oundingBox, const LayoutRect& dirtyRect) OVERRIDE;
124 126
125 virtual const char* renderName() const OVERRIDE; 127 virtual const char* renderName() const OVERRIDE;
126 128
127 void paintColumnRules(PaintInfo&, const LayoutPoint& paintOffset); 129 void paintColumnRules(PaintInfo&, const LayoutPoint& paintOffset);
128 130
129 LayoutUnit columnGap() const; 131 LayoutUnit columnGap() const;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 }; 190 };
189 Vector<ContentRun, 1> m_contentRuns; 191 Vector<ContentRun, 1> m_contentRuns;
190 }; 192 };
191 193
192 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet()); 194 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet());
193 195
194 } // namespace WebCore 196 } // namespace WebCore
195 197
196 #endif // RenderMultiColumnSet_h 198 #endif // RenderMultiColumnSet_h
197 199
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderMultiColumnSet.cpp » ('j') | Source/core/rendering/RenderMultiColumnSet.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698