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

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

Issue 1891473002: WTF: Implement explicit RefPtr::operator bool. (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) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 UnicodeRange range(from, to); 61 UnicodeRange range(from, to);
62 Vector<UnicodeRange> rangeVector; 62 Vector<UnicodeRange> rangeVector;
63 rangeVector.append(range); 63 rangeVector.append(range);
64 m_rangeSet = adoptRef(new UnicodeRangeSet(rangeVector)); 64 m_rangeSet = adoptRef(new UnicodeRangeSet(rangeVector));
65 } 65 }
66 66
67 67
68 bool contains(UChar32 testChar) const { return m_rangeSet->contains(testChar ); } 68 bool contains(UChar32 testChar) const { return m_rangeSet->contains(testChar ); }
69 bool isEntireRange() const { return m_rangeSet->isEntireRange(); } 69 bool isEntireRange() const { return m_rangeSet->isEntireRange(); }
70 PassRefPtr<UnicodeRangeSet> ranges() const { return m_rangeSet; } 70 PassRefPtr<UnicodeRangeSet> ranges() const { return m_rangeSet; }
71 bool hasFontData() const { return fontData(); } 71 bool hasFontData() const { return m_fontData.get(); }
72 PassRefPtr<SimpleFontData> fontData() const { return m_fontData; } 72 PassRefPtr<SimpleFontData> fontData() const { return m_fontData; }
73 73
74 private: 74 private:
75 RefPtr<SimpleFontData> m_fontData; 75 RefPtr<SimpleFontData> m_fontData;
76 RefPtr<UnicodeRangeSet> m_rangeSet; 76 RefPtr<UnicodeRangeSet> m_rangeSet;
77 }; 77 };
78 78
79 } // namespace blink 79 } // namespace blink
80 80
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/PODRedBlackTree.h ('k') | third_party/WebKit/Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698