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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_physical_line_box_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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_physical_line_box_fragment.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_line_box_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_physical_line_box_fragment.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a903fe7635155f7b41bf2564402c15ce68c9d63
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_line_box_fragment.h
@@ -0,0 +1,43 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NGPhysicalLineBoxFragment_h
+#define NGPhysicalLineBoxFragment_h
+
+#include "core/CoreExport.h"
+#include "core/layout/ng/geometry/ng_logical_offset.h"
+#include "core/layout/ng/ng_line_height_metrics.h"
+#include "core/layout/ng/ng_physical_fragment.h"
+
+namespace blink {
+
+class CORE_EXPORT NGPhysicalLineBoxFragment final : public NGPhysicalFragment {
+ public:
+ // This modifies the passed-in children vector.
+ NGPhysicalLineBoxFragment(NGPhysicalSize size,
+ Vector<RefPtr<NGPhysicalFragment>>& children,
+ const NGLineHeightMetrics&,
+ RefPtr<NGBreakToken> break_token = nullptr);
+
+ const Vector<RefPtr<NGPhysicalFragment>>& Children() const {
+ return children_;
+ }
+
+ const NGLineHeightMetrics& Metrics() const { return metrics_; }
+
+ private:
+ Vector<RefPtr<NGPhysicalFragment>> children_;
+
+ NGLineHeightMetrics metrics_;
+};
+
+DEFINE_TYPE_CASTS(NGPhysicalLineBoxFragment,
+ NGPhysicalFragment,
+ fragment,
+ fragment->Type() == NGPhysicalFragment::kFragmentLineBox,
+ fragment.Type() == NGPhysicalFragment::kFragmentLineBox);
+
+} // namespace blink
+
+#endif // NGPhysicalBoxFragment_h

Powered by Google App Engine
This is Rietveld 408576698