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

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

Issue 2910133002: [LayoutNG] Handle empty inlines and border edges (Closed)
Patch Set: Rebase Created 3 years, 6 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
index db3e57b3e3b34d63741f1229f448e6b3613647d8..a8194500e6bac21a842ef1ed3bf14ba140f76b32 100644
--- 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
@@ -10,25 +10,36 @@
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
+struct CORE_EXPORT NGBorderEdges {
+ unsigned block_start : 1;
+ unsigned line_right : 1;
+ unsigned block_end : 1;
+ unsigned line_left : 1;
+
+ NGBorderEdges()
+ : block_start(true), line_right(true), block_end(true), line_left(true) {}
+ NGBorderEdges(bool block_start,
+ bool line_right,
+ bool block_end,
+ bool line_left)
+ : block_start(block_start),
+ line_right(line_right),
+ block_end(block_end),
+ line_left(line_left) {}
+
+ enum Physical {
+ kTop = 1,
+ kRight = 2,
+ kBottom = 4,
+ kLeft = 8,
+ kAll = kTop | kRight | kBottom | kLeft
+ };
+ static NGBorderEdges FromPhysical(unsigned, NGWritingMode);
+ unsigned ToPhysical(NGWritingMode) const;
};
-CORE_EXPORT Physical ToPhysical(Logical, NGWritingMode);
-CORE_EXPORT Logical ToLogical(Physical, NGWritingMode);
-
-} // namespace NGBorderEdges
-
} // namespace blink
#endif // NGBorderEdges_h
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/ng/geometry/ng_border_edges.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698