OLD | NEW |
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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class SimpleFontData; | 37 class SimpleFontData; |
38 | 38 |
39 class PLATFORM_EXPORT FontDataForRangeSet | 39 class PLATFORM_EXPORT FontDataForRangeSet |
40 : public RefCounted<FontDataForRangeSet> { | 40 : public RefCounted<FontDataForRangeSet> { |
41 public: | 41 public: |
42 explicit FontDataForRangeSet(PassRefPtr<SimpleFontData> fontData = nullptr, | 42 explicit FontDataForRangeSet(PassRefPtr<SimpleFontData> fontData = nullptr, |
43 PassRefPtr<UnicodeRangeSet> rangeSet = nullptr) | 43 PassRefPtr<UnicodeRangeSet> rangeSet = nullptr) |
44 : m_fontData(fontData), m_rangeSet(rangeSet) {} | 44 : m_fontData(std::move(fontData)), m_rangeSet(std::move(rangeSet)) {} |
45 | 45 |
46 FontDataForRangeSet(const FontDataForRangeSet& other); | 46 FontDataForRangeSet(const FontDataForRangeSet& other); |
47 | 47 |
48 virtual ~FontDataForRangeSet(){}; | 48 virtual ~FontDataForRangeSet(){}; |
49 | 49 |
50 bool contains(UChar32 testChar) const { | 50 bool contains(UChar32 testChar) const { |
51 return !m_rangeSet || m_rangeSet->contains(testChar); | 51 return !m_rangeSet || m_rangeSet->contains(testChar); |
52 } | 52 } |
53 bool isEntireRange() const { | 53 bool isEntireRange() const { |
54 return !m_rangeSet || m_rangeSet->isEntireRange(); | 54 return !m_rangeSet || m_rangeSet->isEntireRange(); |
(...skipping 13 matching lines...) Expand all Loading... |
68 explicit FontDataForRangeSetFromCache( | 68 explicit FontDataForRangeSetFromCache( |
69 PassRefPtr<SimpleFontData> fontData, | 69 PassRefPtr<SimpleFontData> fontData, |
70 PassRefPtr<UnicodeRangeSet> rangeSet = nullptr) | 70 PassRefPtr<UnicodeRangeSet> rangeSet = nullptr) |
71 : FontDataForRangeSet(std::move(fontData), std::move(rangeSet)) {} | 71 : FontDataForRangeSet(std::move(fontData), std::move(rangeSet)) {} |
72 virtual ~FontDataForRangeSetFromCache(); | 72 virtual ~FontDataForRangeSetFromCache(); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace blink | 75 } // namespace blink |
76 | 76 |
77 #endif | 77 #endif |
OLD | NEW |