| OLD | NEW |
| 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 |
| OLD | NEW |