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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment.h

Issue 2764753007: [LayoutNG] Add NGLineBoxFragment (Closed)
Patch Set: Rebase again as other CLs landed faster Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 NGFragment_h 5 #ifndef NGFragment_h
6 #define NGFragment_h 6 #define NGFragment_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_physical_fragment.h" 9 #include "core/layout/ng/ng_physical_fragment.h"
10 #include "core/layout/ng/ng_writing_mode.h" 10 #include "core/layout/ng/ng_writing_mode.h"
11 #include "platform/LayoutUnit.h" 11 #include "platform/LayoutUnit.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CORE_EXPORT NGFragment { 16 class CORE_EXPORT NGFragment {
17 STACK_ALLOCATED(); 17 STACK_ALLOCATED();
18 18
19 public: 19 public:
20 NGWritingMode WritingMode() const { 20 NGWritingMode WritingMode() const {
21 return static_cast<NGWritingMode>(writing_mode_); 21 return static_cast<NGWritingMode>(writing_mode_);
22 } 22 }
23 23
24 // Returns the border-box size. 24 // Returns the border-box size.
25 LayoutUnit InlineSize() const; 25 LayoutUnit InlineSize() const;
26 LayoutUnit BlockSize() const; 26 LayoutUnit BlockSize() const;
27 27
28 // Returns the total size, including the contents outside of the border-box.
29 LayoutUnit InlineOverflow() const;
30 LayoutUnit BlockOverflow() const;
31
32 // Returns the offset relative to the parent fragment's content-box. 28 // Returns the offset relative to the parent fragment's content-box.
33 LayoutUnit InlineOffset() const; 29 LayoutUnit InlineOffset() const;
34 LayoutUnit BlockOffset() const; 30 LayoutUnit BlockOffset() const;
35 31
36 NGPhysicalFragment::NGFragmentType Type() const; 32 NGPhysicalFragment::NGFragmentType Type() const;
37 33
38 protected: 34 protected:
39 NGFragment(NGWritingMode writing_mode, 35 NGFragment(NGWritingMode writing_mode,
40 const NGPhysicalFragment* physical_fragment) 36 const NGPhysicalFragment* physical_fragment)
41 : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {} 37 : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {}
42 38
43 const NGPhysicalFragment* physical_fragment_; 39 const NGPhysicalFragment* physical_fragment_;
44 40
45 unsigned writing_mode_ : 3; 41 unsigned writing_mode_ : 3;
46 }; 42 };
47 43
48 } // namespace blink 44 } // namespace blink
49 45
50 #endif // NGFragment_h 46 #endif // NGFragment_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698