| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 static inline const SVGFontData* svgFontAndFontFaceElementForFontData(const Simp
leFontData* fontData, SVGFontFaceElement*& fontFace, SVGFontElement*& font) | 39 static inline const SVGFontData* svgFontAndFontFaceElementForFontData(const Simp
leFontData* fontData, SVGFontFaceElement*& fontFace, SVGFontElement*& font) |
| 40 { | 40 { |
| 41 ASSERT(fontData); | 41 ASSERT(fontData); |
| 42 ASSERT(fontData->isCustomFont()); | 42 ASSERT(fontData->isCustomFont()); |
| 43 ASSERT(fontData->isSVGFont()); | 43 ASSERT(fontData->isSVGFont()); |
| 44 | 44 |
| 45 RefPtr<CustomFontData> customFontData = fontData->customFontData(); | 45 RefPtr<CustomFontData> customFontData = fontData->customFontData(); |
| 46 const SVGFontData* svgFontData = static_cast<const SVGFontData*>(customFontD
ata.get()); | 46 const SVGFontData* svgFontData = toSVGFontData(customFontData); |
| 47 | 47 |
| 48 // FIXME crbug.com/359380 : The current editing impl references the font aft
er the svg font nodes are removed. | 48 // FIXME crbug.com/359380 : The current editing impl references the font aft
er the svg font nodes are removed. |
| 49 if (svgFontData->shouldSkipDrawing()) | 49 if (svgFontData->shouldSkipDrawing()) |
| 50 return 0; | 50 return 0; |
| 51 | 51 |
| 52 fontFace = svgFontData->svgFontFaceElement(); | 52 fontFace = svgFontData->svgFontFaceElement(); |
| 53 ASSERT(fontFace); | 53 ASSERT(fontFace); |
| 54 | 54 |
| 55 font = fontFace->associatedFontElement(); | 55 font = fontFace->associatedFontElement(); |
| 56 return svgFontData; | 56 return svgFontData; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Restore original state of the SVG Font glyph table and the current font f
allback list, | 245 // Restore original state of the SVG Font glyph table and the current font f
allback list, |
| 246 // to assure the next lookup of the same glyph won't immediately return the
fallback glyph. | 246 // to assure the next lookup of the same glyph won't immediately return the
fallback glyph. |
| 247 page->setGlyphDataForCharacter(character, glyphData.glyph, originalFontData)
; | 247 page->setGlyphDataForCharacter(character, glyphData.glyph, originalFontData)
; |
| 248 ASSERT(fallbackGlyphData.fontData); | 248 ASSERT(fallbackGlyphData.fontData); |
| 249 return fallbackGlyphData; | 249 return fallbackGlyphData; |
| 250 } | 250 } |
| 251 | 251 |
| 252 } | 252 } |
| 253 | 253 |
| 254 #endif | 254 #endif |
| OLD | NEW |