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

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

Issue 2597823004: WIP version of new margin collapsing logic + support of empty blocks with floats
Patch Set: 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..52ff3417eeaec86aa566c6283a8bafe906a7a6c4 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,17 @@
namespace blink {
-NGDeprecatedMarginStrut NGBoxFragment::MarginStrut() const {
+const WTF::Optional<NGLogicalOffset>& NGBoxFragment::BfcOffset() const {
+ // TODO(glebl): should respect the writing mode here.
+ 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