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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h

Issue 2867293002: [LayoutNG] Compute baseline from fragment tree (Closed)
Patch Set: Cleanup Created 3 years, 5 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_fragment_builder.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
index 5ea85591fb6a755835df5cda15452d82510f5f2c..056871f91a4fb485e9f17a64fc9ebf488ba2e34e 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
@@ -6,6 +6,7 @@
#define NGFragmentBuilder_h
#include "core/layout/ng/geometry/ng_static_position.h"
+#include "core/layout/ng/inline/ng_baseline.h"
#include "core/layout/ng/inline/ng_physical_text_fragment.h"
#include "core/layout/ng/ng_break_token.h"
#include "core/layout/ng/ng_constraint_space.h"
@@ -31,6 +32,7 @@ class CORE_EXPORT NGFragmentBuilder final {
using WeakBoxList = PersistentHeapLinkedHashSet<WeakMember<NGBlockNode>>;
+ NGWritingMode WritingMode() const { return writing_mode_; }
NGFragmentBuilder& SetWritingMode(NGWritingMode);
NGFragmentBuilder& SetDirection(TextDirection);
@@ -128,6 +130,8 @@ class CORE_EXPORT NGFragmentBuilder final {
return children_;
}
+ const Vector<NGLogicalOffset>& Offsets() const { return offsets_; }
cbiesinger 2017/07/12 15:48:44 Add a brief comment that this is each child's offs
kojii 2017/07/12 18:21:53 We have MutableOffsets() already and this is inter
+
bool DidBreak() const { return did_break_; }
NGFragmentBuilder& SetBorderEdges(NGBorderEdges border_edges) {
@@ -135,6 +139,8 @@ class CORE_EXPORT NGFragmentBuilder final {
return *this;
}
+ void AddBaseline(NGBaselineAlgorithmType, FontBaseline, LayoutUnit);
cbiesinger 2017/07/12 15:48:44 Could you add some brief documentation for how thi
kojii 2017/07/12 18:21:53 Thank you for pointing this out. I was caring comm
+
private:
// An out-of-flow positioned-candidate is a temporary data structure used
// within the NGFragmentBuilder.
@@ -187,6 +193,8 @@ class CORE_EXPORT NGFragmentBuilder final {
WTF::Optional<NGLogicalOffset> bfc_offset_;
NGMarginStrut end_margin_strut_;
+ Vector<NGBaseline> baselines_;
+
NGBorderEdges border_edges_;
};

Powered by Google App Engine
This is Rietveld 408576698