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

Side by Side Diff: Source/core/css/FontFace.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/DOMWindowCSS.h ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 && fontFace->traits().bitfield()) { 121 && fontFace->traits().bitfield()) {
122 fontFace->initCSSFontFace(document, src); 122 fontFace->initCSSFontFace(document, src);
123 return fontFace.release(); 123 return fontFace.release();
124 } 124 }
125 return nullptr; 125 return nullptr;
126 } 126 }
127 127
128 FontFace::FontFace() 128 FontFace::FontFace()
129 : m_status(Unloaded) 129 : m_status(Unloaded)
130 { 130 {
131 ScriptWrappable::init(this);
132 } 131 }
133 132
134 FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const Dictionary& descriptors) 133 FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const Dictionary& descriptors)
135 : m_family(family) 134 : m_family(family)
136 , m_status(Unloaded) 135 , m_status(Unloaded)
137 { 136 {
138 ScriptWrappable::init(this);
139
140 Document* document = toDocument(context); 137 Document* document = toDocument(context);
141 String value; 138 String value;
142 if (DictionaryHelper::get(descriptors, "style", value)) 139 if (DictionaryHelper::get(descriptors, "style", value))
143 setPropertyFromString(document, value, CSSPropertyFontStyle); 140 setPropertyFromString(document, value, CSSPropertyFontStyle);
144 if (DictionaryHelper::get(descriptors, "weight", value)) 141 if (DictionaryHelper::get(descriptors, "weight", value))
145 setPropertyFromString(document, value, CSSPropertyFontWeight); 142 setPropertyFromString(document, value, CSSPropertyFontWeight);
146 if (DictionaryHelper::get(descriptors, "stretch", value)) 143 if (DictionaryHelper::get(descriptors, "stretch", value))
147 setPropertyFromString(document, value, CSSPropertyFontStretch); 144 setPropertyFromString(document, value, CSSPropertyFontStretch);
148 if (DictionaryHelper::get(descriptors, "unicodeRange", value)) 145 if (DictionaryHelper::get(descriptors, "unicodeRange", value))
149 setPropertyFromString(document, value, CSSPropertyUnicodeRange); 146 setPropertyFromString(document, value, CSSPropertyUnicodeRange);
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 visitor->trace(m_cssFontFace); 591 visitor->trace(m_cssFontFace);
595 visitor->trace(m_callbacks); 592 visitor->trace(m_callbacks);
596 } 593 }
597 594
598 bool FontFace::hadBlankText() const 595 bool FontFace::hadBlankText() const
599 { 596 {
600 return m_cssFontFace->hadBlankText(); 597 return m_cssFontFace->hadBlankText();
601 } 598 }
602 599
603 } // namespace blink 600 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/DOMWindowCSS.h ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698