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

Side by Side Diff: Source/core/svg/SVGFontFaceElement.cpp

Issue 209433004: Do not zero-initialize RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compilation on gcc and msvc Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/svg/SVGFontFaceSrcElement.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) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 270
271 void SVGFontFaceElement::rebuildFontFace() 271 void SVGFontFaceElement::rebuildFontFace()
272 { 272 {
273 if (!inDocument()) { 273 if (!inDocument()) {
274 ASSERT(!m_fontElement); 274 ASSERT(!m_fontElement);
275 return; 275 return;
276 } 276 }
277 277
278 bool describesParentFont = isSVGFontElement(*parentNode()); 278 bool describesParentFont = isSVGFontElement(*parentNode());
279 RefPtrWillBeRawPtr<CSSValueList> list; 279 RefPtrWillBeRawPtr<CSSValueList> list = nullptr;
280 280
281 if (describesParentFont) { 281 if (describesParentFont) {
282 m_fontElement = toSVGFontElement(parentNode()); 282 m_fontElement = toSVGFontElement(parentNode());
283 283
284 list = CSSValueList::createCommaSeparated(); 284 list = CSSValueList::createCommaSeparated();
285 list->append(CSSFontFaceSrcValue::createLocal(fontFamily())); 285 list->append(CSSFontFaceSrcValue::createLocal(fontFamily()));
286 } else { 286 } else {
287 m_fontElement = 0; 287 m_fontElement = 0;
288 // we currently ignore all but the last src element, alternatively we co uld concat them 288 // we currently ignore all but the last src element, alternatively we co uld concat them
289 if (SVGFontFaceSrcElement* element = Traversal<SVGFontFaceSrcElement>::l astChild(*this)) 289 if (SVGFontFaceSrcElement* element = Traversal<SVGFontFaceSrcElement>::l astChild(*this))
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta) 348 void SVGFontFaceElement::childrenChanged(bool changedByParser, Node* beforeChang e, Node* afterChange, int childCountDelta)
349 { 349 {
350 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta); 350 SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, chil dCountDelta);
351 rebuildFontFace(); 351 rebuildFontFace();
352 } 352 }
353 353
354 } // namespace WebCore 354 } // namespace WebCore
355 355
356 #endif // ENABLE(SVG_FONTS) 356 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/svg/SVGFontFaceSrcElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698