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

Side by Side Diff: Source/core/layout/LayoutMultiColumnSet.h

Issue 1282923004: Add toLayoutMultiColumnFlowThread(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | no next file » | 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) 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 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectLayoutMultiColumnSet || LayoutBlockFlow::isOfType(type); } 71 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectLayoutMultiColumnSet || LayoutBlockFlow::isOfType(type); }
72 bool canHaveChildren() const final { return false; } 72 bool canHaveChildren() const final { return false; }
73 73
74 // Return the width and height of a single column or page in the set. 74 // Return the width and height of a single column or page in the set.
75 LayoutUnit pageLogicalWidth() const { return flowThread()->logicalWidth(); } 75 LayoutUnit pageLogicalWidth() const { return flowThread()->logicalWidth(); }
76 LayoutUnit pageLogicalHeight() const; 76 LayoutUnit pageLogicalHeight() const;
77 77
78 LayoutFlowThread* flowThread() const { return m_flowThread; } 78 LayoutFlowThread* flowThread() const { return m_flowThread; }
79 79
80 LayoutBlockFlow* multiColumnBlockFlow() const { return toLayoutBlockFlow(par ent()); } 80 LayoutBlockFlow* multiColumnBlockFlow() const { return toLayoutBlockFlow(par ent()); }
81 LayoutMultiColumnFlowThread* multiColumnFlowThread() const 81 LayoutMultiColumnFlowThread* multiColumnFlowThread() const { return toLayout MultiColumnFlowThread(flowThread()); }
82 {
83 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isLayout MultiColumnFlowThread());
84 return static_cast<LayoutMultiColumnFlowThread*>(flowThread());
85 }
86 82
87 LayoutMultiColumnSet* nextSiblingMultiColumnSet() const; 83 LayoutMultiColumnSet* nextSiblingMultiColumnSet() const;
88 LayoutMultiColumnSet* previousSiblingMultiColumnSet() const; 84 LayoutMultiColumnSet* previousSiblingMultiColumnSet() const;
89 85
90 LayoutUnit logicalTopInFlowThread() const; 86 LayoutUnit logicalTopInFlowThread() const;
91 LayoutUnit logicalBottomInFlowThread() const; 87 LayoutUnit logicalBottomInFlowThread() const;
92 LayoutUnit logicalHeightInFlowThread() const { return logicalBottomInFlowThr ead() - logicalTopInFlowThread(); } 88 LayoutUnit logicalHeightInFlowThread() const { return logicalBottomInFlowThr ead() - logicalTopInFlowThread(); }
93 LayoutRect flowThreadPortionRect() const; 89 LayoutRect flowThreadPortionRect() const;
94 LayoutRect flowThreadPortionOverflowRect() const; 90 LayoutRect flowThreadPortionOverflowRect() const;
95 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort ionRect, bool isFirstPortion, bool isLastPortion) const; 91 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPort ionRect, bool isFirstPortion, bool isLastPortion) const;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 MultiColumnFragmentainerGroupList m_fragmentainerGroups; 169 MultiColumnFragmentainerGroupList m_fragmentainerGroups;
174 LayoutFlowThread* m_flowThread; 170 LayoutFlowThread* m_flowThread;
175 }; 171 };
176 172
177 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); 173 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet());
178 174
179 } // namespace blink 175 } // namespace blink
180 176
181 #endif // LayoutMultiColumnSet_h 177 #endif // LayoutMultiColumnSet_h
182 178
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnFlowThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698