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

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

Issue 2242893003: [LayoutNG] Switch NGConstraintSpace to NGLogicalSize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 4 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 NGConstraintSpace_h 5 #ifndef NGConstraintSpace_h
6 #define NGConstraintSpace_h 6 #define NGConstraintSpace_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_constraint_space.h" 9 #include "core/layout/ng/ng_constraint_space.h"
10 #include "core/layout/ng/ng_units.h" 10 #include "core/layout/ng/ng_units.h"
11 #include "platform/LayoutUnit.h" 11 #include "platform/LayoutUnit.h"
12 #include "wtf/DoublyLinkedList.h" 12 #include "wtf/DoublyLinkedList.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CORE_EXPORT NGDerivedConstraintSpace final : public NGConstraintSpace { 16 class CORE_EXPORT NGDerivedConstraintSpace final : public NGConstraintSpace {
17 public: 17 public:
18 ~NGDerivedConstraintSpace(); 18 ~NGDerivedConstraintSpace();
19 19
20 LayoutUnit offset() const { return offset_; } 20 NGLogicalOffset Offset() const { return offset_; }
21 LayoutUnit size() const { return size_; } 21 NGLogicalSize Size() const override { return size_; }
22 22
23 private: 23 private:
24 NGDerivedConstraintSpace(const NGConstraintSpace* original, 24 NGDerivedConstraintSpace(const NGConstraintSpace* original,
25 NGLogicalOffset offset, 25 NGLogicalOffset offset,
26 NGLogicalSize size, 26 NGLogicalSize size,
27 NGWritingMode writingMode, 27 NGWritingMode writingMode,
28 NGDirection direction) 28 NGDirection direction)
29 : original_(original), 29 : original_(original),
30 offset_(offset), 30 offset_(offset),
31 size_(size), 31 size_(size),
32 writingMode_(writingMode), 32 writingMode_(writingMode),
33 direction_(direction) {} 33 direction_(direction) {}
34 34
35 const NGConstraintSpace* original_; 35 const NGConstraintSpace* original_;
36 NGLogicalOffset offset_; 36 NGLogicalOffset offset_;
37 NGLogicalSize size_; 37 NGLogicalSize size_;
38 NGWritingMode writingMode_; 38 NGWritingMode writingMode_;
39 NGDirection direction_; 39 NGDirection direction_;
40 }; 40 };
41 41
42 } // namespace blink 42 } // namespace blink
43 43
44 #endif // NGConstraintSpace_h 44 #endif // NGConstraintSpace_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698