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

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

Issue 620753006: Rendering API cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isRender MultiColumnFlowThread()); 67 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isRender MultiColumnFlowThread());
68 return static_cast<RenderMultiColumnFlowThread*>(flowThread()); 68 return static_cast<RenderMultiColumnFlowThread*>(flowThread());
69 } 69 }
70 70
71 RenderMultiColumnSet* nextSiblingMultiColumnSet() const; 71 RenderMultiColumnSet* nextSiblingMultiColumnSet() const;
72 RenderMultiColumnSet* previousSiblingMultiColumnSet() const; 72 RenderMultiColumnSet* previousSiblingMultiColumnSet() const;
73 73
74 LayoutUnit logicalTopInFlowThread() const { return isHorizontalWritingMode() ? flowThreadPortionRect().y() : flowThreadPortionRect().x(); } 74 LayoutUnit logicalTopInFlowThread() const { return isHorizontalWritingMode() ? flowThreadPortionRect().y() : flowThreadPortionRect().x(); }
75 LayoutUnit logicalBottomInFlowThread() const { return isHorizontalWritingMod e() ? flowThreadPortionRect().maxY() : flowThreadPortionRect().maxX(); } 75 LayoutUnit logicalBottomInFlowThread() const { return isHorizontalWritingMod e() ? flowThreadPortionRect().maxY() : flowThreadPortionRect().maxX(); }
76 76
77 LayoutUnit logicalHeightInFlowThread() const { return isHorizontalWritingMod e() ? flowThreadPortionRect().height() : flowThreadPortionRect().width(); }
mstensho (USE GERRIT) 2014/10/01 22:21:37 Please keep this, and kill logicalHeightOfAllFlowT
78
79 // The used CSS value of column-count, i.e. how many columns there are room for without overflowing. 77 // The used CSS value of column-count, i.e. how many columns there are room for without overflowing.
80 unsigned usedColumnCount() const { return multiColumnFlowThread()->columnCou nt(); } 78 unsigned usedColumnCount() const { return multiColumnFlowThread()->columnCou nt(); }
81 79
82 // Find the column that contains the given block offset, and return the tran slation needed to 80 // Find the column that contains the given block offset, and return the tran slation needed to
83 // get from flow thread coordinates to visual coordinates. 81 // get from flow thread coordinates to visual coordinates.
84 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const; 82 LayoutSize flowThreadTranslationAtOffset(LayoutUnit) const;
85 83
86 LayoutUnit heightAdjustedForSetOffset(LayoutUnit height) const; 84 LayoutUnit heightAdjustedForSetOffset(LayoutUnit height) const;
87 85
88 void updateMinimumColumnHeight(LayoutUnit height) { m_minimumColumnHeight = std::max(height, m_minimumColumnHeight); } 86 void updateMinimumColumnHeight(LayoutUnit height) { m_minimumColumnHeight = std::max(height, m_minimumColumnHeight); }
(...skipping 20 matching lines...) Expand all
109 // Expand this set's flow thread portion rectangle to contain all trailing f low thread 107 // Expand this set's flow thread portion rectangle to contain all trailing f low thread
110 // overflow. Only to be called on the last set. 108 // overflow. Only to be called on the last set.
111 void expandToEncompassFlowThreadContentsIfNeeded(); 109 void expandToEncompassFlowThreadContentsIfNeeded();
112 110
113 void attachRegion(); 111 void attachRegion();
114 void detachRegion(); 112 void detachRegion();
115 113
116 // This method represents the logical height of the entire flow thread porti on used by the region or set. 114 // This method represents the logical height of the entire flow thread porti on used by the region or set.
117 // For RenderRegions it matches logicalPaginationHeight(), but for sets it i s the height of all the pages 115 // For RenderRegions it matches logicalPaginationHeight(), but for sets it i s the height of all the pages
118 // or columns added together. 116 // or columns added together.
119 LayoutUnit logicalHeightOfAllFlowThreadContent() const { return logicalHeigh tInFlowThread(); } 117 LayoutUnit logicalHeightOfAllFlowThreadContent() const { return isHorizontal WritingMode() ? flowThreadPortionRect().height() : flowThreadPortionRect().width (); }
120 118
121 void paintInvalidationForFlowThreadContent(const LayoutRect& paintInvalidati onRect) const; 119 void paintInvalidationForFlowThreadContent(const LayoutRect& paintInvalidati onRect) const;
122 120
123 // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the 121 // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the
124 // flow thread portion we contain. For sets, we have to figure out the top o f the nearest column or 122 // flow thread portion we contain. For sets, we have to figure out the top o f the nearest column or
125 // page. 123 // page.
126 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const; 124 LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
127 125
128 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB ox, const LayoutRect& dirtyRect); 126 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB ox, const LayoutRect& dirtyRect);
129 127
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 }; 204 };
207 Vector<ContentRun, 1> m_contentRuns; 205 Vector<ContentRun, 1> m_contentRuns;
208 }; 206 };
209 207
210 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet()); 208 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet());
211 209
212 } // namespace blink 210 } // namespace blink
213 211
214 #endif // RenderMultiColumnSet_h 212 #endif // RenderMultiColumnSet_h
215 213
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698