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

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

Issue 2912273002: [LayoutNG] Logicalize NGPaintBorderEdge (Closed)
Patch Set: Rebase, Edge -> Edges Created 3 years, 7 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/geometry/ng_border_edges.h
diff --git a/third_party/WebKit/Source/core/layout/ng/geometry/ng_border_edges.h b/third_party/WebKit/Source/core/layout/ng/geometry/ng_border_edges.h
new file mode 100644
index 0000000000000000000000000000000000000000..db3e57b3e3b34d63741f1229f448e6b3613647d8
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/geometry/ng_border_edges.h
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NGBorderEdges_h
+#define NGBorderEdges_h
+
+#include "core/CoreExport.h"
+#include "core/layout/ng/ng_writing_mode.h"
+
+namespace blink {
+
+namespace NGBorderEdges {
+
+// Which border edges should be painted. Due to fragmentation one or more may
+// be skipped.
+enum Physical { kTop = 1, kRight = 2, kBottom = 4, kLeft = 8 };
+
+enum Logical {
+ kBlockStart = Physical::kTop,
+ kLineRight = Physical::kRight,
+ kBlockEnd = Physical::kBottom,
+ kLineLeft = Physical::kLeft,
+ kAll = kBlockStart | kLineRight | kBlockEnd | kLineLeft
+};
+
+CORE_EXPORT Physical ToPhysical(Logical, NGWritingMode);
+CORE_EXPORT Logical ToLogical(Physical, NGWritingMode);
+
+} // namespace NGBorderEdges
+
+} // namespace blink
+
+#endif // NGBorderEdges_h

Powered by Google App Engine
This is Rietveld 408576698