~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#if ENABLE(SVG_FONTS)
25
25
#include "SVGFontFaceElement.h"
 
26
 
26
27
#include "CString.h"
27
28
#include "CSSFontFaceRule.h"
28
29
#include "CSSFontFaceSrcValue.h"
35
36
#include "CSSValueList.h"
36
37
#include "Document.h"
37
38
#include "Font.h"
38
 
#include "SVGDefinitionSrcElement.h"
 
39
#include "MappedAttribute.h"
39
40
#include "SVGFontElement.h"
40
41
#include "SVGFontFaceSrcElement.h"
41
42
#include "SVGGlyphElement.h"
42
43
#include "SVGNames.h"
43
 
 
44
44
#include <math.h>
45
45
 
46
46
namespace WebCore {
276
276
 
277
277
    // we currently ignore all but the first src element, alternatively we could concat them
278
278
    SVGFontFaceSrcElement* srcElement = 0;
279
 
    SVGDefinitionSrcElement* definitionSrc = 0;
280
279
 
281
 
    for (Node* child = firstChild(); child; child = child->nextSibling()) {
282
 
        if (child->hasTagName(font_face_srcTag) && !srcElement)
 
280
    for (Node* child = firstChild(); child && !srcElement; child = child->nextSibling()) {
 
281
        if (child->hasTagName(font_face_srcTag))
283
282
            srcElement = static_cast<SVGFontFaceSrcElement*>(child);
284
 
        else if (child->hasTagName(definition_srcTag) && !definitionSrc)
285
 
            definitionSrc = static_cast<SVGDefinitionSrcElement*>(child);
286
283
    }
287
284
 
288
 
#if 0
289
 
    // @font-face (CSSFontFace) does not yet support definition-src, as soon as it does this code should do the trick!
290
 
    if (definitionSrc)
291
 
        m_styleDeclaration->setProperty(CSSPropertyDefinitionSrc, definitionSrc->getAttribute(XLinkNames::hrefAttr), false);
292
 
#endif
293
 
 
294
285
    bool describesParentFont = parentNode()->hasTagName(fontTag);
295
286
    RefPtr<CSSValueList> list;
296
287