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

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

Issue 6469011: Merge 76990 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « Source/WebCore/svg/SVGFontFaceElement.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 /* 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 // Match Batiks default value 255 // Match Batiks default value
256 return static_cast<int>(ceilf(unitsPerEm() * 0.2f)); 256 return static_cast<int>(ceilf(unitsPerEm() * 0.2f));
257 } 257 }
258 258
259 String SVGFontFaceElement::fontFamily() const 259 String SVGFontFaceElement::fontFamily() const
260 { 260 {
261 return m_styleDeclaration->getPropertyValue(CSSPropertyFontFamily); 261 return m_styleDeclaration->getPropertyValue(CSSPropertyFontFamily);
262 } 262 }
263 263
264 SVGFontElement* SVGFontFaceElement::associatedFontElement() const
265 {
266 return m_fontElement.get();
267 }
268
264 void SVGFontFaceElement::rebuildFontFace() 269 void SVGFontFaceElement::rebuildFontFace()
265 { 270 {
266 if (!inDocument()) 271 if (!inDocument())
267 return; 272 return;
268 273
269 // we currently ignore all but the first src element, alternatively we could concat them 274 // we currently ignore all but the first src element, alternatively we could concat them
270 SVGFontFaceSrcElement* srcElement = 0; 275 SVGFontFaceSrcElement* srcElement = 0;
271 276
272 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi bling()) { 277 for (Node* child = firstChild(); child && !srcElement; child = child->nextSi bling()) {
273 if (child->hasTagName(font_face_srcTag)) 278 if (child->hasTagName(font_face_srcTag))
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 mappedElementSheet->remove(i); 347 mappedElementSheet->remove(i);
343 break; 348 break;
344 } 349 }
345 } 350 }
346 document()->styleSelectorChanged(DeferRecalcStyle); 351 document()->styleSelectorChanged(DeferRecalcStyle);
347 } 352 }
348 353
349 } // namespace WebCore 354 } // namespace WebCore
350 355
351 #endif // ENABLE(SVG_FONTS) 356 #endif // ENABLE(SVG_FONTS)
OLDNEW
« no previous file with comments | « Source/WebCore/svg/SVGFontFaceElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698