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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc

Issue 2655783006: Top down version of algorithm to position margins and floats in LayoutNG (Closed)
Patch Set: git rebase-update Created 3 years, 11 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_box_fragment.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc b/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc
index cda163878d7a046513c72502aa33c946e166e3e8..09855a1a1e66133213b687e55aee5dedb73fb338 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc
@@ -9,12 +9,19 @@
namespace blink {
-NGDeprecatedMarginStrut NGBoxFragment::MarginStrut() const {
+const WTF::Optional<NGLogicalOffset>& NGBoxFragment::BfcOffset() const {
+ WRITING_MODE_IGNORED(
+ "Accessing BFC offset is allowed here because writing"
+ "modes are irrelevant in this case.");
+ return toNGPhysicalBoxFragment(physical_fragment_)->BfcOffset();
+}
+
+const NGMarginStrut& NGBoxFragment::EndMarginStrut() const {
WRITING_MODE_IGNORED(
"Accessing the margin strut is fine here. Changing the writing mode"
- "establishes a new formatting context, for which a margin strut is never"
- "set for a fragment.");
- return toNGPhysicalBoxFragment(physical_fragment_)->MarginStrut();
+ "establishes a new formatting context, for which a margin strut is"
+ "never set for a fragment.");
+ return toNGPhysicalBoxFragment(physical_fragment_)->EndMarginStrut();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698