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

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

Issue 2368153003: Compute margin block start for 1st block in LayoutNG root constraint space (Closed)
Patch Set: Get IsNewBfc from layout_box->createsNewFormattingContext() Created 4 years, 3 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_constraint_space.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
index 67bc21fa2adbaef016fcbaebcc1e4d8d042e7609..849dcc776a28c148da8e8ccc38cbfe6b57ee0564 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
@@ -85,6 +85,10 @@ class CORE_EXPORT NGConstraintSpace final
// return the size of the layout opportunity.
virtual NGLogicalSize Size() const { return size_; }
+ // Whether the current constraint space is for the newly established Block
+ // Formatting Context(BFC).
+ bool IsNewBfc() const { return is_new_bfc_; }
ikilpatrick 2016/09/29 00:18:11 thought we were just going to have a method on NGB
Gleb Lanbin 2016/09/29 17:11:15 Acknowledged.
+
// Whether exceeding the containerSize triggers the presence of a scrollbar
// for the indicated direction.
// If exceeded the current layout should be aborted and invoked again with a
@@ -119,6 +123,7 @@ class CORE_EXPORT NGConstraintSpace final
void SetOverflowTriggersScrollbar(bool inlineTriggers, bool blockTriggers);
void SetFixedSize(bool inlineFixed, bool blockFixed);
void SetFragmentationType(NGFragmentationType);
+ void SetIsNewBfc(bool is_new_bfc) { is_new_bfc_ = is_new_bfc; }
String ToString() const;
@@ -128,6 +133,9 @@ class CORE_EXPORT NGConstraintSpace final
NGLogicalSize size_;
unsigned writing_mode_ : 3;
unsigned direction_ : 1;
+ // Whether the current constraint space is for the newly established Block
+ // Formatting Context(BFC).
+ bool is_new_bfc_ : 1;
};
inline std::ostream& operator<<(std::ostream& stream,

Powered by Google App Engine
This is Rietveld 408576698