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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp

Issue 1808853002: Move UnicodeRangeSet to platform/fonts (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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return; 99 return;
100 100
101 if (it == m_firstNonCssConnectedFace) 101 if (it == m_firstNonCssConnectedFace)
102 ++m_firstNonCssConnectedFace; 102 ++m_firstNonCssConnectedFace;
103 m_fontFaces.remove(it); 103 m_fontFaces.remove(it);
104 104
105 pruneTable(); 105 pruneTable();
106 fontFace->cssFontFace()->clearSegmentedFontFace(); 106 fontFace->cssFontFace()->clearSegmentedFontFace();
107 } 107 }
108 108
109 static void appendFontData(SegmentedFontData* newFontData, PassRefPtr<SimpleFont Data> prpFaceFontData, const CSSFontFace::UnicodeRangeSet& ranges) 109 static void appendFontData(SegmentedFontData* newFontData, PassRefPtr<SimpleFont Data> prpFaceFontData, const UnicodeRangeSet& ranges)
110 { 110 {
111 RefPtr<SimpleFontData> faceFontData = prpFaceFontData; 111 RefPtr<SimpleFontData> faceFontData = prpFaceFontData;
112 unsigned numRanges = ranges.size(); 112 unsigned numRanges = ranges.size();
113 if (!numRanges) { 113 if (!numRanges) {
114 newFontData->appendRange(FontDataRange(0, 0x7FFFFFFF, faceFontData)); 114 newFontData->appendRange(FontDataRange(0, 0x7FFFFFFF, faceFontData));
115 return; 115 return;
116 } 116 }
117 117
118 for (unsigned j = 0; j < numRanges; ++j) 118 for (unsigned j = 0; j < numRanges; ++j)
119 newFontData->appendRange(FontDataRange(ranges.rangeAt(j).from(), ranges. rangeAt(j).to(), faceFontData)); 119 newFontData->appendRange(FontDataRange(ranges.rangeAt(j).from(), ranges. rangeAt(j).to(), faceFontData));
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 DEFINE_TRACE(CSSSegmentedFontFace) 195 DEFINE_TRACE(CSSSegmentedFontFace)
196 { 196 {
197 #if ENABLE(OILPAN) 197 #if ENABLE(OILPAN)
198 visitor->trace(m_fontSelector); 198 visitor->trace(m_fontSelector);
199 visitor->trace(m_fontFaces); 199 visitor->trace(m_fontFaces);
200 #endif 200 #endif
201 } 201 }
202 202
203 } // namespace blink 203 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFaceTest.cpp ('k') | third_party/WebKit/Source/core/css/FontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698