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

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

Issue 2797053002: Remove redundant casts, use NGLayoutInputNode base functions everywhere (Closed)
Patch Set: Created 3 years, 8 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_break_token.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_break_token.h b/third_party/WebKit/Source/core/layout/ng/ng_break_token.h
index ae486ff8763957c0c76a1e0757207e501cac135a..4b0b0e2973159e9a64aeb16dfea63bf2c3bf9057 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_break_token.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_break_token.h
@@ -38,6 +38,9 @@ class CORE_EXPORT NGBreakToken : public RefCounted<NGBreakToken> {
enum NGBreakTokenType { kBlockBreakToken, kInlineBreakToken };
NGBreakTokenType Type() const { return static_cast<NGBreakTokenType>(type_); }
+ bool IsBlockType() const { return Type() == kBlockBreakToken; }
+ bool IsInlineType() const { return Type() == kInlineBreakToken; }
+
enum NGBreakTokenStatus { kUnfinished, kFinished };
// Whether the layout node cannot produce any more fragments.

Powered by Google App Engine
This is Rietveld 408576698