~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/platform/graphics/Font.h

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#ifndef Font_h
26
26
#define Font_h
27
27
 
 
28
#include "CharacterNames.h"
28
29
#include "TextRun.h"
29
30
#include "FontDescription.h"
30
31
#include "SimpleFontData.h"
31
32
#include <wtf/HashMap.h>
 
33
#include <wtf/HashSet.h>
32
34
#include <wtf/MathExtras.h>
33
35
 
34
36
#if PLATFORM(QT)
175
177
    static bool treatAsSpace(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == 0x00A0; }
176
178
    static bool treatAsZeroWidthSpace(UChar c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == 0x200e || c == 0x200f || (c >= 0x202a && c <= 0x202e) || c == 0xFFFC; }
177
179
 
 
180
    static inline UChar normalizeSpaces(UChar character)
 
181
    {
 
182
        if (treatAsSpace(character))
 
183
            return space;
 
184
 
 
185
        if (treatAsZeroWidthSpace(character))
 
186
            return zeroWidthSpace;
 
187
 
 
188
        return character;
 
189
    }
 
190
 
 
191
    static String normalizeSpaces(const String&);
 
192
 
178
193
#if ENABLE(SVG_FONTS)
179
194
    bool isSVGFont() const;
180
195
    SVGFontElement* svgFont() const;