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

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

Issue 1231363003: Fix virtual/override/final usage in Source/core/layout/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/LayoutMultiColumnSet.h ('k') | Source/core/layout/LayoutObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LayoutMultiColumnSpannerPlaceholder_h 5 #ifndef LayoutMultiColumnSpannerPlaceholder_h
6 #define LayoutMultiColumnSpannerPlaceholder_h 6 #define LayoutMultiColumnSpannerPlaceholder_h
7 7
8 #include "core/layout/LayoutMultiColumnFlowThread.h" 8 #include "core/layout/LayoutMultiColumnFlowThread.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // Placeholder layoutObject for column-span:all elements. The column-span:all la youtObject itself is a 12 // Placeholder layoutObject for column-span:all elements. The column-span:all la youtObject itself is a
13 // descendant of the flow thread, but due to its out-of-flow nature, we need som ething on the 13 // descendant of the flow thread, but due to its out-of-flow nature, we need som ething on the
14 // outside to take care of its positioning and sizing. LayoutMultiColumnSpannerP laceholder objects 14 // outside to take care of its positioning and sizing. LayoutMultiColumnSpannerP laceholder objects
15 // are siblings of LayoutMultiColumnSet objects, i.e. direct children of the mul ticol container. 15 // are siblings of LayoutMultiColumnSet objects, i.e. direct children of the mul ticol container.
16 class LayoutMultiColumnSpannerPlaceholder final : public LayoutBox { 16 class LayoutMultiColumnSpannerPlaceholder final : public LayoutBox {
17 public: 17 public:
18 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectLayoutMultiColumnSpannerPlaceholder || LayoutBox::isOfType(type); } 18 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectLayoutMultiColumnSpannerPlaceholder || LayoutBox::isOfType(type); }
19 19
20 static LayoutMultiColumnSpannerPlaceholder* createAnonymous(const ComputedSt yle& parentStyle, LayoutBox&); 20 static LayoutMultiColumnSpannerPlaceholder* createAnonymous(const ComputedSt yle& parentStyle, LayoutBox&);
21 21
22 LayoutMultiColumnFlowThread* flowThread() const { return toLayoutBlockFlow(p arent())->multiColumnFlowThread(); } 22 LayoutMultiColumnFlowThread* flowThread() const { return toLayoutBlockFlow(p arent())->multiColumnFlowThread(); }
23 23
24 LayoutBox* layoutObjectInFlowThread() const { return m_layoutObjectInFlowThr ead; } 24 LayoutBox* layoutObjectInFlowThread() const { return m_layoutObjectInFlowThr ead; }
25 void markForLayoutIfObjectInFlowThreadNeedsLayout() 25 void markForLayoutIfObjectInFlowThreadNeedsLayout()
26 { 26 {
27 if (!m_layoutObjectInFlowThread->needsLayout()) 27 if (!m_layoutObjectInFlowThread->needsLayout())
28 return; 28 return;
29 // The containing block of a spanner is the multicol container (our pare nt here), but the 29 // The containing block of a spanner is the multicol container (our pare nt here), but the
30 // spanner is laid out via its spanner set (us), so we need to make sure that we enter it. 30 // spanner is laid out via its spanner set (us), so we need to make sure that we enter it.
31 setChildNeedsLayout(MarkOnlyThis); 31 setChildNeedsLayout(MarkOnlyThis);
32 } 32 }
33 33
34 void layoutObjectInFlowThreadStyleDidChange(const ComputedStyle* oldStyle); 34 void layoutObjectInFlowThreadStyleDidChange(const ComputedStyle* oldStyle);
35 void updateMarginProperties(); 35 void updateMarginProperties();
36 36
37 virtual const char* name() const override { return "LayoutMultiColumnSpanner Placeholder"; } 37 const char* name() const override { return "LayoutMultiColumnSpannerPlacehol der"; }
38 38
39 protected: 39 protected:
40 virtual void willBeRemovedFromTree() override; 40 void willBeRemovedFromTree() override;
41 virtual bool needsPreferredWidthsRecalculation() const override; 41 bool needsPreferredWidthsRecalculation() const override;
42 virtual LayoutUnit minPreferredLogicalWidth() const override; 42 LayoutUnit minPreferredLogicalWidth() const override;
43 virtual LayoutUnit maxPreferredLogicalWidth() const override; 43 LayoutUnit maxPreferredLogicalWidth() const override;
44 virtual void layout() override; 44 void layout() override;
45 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 45 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L ogicalExtentComputedValues&) const override;
46 virtual void invalidateTreeIfNeeded(PaintInvalidationState&) override; 46 void invalidateTreeIfNeeded(PaintInvalidationState&) override;
47 virtual void paint(const PaintInfo&, const LayoutPoint& paintOffset) overrid e; 47 void paint(const PaintInfo&, const LayoutPoint& paintOffset) override;
48 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo ntainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; 48 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
49 49
50 private: 50 private:
51 LayoutMultiColumnSpannerPlaceholder(LayoutBox*); 51 LayoutMultiColumnSpannerPlaceholder(LayoutBox*);
52 52
53 LayoutBox* m_layoutObjectInFlowThread; // The actual column-span:all layoutO bject inside the flow thread. 53 LayoutBox* m_layoutObjectInFlowThread; // The actual column-span:all layoutO bject inside the flow thread.
54 }; 54 };
55 55
56 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSpannerPlaceholder, isLayoutMul tiColumnSpannerPlaceholder()); 56 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMultiColumnSpannerPlaceholder, isLayoutMul tiColumnSpannerPlaceholder());
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif 60 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMultiColumnSet.h ('k') | Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698