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

Side by Side Diff: third_party/WebKit/Source/core/style/AppliedTextDecoration.cpp

Issue 2845773002: Make TextDecoration an enum class. (Closed)
Patch Set: Address comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/style/AppliedTextDecoration.h" 5 #include "core/style/AppliedTextDecoration.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 AppliedTextDecoration::AppliedTextDecoration(TextDecoration line, 9 AppliedTextDecoration::AppliedTextDecoration(TextDecoration line,
10 TextDecorationStyle style, 10 TextDecorationStyle style,
11 Color color) 11 Color color)
12 : lines_(line), style_(style), color_(color) {} 12 : lines_(static_cast<unsigned>(line)), style_(style), color_(color) {}
Bugs Nash 2017/04/27 00:53:54 Hm. I think this would be better changes to TextDe
shend 2017/04/27 01:09:17 Hmm, I don't think we can store it as TextDecorati
Bugs Nash 2017/04/27 01:59:30 would changing the type of TextDecoration from the
13 13
14 bool AppliedTextDecoration::operator==(const AppliedTextDecoration& o) const { 14 bool AppliedTextDecoration::operator==(const AppliedTextDecoration& o) const {
15 return color_ == o.color_ && lines_ == o.lines_ && style_ == o.style_; 15 return color_ == o.color_ && lines_ == o.lines_ && style_ == o.style_;
16 } 16 }
17 17
18 } // namespace blink 18 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698