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

Side by Side Diff: third_party/WebKit/Source/core/style/OutlineValue.h

Issue 2890733002: Make EBorderStyle an enum class. (Closed)
Patch Set: Build for Mac 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 27 matching lines...) Expand all
38 OutlineValue() : offset_(0) {} 38 OutlineValue() : offset_(0) {}
39 39
40 bool operator==(const OutlineValue& o) const { 40 bool operator==(const OutlineValue& o) const {
41 return BorderValue::operator==(o) && offset_ == o.offset_ && 41 return BorderValue::operator==(o) && offset_ == o.offset_ &&
42 is_auto_ == o.is_auto_; 42 is_auto_ == o.is_auto_;
43 } 43 }
44 44
45 bool operator!=(const OutlineValue& o) const { return !(*this == o); } 45 bool operator!=(const OutlineValue& o) const { return !(*this == o); }
46 46
47 bool VisuallyEqual(const OutlineValue& o) const { 47 bool VisuallyEqual(const OutlineValue& o) const {
48 if (style_ == kBorderStyleNone && o.style_ == kBorderStyleNone) 48 if (style_ == static_cast<unsigned>(EBorderStyle::kNone) &&
49 o.style_ == static_cast<unsigned>(EBorderStyle::kNone))
49 return true; 50 return true;
50 return *this == o; 51 return *this == o;
51 } 52 }
52 53
53 int Offset() const { return offset_; } 54 int Offset() const { return offset_; }
54 void SetOffset(int offset) { offset_ = offset; } 55 void SetOffset(int offset) { offset_ = offset; }
55 56
56 private: 57 private:
57 int offset_; 58 int offset_;
58 }; 59 };
59 60
60 } // namespace blink 61 } // namespace blink
61 62
62 #endif // OutlineValue_h 63 #endif // OutlineValue_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyleTest.cpp ('k') | third_party/WebKit/Source/core/style/OutlineValueTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698