OLD | NEW |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // fragmentainer (page / column) that the inner multicol container lives in. Eac
h fragmentainer | 59 // fragmentainer (page / column) that the inner multicol container lives in. Eac
h fragmentainer |
60 // group has its own column height, but the column height is uniform within a gr
oup. | 60 // group has its own column height, but the column height is uniform within a gr
oup. |
61 class LayoutMultiColumnSet : public LayoutRegion { | 61 class LayoutMultiColumnSet : public LayoutRegion { |
62 public: | 62 public: |
63 static LayoutMultiColumnSet* createAnonymous(LayoutFlowThread&, const Layout
Style& parentStyle); | 63 static LayoutMultiColumnSet* createAnonymous(LayoutFlowThread&, const Layout
Style& parentStyle); |
64 | 64 |
65 const MultiColumnFragmentainerGroup& firstFragmentainerGroup() const { retur
n m_fragmentainerGroups.first(); } | 65 const MultiColumnFragmentainerGroup& firstFragmentainerGroup() const { retur
n m_fragmentainerGroups.first(); } |
66 const MultiColumnFragmentainerGroup& lastFragmentainerGroup() const { return
m_fragmentainerGroups.last(); } | 66 const MultiColumnFragmentainerGroup& lastFragmentainerGroup() const { return
m_fragmentainerGroups.last(); } |
67 MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(LayoutUn
it); | 67 MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(LayoutUn
it); |
68 const MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(La
youtUnit) const; | 68 const MultiColumnFragmentainerGroup& fragmentainerGroupAtFlowThreadOffset(La
youtUnit) const; |
| 69 const MultiColumnFragmentainerGroup& fragmentainerGroupAtVisualPoint(const L
ayoutPoint&) const; |
69 | 70 |
70 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutMultiColumnSet || LayoutRegion::isOfType(type); } | 71 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutMultiColumnSet || LayoutRegion::isOfType(type); } |
71 | 72 |
72 virtual LayoutUnit pageLogicalWidth() const final { return flowThread()->log
icalWidth(); } | 73 virtual LayoutUnit pageLogicalWidth() const final { return flowThread()->log
icalWidth(); } |
73 virtual LayoutUnit pageLogicalHeight() const final; | 74 virtual LayoutUnit pageLogicalHeight() const final; |
74 | 75 |
75 LayoutBlockFlow* multiColumnBlockFlow() const { return toLayoutBlockFlow(par
ent()); } | 76 LayoutBlockFlow* multiColumnBlockFlow() const { return toLayoutBlockFlow(par
ent()); } |
76 LayoutMultiColumnFlowThread* multiColumnFlowThread() const | 77 LayoutMultiColumnFlowThread* multiColumnFlowThread() const |
77 { | 78 { |
78 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isLayout
MultiColumnFlowThread()); | 79 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isLayout
MultiColumnFlowThread()); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 protected: | 152 protected: |
152 LayoutMultiColumnSet(LayoutFlowThread*); | 153 LayoutMultiColumnSet(LayoutFlowThread*); |
153 | 154 |
154 private: | 155 private: |
155 virtual void insertedIntoTree() override final; | 156 virtual void insertedIntoTree() override final; |
156 virtual void willBeRemovedFromTree() override final; | 157 virtual void willBeRemovedFromTree() override final; |
157 | 158 |
158 virtual bool isSelfCollapsingBlock() const override { return false; } | 159 virtual bool isSelfCollapsingBlock() const override { return false; } |
159 | 160 |
160 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; | 161 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; |
| 162 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
161 | 163 |
162 virtual void paintObject(const PaintInfo&, const LayoutPoint& paintOffset) o
verride; | 164 virtual void paintObject(const PaintInfo&, const LayoutPoint& paintOffset) o
verride; |
163 | 165 |
164 virtual void addOverflowFromChildren() override; | 166 virtual void addOverflowFromChildren() override; |
165 | 167 |
166 virtual LayoutRect flowThreadPortionRect() const override; | 168 virtual LayoutRect flowThreadPortionRect() const override; |
167 | 169 |
168 MultiColumnFragmentainerGroupList m_fragmentainerGroups; | 170 MultiColumnFragmentainerGroupList m_fragmentainerGroups; |
169 }; | 171 }; |
170 | 172 |
171 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); | 173 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSet, isLayoutMultiColumnSet()); |
172 | 174 |
173 } // namespace blink | 175 } // namespace blink |
174 | 176 |
175 #endif // LayoutMultiColumnSet_h | 177 #endif // LayoutMultiColumnSet_h |
176 | 178 |
OLD | NEW |