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

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

Issue 2540653003: Implement collection of out-of-flow descendants (Closed)
Patch Set: Removed unused members from block_layout Created 4 years 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_units.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
index 2e515a8c53e60806a6cae10ef86e47ff8be4b791..9309699eef3b40391bf6f3a0ad205d62ce6de6f4 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -226,4 +226,27 @@ bool NGMarginStrut::operator==(const NGMarginStrut& other) const {
negative_margin_block_start, negative_margin_block_end);
}
+NGCorner NGCorner::Create(NGWritingMode writing_mode,
+ TextDirection direction,
+ NGPhysicalOffset offset) {
+ NGCorner c;
+ c.offset = offset;
+ switch (writing_mode) {
+ case kHorizontalTopBottom:
+ c.type = (direction == LTR) ? kTopLeft : kTopRight;
+ break;
+ case kVerticalRightLeft:
+ case kSidewaysRightLeft:
+ c.type = (direction == LTR) ? kTopRight : kBottomRight;
+ break;
+ case kVerticalLeftRight:
+ c.type = (direction == LTR) ? kTopLeft : kBottomLeft;
+ break;
+ case kSidewaysLeftRight:
+ c.type = (direction == LTR) ? kBottomLeft : kTopLeft;
+ break;
+ }
+ return c;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698