Chromium Code Reviews

Side by Side Diff: Source/core/layout/api/LineLayoutBox.h

Issue 1164933006: Create LineLayout api (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: all line API implementations now in headers Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef LineLayoutBox_h
6 #define LineLayoutBox_h
7
8 #include "core/layout/LayoutBox.h"
9 #include "core/layout/api/LineLayoutItem.h"
10 #include "platform/LayoutUnit.h"
11
12 namespace blink {
13
14 class LayoutBox;
15
16 class LineLayoutBox : public LineLayoutItem {
17 public:
18 LineLayoutBox(LayoutBox*);
19 LineLayoutBox(const LineLayoutItem&);
20 LineLayoutBox() { }
21
22 void setLogicalHeight(LayoutUnit size)
23 {
24 toBox()->setLogicalHeight(size);
25 }
26
27 LayoutUnit logicalHeight() const
28 {
29 return toBox()->logicalHeight();
30 }
31
32 private:
33 LayoutBox* toBox()
34 {
35 return toLayoutBox(layoutObject());
36 }
37
38 const LayoutBox* toBox() const
39 {
40 return toLayoutBox(layoutObject());
41 }
42 };
43
44 } // namespace blink
45
46 #endif // LineLayoutBox_h
OLDNEW

Powered by Google App Engine