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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontFeatureSettings.h

Issue 1887613002: Compare font-feature-settings as part of Font::operator==(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 22 matching lines...) Expand all
33 #include "wtf/RefPtr.h" 33 #include "wtf/RefPtr.h"
34 #include "wtf/Vector.h" 34 #include "wtf/Vector.h"
35 #include "wtf/text/AtomicString.h" 35 #include "wtf/text/AtomicString.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class PLATFORM_EXPORT FontFeature { 39 class PLATFORM_EXPORT FontFeature {
40 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 40 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
41 public: 41 public:
42 FontFeature(const AtomicString& tag, int value); 42 FontFeature(const AtomicString& tag, int value);
43 bool operator==(const FontFeature&); 43 bool operator==(const FontFeature&) const;
44 44
45 const AtomicString& tag() const { return m_tag; } 45 const AtomicString& tag() const { return m_tag; }
46 int value() const { return m_value; } 46 int value() const { return m_value; }
47 47
48 private: 48 private:
49 AtomicString m_tag; 49 AtomicString m_tag;
50 const int m_value; 50 const int m_value;
51 }; 51 };
52 52
53 class PLATFORM_EXPORT FontFeatureSettings : public RefCounted<FontFeatureSetting s> { 53 class PLATFORM_EXPORT FontFeatureSettings : public RefCounted<FontFeatureSetting s> {
54 WTF_MAKE_NONCOPYABLE(FontFeatureSettings); 54 WTF_MAKE_NONCOPYABLE(FontFeatureSettings);
55 public: 55 public:
56 static PassRefPtr<FontFeatureSettings> create() 56 static PassRefPtr<FontFeatureSettings> create()
57 { 57 {
58 return adoptRef(new FontFeatureSettings()); 58 return adoptRef(new FontFeatureSettings());
59 } 59 }
60 void append(const FontFeature& feature) { m_list.append(feature); } 60 void append(const FontFeature& feature) { m_list.append(feature); }
61 size_t size() const { return m_list.size(); } 61 size_t size() const { return m_list.size(); }
62 const FontFeature& operator[](int index) const { return m_list[index]; } 62 const FontFeature& operator[](int index) const { return m_list[index]; }
63 const FontFeature& at(size_t index) const { return m_list.at(index); } 63 const FontFeature& at(size_t index) const { return m_list.at(index); }
64 bool operator==(const FontFeatureSettings&) const;
64 65
65 private: 66 private:
66 FontFeatureSettings(); 67 FontFeatureSettings();
67 Vector<FontFeature> m_list; 68 Vector<FontFeature> m_list;
68 }; 69 };
69 70
70 } // namespace blink 71 } // namespace blink
71 72
72 #endif // FontFeatureSettings_h 73 #endif // FontFeatureSettings_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698