Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_layout_result.h |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h |
| index 017b94f4f6bfb11621b8ecca3352960758628503..138f41a1a9df804d05d3b5a77d2ba8ca852b4151 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_result.h |
| @@ -26,9 +26,17 @@ namespace blink { |
| // NGFragment et al. |
| class CORE_EXPORT NGLayoutResult : public RefCounted<NGLayoutResult> { |
| public: |
| + enum NGLayoutResultStatus { |
| + kSuccess = 0, |
| + kBfcOffsetResolved = 1, |
| + // When adding new values, make sure the bit size of |status_| is large |
| + // enough to store. |
| + }; |
| + |
| RefPtr<NGPhysicalFragment> PhysicalFragment() const { |
| return physical_fragment_; |
| } |
| + |
| RefPtr<NGPhysicalFragment>& MutablePhysicalFragment() { |
| return physical_fragment_; |
| } |
| @@ -50,6 +58,11 @@ class CORE_EXPORT NGLayoutResult : public RefCounted<NGLayoutResult> { |
| return unpositioned_floats_; |
| } |
| + // If... |
|
eae
2017/07/10 23:27:49
Could you expand on this a little bit or remove th
ikilpatrick
2017/07/11 17:20:41
Done.
|
| + NGLayoutResultStatus Status() const { |
| + return static_cast<NGLayoutResultStatus>(status_); |
| + } |
| + |
| const WTF::Optional<NGLogicalOffset>& BfcOffset() const { |
| return bfc_offset_; |
| } |
| @@ -64,7 +77,8 @@ class CORE_EXPORT NGLayoutResult : public RefCounted<NGLayoutResult> { |
| out_of_flow_positioned_descendants, |
| Vector<RefPtr<NGUnpositionedFloat>>& unpositioned_floats, |
| const WTF::Optional<NGLogicalOffset> bfc_offset, |
| - const NGMarginStrut end_margin_strut); |
| + const NGMarginStrut end_margin_strut, |
| + NGLayoutResultStatus status); |
| RefPtr<NGPhysicalFragment> physical_fragment_; |
| Vector<RefPtr<NGUnpositionedFloat>> unpositioned_floats_; |
| @@ -72,6 +86,8 @@ class CORE_EXPORT NGLayoutResult : public RefCounted<NGLayoutResult> { |
| Vector<NGOutOfFlowPositionedDescendant> oof_positioned_descendants_; |
| const WTF::Optional<NGLogicalOffset> bfc_offset_; |
| const NGMarginStrut end_margin_strut_; |
| + |
| + unsigned status_ : 1; |
| }; |
| } // namespace blink |