| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 : m_status(Unloaded) | 129 : m_status(Unloaded) |
| 130 { | 130 { |
| 131 } | 131 } |
| 132 | 132 |
| 133 FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const
Dictionary& descriptors) | 133 FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const
Dictionary& descriptors) |
| 134 : m_family(family) | 134 : m_family(family) |
| 135 , m_status(Unloaded) | 135 , m_status(Unloaded) |
| 136 { | 136 { |
| 137 Document* document = toDocument(context); | 137 Document* document = toDocument(context); |
| 138 String value; | 138 String value; |
| 139 if (DictionaryHelper::get(descriptors, "style", value)) | 139 if (descriptors.get("style", value)) |
| 140 setPropertyFromString(document, value, CSSPropertyFontStyle); | 140 setPropertyFromString(document, value, CSSPropertyFontStyle); |
| 141 if (DictionaryHelper::get(descriptors, "weight", value)) | 141 if (descriptors.get("weight", value)) |
| 142 setPropertyFromString(document, value, CSSPropertyFontWeight); | 142 setPropertyFromString(document, value, CSSPropertyFontWeight); |
| 143 if (DictionaryHelper::get(descriptors, "stretch", value)) | 143 if (descriptors.get("stretch", value)) |
| 144 setPropertyFromString(document, value, CSSPropertyFontStretch); | 144 setPropertyFromString(document, value, CSSPropertyFontStretch); |
| 145 if (DictionaryHelper::get(descriptors, "unicodeRange", value)) | 145 if (descriptors.get("unicodeRange", value)) |
| 146 setPropertyFromString(document, value, CSSPropertyUnicodeRange); | 146 setPropertyFromString(document, value, CSSPropertyUnicodeRange); |
| 147 if (DictionaryHelper::get(descriptors, "variant", value)) | 147 if (descriptors.get("variant", value)) |
| 148 setPropertyFromString(document, value, CSSPropertyFontVariant); | 148 setPropertyFromString(document, value, CSSPropertyFontVariant); |
| 149 if (DictionaryHelper::get(descriptors, "featureSettings", value)) | 149 if (descriptors.get("featureSettings", value)) |
| 150 setPropertyFromString(document, value, CSSPropertyWebkitFontFeatureSetti
ngs); | 150 setPropertyFromString(document, value, CSSPropertyWebkitFontFeatureSetti
ngs); |
| 151 } | 151 } |
| 152 | 152 |
| 153 FontFace::~FontFace() | 153 FontFace::~FontFace() |
| 154 { | 154 { |
| 155 } | 155 } |
| 156 | 156 |
| 157 String FontFace::style() const | 157 String FontFace::style() const |
| 158 { | 158 { |
| 159 return m_style ? m_style->cssText() : "normal"; | 159 return m_style ? m_style->cssText() : "normal"; |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 visitor->trace(m_cssFontFace); | 591 visitor->trace(m_cssFontFace); |
| 592 visitor->trace(m_callbacks); | 592 visitor->trace(m_callbacks); |
| 593 } | 593 } |
| 594 | 594 |
| 595 bool FontFace::hadBlankText() const | 595 bool FontFace::hadBlankText() const |
| 596 { | 596 { |
| 597 return m_cssFontFace->hadBlankText(); | 597 return m_cssFontFace->hadBlankText(); |
| 598 } | 598 } |
| 599 | 599 |
| 600 } // namespace blink | 600 } // namespace blink |
| OLD | NEW |