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

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

Issue 216563002: [SVG Fonts] Fix <font-face> element leak document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 8 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/svg/SVGFontFaceSource.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #if ENABLE(SVG_FONTS) 7 #if ENABLE(SVG_FONTS)
8 #include "core/svg/SVGFontFaceSource.h" 8 #include "core/svg/SVGFontFaceSource.h"
9 9
10 #include "core/svg/SVGFontData.h" 10 #include "core/svg/SVGFontData.h"
11 #include "core/svg/SVGFontFaceElement.h" 11 #include "core/svg/SVGFontFaceElement.h"
12 #include "platform/fonts/FontDescription.h" 12 #include "platform/fonts/FontDescription.h"
13 #include "platform/fonts/SimpleFontData.h" 13 #include "platform/fonts/SimpleFontData.h"
14 14
15 namespace WebCore { 15 namespace WebCore {
16 16
17 SVGFontFaceSource::SVGFontFaceSource(PassRefPtr<SVGFontFaceElement> element) 17 SVGFontFaceSource::SVGFontFaceSource(SVGFontFaceElement* element)
18 : m_svgFontFaceElement(element) 18 : m_svgFontFaceElement(element)
19 { 19 {
20 } 20 }
21 21
22 PassRefPtr<SimpleFontData> SVGFontFaceSource::createFontData(const FontDescripti on& fontDescription) 22 PassRefPtr<SimpleFontData> SVGFontFaceSource::createFontData(const FontDescripti on& fontDescription)
23 { 23 {
24 return SimpleFontData::create( 24 return SimpleFontData::create(
25 SVGFontData::create(m_svgFontFaceElement.get()), 25 SVGFontData::create(m_svgFontFaceElement),
26 fontDescription.effectiveFontSize(), 26 fontDescription.effectiveFontSize(),
27 fontDescription.isSyntheticBold(), 27 fontDescription.isSyntheticBold(),
28 fontDescription.isSyntheticItalic()); 28 fontDescription.isSyntheticItalic());
29 } 29 }
30 30
31 } // namespace WebCore 31 } // namespace WebCore
32 32
33 #endif // ENABLE(SVG_FONTS) 33 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFontFaceSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698