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

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

Issue 978603003: [New Multicolumn] Make positionForPoint() work. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More tests Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutMultiColumnSet.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) 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
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
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
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutMultiColumnSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698