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

Unified Diff: third_party/WebKit/Source/core/css/CSSFontFace.h

Issue 1806653002: Shape unicode-range: font faces in only one iteration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update UnicodeRangeSetTests to RefPtrtr, rm copy constructor and test 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/core/css/CSSFontFace.h
diff --git a/third_party/WebKit/Source/core/css/CSSFontFace.h b/third_party/WebKit/Source/core/css/CSSFontFace.h
index d96e7d408fc03efbb2364bca9003750218fc1eb8..72d9a6557be179cac7416e95de614318df6b30fe 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFace.h
+++ b/third_party/WebKit/Source/core/css/CSSFontFace.h
@@ -48,7 +48,7 @@ class CORE_EXPORT CSSFontFace final : public NoBaseWillBeGarbageCollectedFinaliz
WTF_MAKE_NONCOPYABLE(CSSFontFace);
public:
CSSFontFace(FontFace* fontFace, Vector<UnicodeRange>& ranges)
- : m_ranges(ranges)
+ : m_ranges(adoptRef(new UnicodeRangeSet(ranges)))
, m_segmentedFontFace(nullptr)
, m_fontFace(fontFace)
{
@@ -57,7 +57,7 @@ public:
FontFace* fontFace() const { return m_fontFace; }
- UnicodeRangeSet& ranges() { return m_ranges; }
+ PassRefPtr<UnicodeRangeSet> ranges() { return m_ranges; }
void setSegmentedFontFace(CSSSegmentedFontFace*);
void clearSegmentedFontFace() { m_segmentedFontFace = nullptr; }
@@ -74,7 +74,7 @@ public:
FontFace::LoadStatusType loadStatus() const { return m_fontFace->loadStatus(); }
bool maybeScheduleFontLoad(const FontDescription&, UChar32);
- bool maybeScheduleFontLoad(const FontDescription&, const FontDataRange&);
+ bool maybeScheduleFontLoad(const FontDescription&, const FontDataForRangeSet&);
void load();
void load(const FontDescription&);
@@ -85,7 +85,7 @@ public:
private:
void setLoadStatus(FontFace::LoadStatusType);
- UnicodeRangeSet m_ranges;
+ RefPtr<UnicodeRangeSet> m_ranges;
RawPtrWillBeMember<CSSSegmentedFontFace> m_segmentedFontFace;
WillBeHeapDeque<OwnPtrWillBeMember<CSSFontFaceSource>> m_sources;
RawPtrWillBeMember<FontFace> m_fontFace;

Powered by Google App Engine
This is Rietveld 408576698