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

Side by Side Diff: sky/engine/core/css/FontFace.cpp

Issue 706123005: Remove nop ScriptWrappable::init calls (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/css/DOMWindowCSS.h ('k') | sky/engine/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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 && fontFace->traits().bitfield()) { 119 && fontFace->traits().bitfield()) {
120 fontFace->initCSSFontFace(document, src); 120 fontFace->initCSSFontFace(document, src);
121 return fontFace.release(); 121 return fontFace.release();
122 } 122 }
123 return nullptr; 123 return nullptr;
124 } 124 }
125 125
126 FontFace::FontFace() 126 FontFace::FontFace()
127 : m_status(Unloaded) 127 : m_status(Unloaded)
128 { 128 {
129 ScriptWrappable::init(this);
130 } 129 }
131 130
132 FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const Dictionary& descriptors) 131 FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const Dictionary& descriptors)
133 : m_family(family) 132 : m_family(family)
134 , m_status(Unloaded) 133 , m_status(Unloaded)
135 { 134 {
136 ScriptWrappable::init(this);
137
138 Document* document = toDocument(context); 135 Document* document = toDocument(context);
139 String value; 136 String value;
140 if (DictionaryHelper::get(descriptors, "style", value)) 137 if (DictionaryHelper::get(descriptors, "style", value))
141 setPropertyFromString(document, value, CSSPropertyFontStyle); 138 setPropertyFromString(document, value, CSSPropertyFontStyle);
142 if (DictionaryHelper::get(descriptors, "weight", value)) 139 if (DictionaryHelper::get(descriptors, "weight", value))
143 setPropertyFromString(document, value, CSSPropertyFontWeight); 140 setPropertyFromString(document, value, CSSPropertyFontWeight);
144 if (DictionaryHelper::get(descriptors, "stretch", value)) 141 if (DictionaryHelper::get(descriptors, "stretch", value))
145 setPropertyFromString(document, value, CSSPropertyFontStretch); 142 setPropertyFromString(document, value, CSSPropertyFontStretch);
146 if (DictionaryHelper::get(descriptors, "unicodeRange", value)) 143 if (DictionaryHelper::get(descriptors, "unicodeRange", value))
147 setPropertyFromString(document, value, CSSPropertyUnicodeRange); 144 setPropertyFromString(document, value, CSSPropertyUnicodeRange);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 setError(DOMException::create(SyntaxError, "Invalid font data in ArrayBu ffer.")); 545 setError(DOMException::create(SyntaxError, "Invalid font data in ArrayBu ffer."));
549 m_cssFontFace->addSource(source.release()); 546 m_cssFontFace->addSource(source.release());
550 } 547 }
551 548
552 bool FontFace::hadBlankText() const 549 bool FontFace::hadBlankText() const
553 { 550 {
554 return m_cssFontFace->hadBlankText(); 551 return m_cssFontFace->hadBlankText();
555 } 552 }
556 553
557 } // namespace blink 554 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/DOMWindowCSS.h ('k') | sky/engine/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698