Changeset 57404 in webkit


Ignore:
Timestamp:
Apr 9, 2010 8:09:58 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-09 Kevin Watters <kevinwatters@gmail.com>

Reviewed by Eric Seidel.

[wx] Basic implementation of SVG support for wx port.

  • css/CSSFontFaceSource.cpp:
  • platform/graphics/wx/FontPlatformData.h: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::size):
  • platform/graphics/wx/FontPlatformDataWx.cpp: (WebCore::FontPlatformData::FontPlatformData):
  • platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::getCTM): (WebCore::GraphicsContext::beginPath): (WebCore::GraphicsContext::addPath): (WebCore::GraphicsContext::concatCTM): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::setLineDash):
  • platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::platformTransformColorSpace):
  • platform/graphics/wx/PathWx.cpp: (WebCore::Path::strokeContains): (WebCore::Path::debugString): (WebCore::Path::operator=): (WebCore::Path::isEmpty):
  • rendering/RenderSVGResourceMasker.cpp:
  • wscript:

2010-04-09 Kevin Watters <kevinwatters@gmail.com>

Reviewed by Eric Seidel.

[wx] Basic implementation of SVG support for wx port.

  • wx/build/settings.py:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r57394 r57404  
     12010-04-09  Kevin Watters  <kevinwatters@gmail.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [wx] Basic implementation of SVG support for wx port.
     6
     7        * css/CSSFontFaceSource.cpp:
     8        * platform/graphics/wx/FontPlatformData.h:
     9        (WebCore::FontPlatformData::FontPlatformData):
     10        (WebCore::FontPlatformData::size):
     11        * platform/graphics/wx/FontPlatformDataWx.cpp:
     12        (WebCore::FontPlatformData::FontPlatformData):
     13        * platform/graphics/wx/GraphicsContextWx.cpp:
     14        (WebCore::GraphicsContext::GraphicsContext):
     15        (WebCore::GraphicsContext::clipPath):
     16        (WebCore::GraphicsContext::getCTM):
     17        (WebCore::GraphicsContext::beginPath):
     18        (WebCore::GraphicsContext::addPath):
     19        (WebCore::GraphicsContext::concatCTM):
     20        (WebCore::GraphicsContext::fillPath):
     21        (WebCore::GraphicsContext::strokePath):
     22        (WebCore::GraphicsContext::setLineDash):
     23        * platform/graphics/wx/ImageBufferWx.cpp:
     24        (WebCore::ImageBuffer::platformTransformColorSpace):
     25        * platform/graphics/wx/PathWx.cpp:
     26        (WebCore::Path::strokeContains):
     27        (WebCore::Path::debugString):
     28        (WebCore::Path::operator=):
     29        (WebCore::Path::isEmpty):
     30        * rendering/RenderSVGResourceMasker.cpp:
     31        * wscript:
     32
    1332010-04-09  Evan Martin  <evan@chromium.org>
    234
  • trunk/WebCore/css/CSSFontFaceSource.cpp

    r54601 r57404  
    3737
    3838#if ENABLE(SVG_FONTS)
     39#if !PLATFORM(WX)
    3940#include "FontCustomPlatformData.h"
     41#endif
    4042#include "HTMLNames.h"
    4143#include "SVGFontData.h"
  • trunk/WebCore/platform/graphics/wx/FontPlatformData.h

    r56825 r57404  
    6666    FontPlatformData(WTF::HashTableDeletedValueType)
    6767    : m_fontState(DELETED),
    68       m_font(0)
     68      m_font(0),
     69      m_size(0)
    6970    { }
    7071
     
    7273
    7374    FontPlatformData(const FontDescription&, const AtomicString&);
     75   
    7476    FontPlatformData(float size, bool bold, bool italic)
    7577    : m_fontState(UNINITIALIZED)
    7678    , m_font(0)
     79    , m_size(size)
    7780    {
    7881    }
     
    8184    : m_fontState(UNINITIALIZED)
    8285    , m_font(0)
     86    , m_size(0)
    8387    {
    8488    }
     
    100104
    101105    unsigned computeHash() const;
     106   
     107    float size() const { return m_size; }
    102108
    103109    bool operator==(const FontPlatformData& other) const
     
    128134    WTF::RefPtr<FontHolder> m_font;
    129135    FontState m_fontState;
     136    float m_size;
    130137};
    131138
  • trunk/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp

    r54633 r57404  
    101101#endif
    102102    m_fontState = VALID;
     103    m_size = desc.computedPixelSize();
    103104     
    104105}
  • trunk/WebCore/platform/graphics/wx/GraphicsContextWx.cpp

    r54503 r57404  
    9292#if USE(WXGC)
    9393    wxGCDC* context;
     94    wxGraphicsPath currentPath;
    9495#else
    9596    wxWindowDC* context;
     
    125126#if USE(WXGC)
    126127    m_data->context = (wxGCDC*)context;
     128    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
     129    if (gc)
     130        m_data->currentPath = gc->CreatePath();
    127131#else
    128132    m_data->context = (wxWindowDC*)context;
     
    324328}
    325329
     330void GraphicsContext::clipPath(WindRule)
     331{
     332    notImplemented();
     333}
     334
    326335void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing)
    327336{
     
    362371AffineTransform GraphicsContext::getCTM() const
    363372{
    364     notImplemented();
     373#if USE(WXGC)
     374    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
     375    if (gc) {
     376        wxGraphicsMatrix matrix = gc->GetTransform();
     377        double a, b, c, d, e, f;
     378        matrix.Get(&a, &b, &c, &d, &e, &f);
     379        return AffineTransform(a, b, c, d, e, f);
     380    }
     381#endif
    365382    return AffineTransform();
    366383}
     
    436453void GraphicsContext::beginPath()
    437454{
    438     notImplemented();
     455#if USE(WXGC)
     456    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
     457    if (gc)
     458        m_data->currentPath = gc->CreatePath();
     459#endif
    439460}
    440461
    441462void GraphicsContext::addPath(const Path& path)
    442463{
    443     notImplemented();
     464#if USE(WXGC)
     465    if (path.platformPath())
     466        m_data->currentPath.AddPath(*path.platformPath());
     467#endif
    444468}
    445469
     
    477501        return;
    478502
    479     notImplemented();
     503#if USE(WXGC)
     504    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
     505    if (gc)
     506        gc->ConcatTransform(transform);
     507#endif
    480508    return;
    481509}
     
    499527void GraphicsContext::fillPath()
    500528{
     529#if USE(WXGC)
     530    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
     531    if (gc)
     532        gc->FillPath(m_data->currentPath);
     533#endif
    501534}
    502535
    503536void GraphicsContext::strokePath()
    504537{
     538#if USE(WXGC)
     539    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
     540    if (gc)
     541        gc->StrokePath(m_data->currentPath);
     542#endif
    505543}
    506544
     
    550588{
    551589    notImplemented();
     590}
     591
     592void GraphicsContext::setLineDash(const DashArray&, float dashOffset)
     593{
     594    notImplemented();
    552595}
    553596
  • trunk/WebCore/platform/graphics/wx/ImageBufferWx.cpp

    r47099 r57404  
    8888}
    8989
     90void ImageBuffer::platformTransformColorSpace(const Vector<int>&)
     91{
     92    notImplemented();
     93}
     94
    9095} // namespace WebCore
  • trunk/WebCore/platform/graphics/wx/PathWx.cpp

    r54503 r57404  
    3131#include "FloatRect.h"
    3232#include "NotImplemented.h"
     33#include "PlatformString.h"
    3334#include "StrokeStyleApplier.h"
    3435
     
    111112}
    112113
    113 Path& Path::operator=(const Path&)
    114 {
    115     notImplemented();
    116     return*this;
     114bool Path::strokeContains(StrokeStyleApplier*, const FloatPoint&) const
     115{
     116    notImplemented();
     117    return false;
     118}
     119
     120String Path::debugString() const
     121{
     122    notImplemented();
     123    return String();
     124}
     125
     126Path& Path::operator=(const Path& path)
     127{
     128    *m_path = *path.platformPath();
     129    return *this;
    117130}
    118131
     
    220233#if USE(WXGC)
    221234    if (m_path) {
    222         wxDouble width, height;
    223         m_path->GetBox(NULL, NULL, &width, &height);
     235        wxDouble x, y, width, height;
     236        m_path->GetBox(&x, &y, &width, &height);
    224237        return (width == 0 && height == 0);
    225238    }
  • trunk/WebCore/rendering/RenderSVGResourceMasker.cpp

    r55033 r57404  
    3232#include "ImageData.h"
    3333#include "IntRect.h"
     34#include "RenderSVGResource.h"
    3435#include "SVGElement.h"
    3536#include "SVGMaskElement.h"
  • trunk/WebCore/wscript

    r56309 r57404  
    116116    features = [build_port]
    117117    exclude_patterns = ['*AllInOne.cpp', '*Brew.cpp', '*CFNet.cpp', '*Chromium*.cpp',
    118             '*Gtk.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp', '*SVG*.cpp',
     118            '*Gtk.cpp', '*Mac.cpp', '*None.cpp', '*Qt.cpp', '*Safari.cpp',
    119119            'test*bindings.*', '*Wince.cpp']
    120120    if build_port == 'wx':
     
    181181        excludes.append('JSDOMStringList.cpp')
    182182        excludes.append('JSInspectorController.cpp')
     183       
     184        # The bindings generator seems to think these are ref-counted, while they aren't in trunk.
     185        excludes.append('JSElementTimeControl.cpp')
     186        excludes.append('JSSVGAnimatedPathData.cpp')
     187        excludes.append('JSSVGAnimatedPoints.cpp')
     188        excludes.append('JSSVGExternalResourcesRequired.cpp')
     189        excludes.append('JSSVGFilterPrimitiveStandardAttributes.cpp')
     190        excludes.append('JSSVGLocatable.cpp')
     191        excludes.append('JSSVGStyleTable.cpp')
     192        excludes.append('JSSVGTests.cpp')
     193        excludes.append('JSSVGStylable.cpp')
     194        excludes.append('JSSVGZoomAndPan.cpp')
     195       
     196        # These are files that expect methods not in the base C++ class, usually XYZAnimated methods.
     197        excludes.append('JSSVGFitToViewBox.cpp')
     198        excludes.append('JSSVGLangSpace.cpp')
     199        excludes.append('JSSVGTransformable.cpp')
     200        excludes.append('JSSVGURIReference.cpp')
     201       
    183202        if building_on_win32:
    184203            excludes.append('SharedTimerWx.cpp')
  • trunk/WebKitTools/ChangeLog

    r57399 r57404  
     12010-04-09  Kevin Watters  <kevinwatters@gmail.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [wx] Basic implementation of SVG support for wx port.
     6
     7        * wx/build/settings.py:
     8
    192010-04-09  Adam Barth  <abarth@webkit.org>
    210
  • trunk/WebKitTools/wx/build/settings.py

    r56927 r57404  
    122122    'platform',
    123123    'platform/animation',
    124     'platform/graphics',
     124    'platform/graphics',
     125    'platform/graphics/filters',
    125126    'platform/graphics/transforms',
    126127    'platform/image-decoders',
     
    137138    'rendering',
    138139    'rendering/style',
    139     'storage',
     140    'storage',
     141    'svg',
     142    'svg/animation',
     143    'svg/graphics',
     144    'svg/graphics/filters',
    140145    'websockets',
    141146    'xml'
     
    170175os.environ['CREATE_HASH_TABLE'] = create_hash_table
    171176
    172 feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER']
     177feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER', 'ENABLE_SVG', 'ENABLE_SVG_USE', 'ENABLE_FILTERS', 'ENABLE_SVG_FONTS', 'ENABLE_SVG_ANIMATION', 'ENABLE_SVG_AS_IMAGE']
    173178
    174179msvc_version = 'msvc2008'
Note: See TracChangeset for help on using the changeset viewer.