Changeset 47974 in webkit


Ignore:
Timestamp:
Sep 2, 2009 9:32:55 AM (15 years ago)
Author:
yong.li@torchmobile.com
Message:

2009-09-02 Yong Li <yong.li@torchmobile.com>

Reviewed by Adam Barth.

WINCE PORT: font-related build fixes and minor bugfixes
https://bugs.webkit.org/show_bug.cgi?id=27734

  • platform/graphics/FontCache.h: declare functions added in https://bugs.webkit.org/show_bug.cgi?id=27509
  • platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): fix ambiguous overload error in min/max on Windows
  • platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): initialize member vars
  • platform/graphics/SimpleFontData.h: disable unused members on Wince to save space
Location:
trunk/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r47973 r47974  
     12009-09-02 Yong Li <yong.li@torchmobile.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        WINCE PORT: font-related build fixes and minor bugfixes
     6        https://bugs.webkit.org/show_bug.cgi?id=27734
     7
     8        * platform/graphics/FontCache.h: declare functions added in https://bugs.webkit.org/show_bug.cgi?id=27509
     9        * platform/graphics/GlyphPageTreeNode.cpp:
     10        (WebCore::GlyphPageTreeNode::initializePage): fix ambiguous overload error in min/max on Windows
     11        * platform/graphics/SimpleFontData.cpp:
     12        (WebCore::SimpleFontData::SimpleFontData): initialize member vars
     13        * platform/graphics/SimpleFontData.h: disable unused members on Wince to save space
     14
    1152009-09-02  Jeremy Orlow  <jorlow@chromium.org>
    216
  • trunk/WebCore/platform/graphics/FontCache.h

    r44389 r47974  
    11/*
    22 * Copyright (C) 2006, 2008 Apple Computer, Inc.  All rights reserved.
     3 * Copyright (C) 2007-2008 Torch Mobile, Inc.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    6465    void platformInit();
    6566
    66 #if PLATFORM(WIN)
     67#if PLATFORM(WINCE)
     68#if defined(IMLANG_FONT_LINK) && (IMLANG_FONT_LINK == 2)
     69    IMLangFontLink2* getFontLinkInterface();
     70#else
     71    IMLangFontLink* getFontLinkInterface();
     72#endif
     73    static void comInitialize();
     74    static void comUninitialize();
     75#elif PLATFORM(WIN)
    6776    IMLangFontLink2* getFontLinkInterface();
    6877#endif
  • trunk/WebCore/platform/graphics/GlyphPageTreeNode.cpp

    r46388 r47974  
    203203                for (unsigned i = 0; i < numRanges; i++) {
    204204                    const FontDataRange& range = segmentedFontData->rangeAt(i);
    205                     int from = max(0, range.from() - static_cast<int>(start));
    206                     int to = 1 + min(range.to() - static_cast<int>(start), static_cast<int>(GlyphPage::size) - 1);
     205                    // all this casting is to ensure all the parameters to min and max have the same type,
     206                    // to avoid ambiguous template parameter errors on Windows
     207                    int from = max(0, static_cast<int>(range.from()) - static_cast<int>(start));
     208                    int to = 1 + min(static_cast<int>(range.to()) - static_cast<int>(start), static_cast<int>(GlyphPage::size) - 1);
    207209                    if (from < static_cast<int>(GlyphPage::size) && to > 0) {
    208210                        if (haveGlyphs && !scratchPage) {
  • trunk/WebCore/platform/graphics/SimpleFontData.cpp

    r46388 r47974  
    5858    , m_isLoading(loading)
    5959    , m_smallCapsFontData(0)
     60    , m_avgCharWidth(-1)
     61    , m_maxCharWidth(-1)
    6062{
    6163#if !ENABLE(SVG_FONTS)
  • trunk/WebCore/platform/graphics/SimpleFontData.h

    r47525 r47974  
    33 *
    44 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
     5 * Copyright (C) 2007-2008 Torch Mobile, Inc.
    56 *
    67 * This library is free software; you can redistribute it and/or
     
    3435#endif
    3536
    36 #if PLATFORM(WIN)
     37#if PLATFORM(WIN) && !PLATFORM(WINCE)
    3738#include <usp10.h>
    3839#endif
     
    139140#if PLATFORM(WIN)
    140141    bool isSystemFont() const { return m_isSystemFont; }
     142#if !PLATFORM(WINCE)    // disable unused members to save space
    141143    SCRIPT_FONTPROPERTIES* scriptFontProperties() const;
    142144    SCRIPT_CACHE* scriptCache() const { return &m_scriptCache; }
    143 
     145#endif
    144146    static void setShouldApplyMacAscentHack(bool);
    145147    static bool shouldApplyMacAscentHack();
     
    160162    void commonInit();
    161163
    162 #if PLATFORM(WIN)
     164#if PLATFORM(WIN) && !PLATFORM(WINCE)
    163165    void initGDIFont();
    164166    void platformCommonDestroy();
     
    225227#if PLATFORM(WIN)
    226228    bool m_isSystemFont;
     229#if !PLATFORM(WINCE)    // disable unused members to save space
    227230    mutable SCRIPT_CACHE m_scriptCache;
    228231    mutable SCRIPT_FONTPROPERTIES* m_scriptFontProperties;
     232#endif
    229233#endif
    230234};
Note: See TracChangeset for help on using the changeset viewer.