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

Unified Diff: third_party/WebKit/Source/platform/fonts/UnicodeRangeSet.h

Issue 1806363002: Revert of Shape unicode-range: font faces in only one iteration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/UnicodeRangeSet.h
diff --git a/third_party/WebKit/Source/platform/fonts/UnicodeRangeSet.h b/third_party/WebKit/Source/platform/fonts/UnicodeRangeSet.h
index e39e655c862579f370b5159079565be5334177e7..465358fb72b9868f9c9db7f447f687a43a37af3a 100644
--- a/third_party/WebKit/Source/platform/fonts/UnicodeRangeSet.h
+++ b/third_party/WebKit/Source/platform/fonts/UnicodeRangeSet.h
@@ -27,16 +27,13 @@
#define UnicodeRangeSet_h
#include "platform/PlatformExport.h"
+#include "platform/fonts/FontDataRange.h"
#include "wtf/Allocator.h"
-#include "wtf/RefCounted.h"
-#include "wtf/Vector.h"
-#include "wtf/text/CharacterNames.h"
#include "wtf/text/Unicode.h"
-#include "wtf/text/WTFString.h"
namespace blink {
-struct PLATFORM_EXPORT UnicodeRange final {
+struct PLATFORM_EXPORT UnicodeRange {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
UnicodeRange(UChar32 from, UChar32 to)
: m_from(from)
@@ -52,9 +49,10 @@
return m_from < other.m_from;
}
bool operator<(UChar32 c) const { return m_to < c; }
- bool operator==(const UnicodeRange& other) const
+ bool operator==(const FontDataRange& fontDataRange) const
{
- return other.m_from == m_from && other.m_to == m_to;
+ return fontDataRange.from() == m_from
+ && fontDataRange.to() == m_to;
};
private:
@@ -62,17 +60,17 @@
UChar32 m_to;
};
-class PLATFORM_EXPORT UnicodeRangeSet : public RefCounted<UnicodeRangeSet> {
+class PLATFORM_EXPORT UnicodeRangeSet {
+ DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
+
public:
explicit UnicodeRangeSet(const Vector<UnicodeRange>&);
- UnicodeRangeSet() { };
bool contains(UChar32) const;
+ bool contains(const FontDataRange&) const;
bool intersectsWith(const String&) const;
bool isEntireRange() const { return m_ranges.isEmpty(); }
size_t size() const { return m_ranges.size(); }
const UnicodeRange& rangeAt(size_t i) const { return m_ranges[i]; }
- bool operator==(const UnicodeRangeSet& other) const;
-
private:
Vector<UnicodeRange> m_ranges; // If empty, represents the whole code space.
};

Powered by Google App Engine
This is Rietveld 408576698