| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 m_standardFontFamilyMap = other.m_standardFontFamilyMap; | 47 m_standardFontFamilyMap = other.m_standardFontFamilyMap; |
| 48 m_serifFontFamilyMap = other.m_serifFontFamilyMap; | 48 m_serifFontFamilyMap = other.m_serifFontFamilyMap; |
| 49 m_fixedFontFamilyMap = other.m_fixedFontFamilyMap; | 49 m_fixedFontFamilyMap = other.m_fixedFontFamilyMap; |
| 50 m_sansSerifFontFamilyMap = other.m_sansSerifFontFamilyMap; | 50 m_sansSerifFontFamilyMap = other.m_sansSerifFontFamilyMap; |
| 51 m_cursiveFontFamilyMap = other.m_cursiveFontFamilyMap; | 51 m_cursiveFontFamilyMap = other.m_cursiveFontFamilyMap; |
| 52 m_fantasyFontFamilyMap = other.m_fantasyFontFamilyMap; | 52 m_fantasyFontFamilyMap = other.m_fantasyFontFamilyMap; |
| 53 m_pictographFontFamilyMap = other.m_pictographFontFamilyMap; | 53 m_pictographFontFamilyMap = other.m_pictographFontFamilyMap; |
| 54 return *this; | 54 return *this; |
| 55 } | 55 } |
| 56 | 56 |
| 57 // Sets the entry in the font map for the given script. If family is the empty s
tring, removes the entry instead. | 57 // Sets the entry in the font map for the given script. If family is the empty |
| 58 // string, removes the entry instead. |
| 58 void GenericFontFamilySettings::setGenericFontFamilyMap( | 59 void GenericFontFamilySettings::setGenericFontFamilyMap( |
| 59 ScriptFontFamilyMap& fontMap, | 60 ScriptFontFamilyMap& fontMap, |
| 60 const AtomicString& family, | 61 const AtomicString& family, |
| 61 UScriptCode script) { | 62 UScriptCode script) { |
| 62 ScriptFontFamilyMap::iterator it = fontMap.find(static_cast<int>(script)); | 63 ScriptFontFamilyMap::iterator it = fontMap.find(static_cast<int>(script)); |
| 63 if (family.isEmpty()) { | 64 if (family.isEmpty()) { |
| 64 if (it == fontMap.end()) | 65 if (it == fontMap.end()) |
| 65 return; | 66 return; |
| 66 fontMap.remove(it); | 67 fontMap.remove(it); |
| 67 } else if (it != fontMap.end() && it->value == family) { | 68 } else if (it != fontMap.end() && it->value == family) { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 m_standardFontFamilyMap.clear(); | 177 m_standardFontFamilyMap.clear(); |
| 177 m_serifFontFamilyMap.clear(); | 178 m_serifFontFamilyMap.clear(); |
| 178 m_fixedFontFamilyMap.clear(); | 179 m_fixedFontFamilyMap.clear(); |
| 179 m_sansSerifFontFamilyMap.clear(); | 180 m_sansSerifFontFamilyMap.clear(); |
| 180 m_cursiveFontFamilyMap.clear(); | 181 m_cursiveFontFamilyMap.clear(); |
| 181 m_fantasyFontFamilyMap.clear(); | 182 m_fantasyFontFamilyMap.clear(); |
| 182 m_pictographFontFamilyMap.clear(); | 183 m_pictographFontFamilyMap.clear(); |
| 183 } | 184 } |
| 184 | 185 |
| 185 } // namespace blink | 186 } // namespace blink |
| OLD | NEW |