Changeset 38426 in webkit


Ignore:
Timestamp:
Nov 15, 2008 12:48:41 PM (15 years ago)
Author:
krit@webkit.org
Message:

2008-11-15 Dirk Schulze <vbs85@gmx.de>

Reviewed by Darin Adler.

Removed platform dependent code on SVGPaintServerSolid.

  • GNUmakefile.am:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • svg/graphics/SVGPaintServerSolid.cpp: (WebCore::SVGPaintServerSolid::setup): (WebCore::SVGPaintServerSolid::renderPath):
  • svg/graphics/SVGPaintServerSolid.h:
  • svg/graphics/cairo/SVGPaintServerSolidCairo.cpp: Removed.
  • svg/graphics/cg/SVGPaintServerSolidCg.cpp: Removed.
  • svg/graphics/qt/SVGPaintServerSolidQt.cpp: Removed.
Location:
trunk/WebCore
Files:
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r38423 r38426  
     12008-11-15  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Removed platform dependent code on SVGPaintServerSolid.
     6
     7        * GNUmakefile.am:
     8        * WebCore.pro:
     9        * WebCore.vcproj/WebCore.vcproj:
     10        * WebCore.xcodeproj/project.pbxproj:
     11        * svg/graphics/SVGPaintServerSolid.cpp:
     12        (WebCore::SVGPaintServerSolid::setup):
     13        (WebCore::SVGPaintServerSolid::renderPath):
     14        * svg/graphics/SVGPaintServerSolid.h:
     15        * svg/graphics/cairo/SVGPaintServerSolidCairo.cpp: Removed.
     16        * svg/graphics/cg/SVGPaintServerSolidCg.cpp: Removed.
     17        * svg/graphics/qt/SVGPaintServerSolidQt.cpp: Removed.
     18
    1192008-11-15  Geoffrey Garen  <ggaren@apple.com>
    220
  • trunk/WebCore/GNUmakefile.am

    r38405 r38426  
    27042704        WebCore/svg/graphics/cairo/SVGPaintServerGradientCairo.cpp \
    27052705        WebCore/svg/graphics/cairo/SVGPaintServerPatternCairo.cpp \
    2706         WebCore/svg/graphics/cairo/SVGPaintServerSolidCairo.cpp \
    27072706        WebCore/svg/graphics/cairo/SVGResourceFilterCairo.cpp \
    27082707        WebCore/svg/graphics/cairo/SVGResourceMaskerCairo.cpp
  • trunk/WebCore/WebCore.pro

    r38405 r38426  
    17071707        svg/graphics/qt/SVGPaintServerQt.cpp \
    17081708        svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp \
    1709         svg/graphics/qt/SVGPaintServerSolidQt.cpp \
    17101709        svg/graphics/qt/SVGResourceFilterQt.cpp \
    17111710        svg/graphics/qt/SVGResourceMaskerQt.cpp
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r38405 r38426  
    1530515305                                        </File>
    1530615306                                        <File
    15307                                                 RelativePath="..\svg\graphics\cg\SVGPaintServerSolidCg.cpp"
    15308                                                 >
    15309                                                 <FileConfiguration
    15310                                                         Name="Debug_Cairo|Win32"
    15311                                                         ExcludedFromBuild="true"
    15312                                                         >
    15313                                                         <Tool
    15314                                                                 Name="VCCLCompilerTool"
    15315                                                         />
    15316                                                 </FileConfiguration>
    15317                                                 <FileConfiguration
    15318                                                         Name="Release_Cairo|Win32"
    15319                                                         ExcludedFromBuild="true"
    15320                                                         >
    15321                                                         <Tool
    15322                                                                 Name="VCCLCompilerTool"
    15323                                                         />
    15324                                                 </FileConfiguration>
    15325                                         </File>
    15326                                         <File
    1532715307                                                RelativePath="..\svg\graphics\cg\SVGResourceFilterCg.cpp"
    1532815308                                                >
     
    1563415614                                        <File
    1563515615                                                RelativePath="..\svg\graphics\cairo\SVGPaintServerPatternCairo.cpp"
    15636                                                 >
    15637                                                 <FileConfiguration
    15638                                                         Name="Debug|Win32"
    15639                                                         ExcludedFromBuild="true"
    15640                                                         >
    15641                                                         <Tool
    15642                                                                 Name="VCCLCompilerTool"
    15643                                                         />
    15644                                                 </FileConfiguration>
    15645                                                 <FileConfiguration
    15646                                                         Name="Release|Win32"
    15647                                                         ExcludedFromBuild="true"
    15648                                                         >
    15649                                                         <Tool
    15650                                                                 Name="VCCLCompilerTool"
    15651                                                         />
    15652                                                 </FileConfiguration>
    15653                                                 <FileConfiguration
    15654                                                         Name="Debug_Internal|Win32"
    15655                                                         ExcludedFromBuild="true"
    15656                                                         >
    15657                                                         <Tool
    15658                                                                 Name="VCCLCompilerTool"
    15659                                                         />
    15660                                                 </FileConfiguration>
    15661                                                 <FileConfiguration
    15662                                                         Name="Release_PGO|Win32"
    15663                                                         ExcludedFromBuild="true"
    15664                                                         >
    15665                                                         <Tool
    15666                                                                 Name="VCCLCompilerTool"
    15667                                                         />
    15668                                                 </FileConfiguration>
    15669                                         </File>
    15670                                         <File
    15671                                                 RelativePath="..\svg\graphics\cairo\SVGPaintServerSolidCairo.cpp"
    1567215616                                                >
    1567315617                                                <FileConfiguration
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r38405 r38426  
    30953095                B25599300D00D8BA00BB825C /* SVGPaintServerGradientCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25598940D00D8B800BB825C /* SVGPaintServerGradientCg.cpp */; };
    30963096                B25599310D00D8BA00BB825C /* SVGPaintServerPatternCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25598950D00D8B800BB825C /* SVGPaintServerPatternCg.cpp */; };
    3097                 B25599320D00D8BA00BB825C /* SVGPaintServerSolidCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25598960D00D8B800BB825C /* SVGPaintServerSolidCg.cpp */; };
    30983097                B25599350D00D8BA00BB825C /* SVGResourceFilterCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */; };
    30993098                B25599370D00D8BA00BB825C /* SVGResourceMaskerCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */; };
     
    76927691                B25598940D00D8B800BB825C /* SVGPaintServerGradientCg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPaintServerGradientCg.cpp; sourceTree = "<group>"; };
    76937692                B25598950D00D8B800BB825C /* SVGPaintServerPatternCg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPaintServerPatternCg.cpp; sourceTree = "<group>"; };
    7694                 B25598960D00D8B800BB825C /* SVGPaintServerSolidCg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPaintServerSolidCg.cpp; sourceTree = "<group>"; };
    76957693                B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceFilterCg.mm; sourceTree = "<group>"; };
    76967694                B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceMaskerCg.mm; sourceTree = "<group>"; };
     
    1250812506                                B25598940D00D8B800BB825C /* SVGPaintServerGradientCg.cpp */,
    1250912507                                B25598950D00D8B800BB825C /* SVGPaintServerPatternCg.cpp */,
    12510                                 B25598960D00D8B800BB825C /* SVGPaintServerSolidCg.cpp */,
    1251112508                                B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */,
    1251212509                                B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */,
     
    1760517602                                B25599AE0D00D8BA00BB825C /* SVGPaintServerRadialGradient.cpp in Sources */,
    1760617603                                B25599B00D00D8BA00BB825C /* SVGPaintServerSolid.cpp in Sources */,
    17607                                 B25599320D00D8BA00BB825C /* SVGPaintServerSolidCg.cpp in Sources */,
    1760817604                                B2227A560D00BF220071B782 /* SVGParserUtilities.cpp in Sources */,
    1760917605                                B2227A580D00BF220071B782 /* SVGPathElement.cpp in Sources */,
  • trunk/WebCore/svg/graphics/SVGPaintServerSolid.cpp

    r29663 r38426  
    11/*
    22 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
     3 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    2829#if ENABLE(SVG)
    2930#include "SVGPaintServerSolid.h"
     31
     32#include "GraphicsContext.h"
     33#include "RenderPath.h"
    3034#include "SVGRenderTreeAsText.h"
    3135
     
    5761}
    5862
     63bool SVGPaintServerSolid::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type, bool isPaintingText) const
     64{
     65    RenderStyle* style = object ? object->style() : 0;
     66    const SVGRenderStyle* svgStyle = object ? object->style()->svgStyle() : 0;
     67
     68    if ((type & ApplyToFillTargetType) && (!style || svgStyle->hasFill())) {
     69        RGBA32 rgba = color().rgb();
     70        ASSERT(!color().hasAlpha());
     71        if (style)
     72            rgba = colorWithOverrideAlpha(rgba, svgStyle->fillOpacity());
     73
     74        context->setFillRule(svgStyle->fillRule());
     75        context->setFillColor(rgba);
     76
     77        if (isPaintingText)
     78            context->setTextDrawingMode(cTextFill);
     79    }
     80
     81    if ((type & ApplyToStrokeTargetType) && (!style || svgStyle->hasStroke())) {
     82        RGBA32 rgba = color().rgb();
     83        ASSERT(!color().hasAlpha());
     84        if (style)
     85            rgba = colorWithOverrideAlpha(rgba, svgStyle->strokeOpacity());
     86
     87        context->setStrokeColor(rgba);
     88
     89        if (style)
     90            applyStrokeStyleToContext(context, style, object);
     91
     92        if (isPaintingText)
     93            context->setTextDrawingMode(cTextStroke);
     94    }
     95
     96    return true;
     97}
     98
     99void SVGPaintServerSolid::renderPath(GraphicsContext*& context, const RenderObject* path, SVGPaintTargetType type) const
     100{
     101    const SVGRenderStyle* svgStyle = path->style()->svgStyle();
     102
     103    if ((type & ApplyToFillTargetType) && svgStyle->hasFill())
     104        context->fillPath();
     105
     106    if ((type & ApplyToStrokeTargetType) && svgStyle->hasStroke())
     107        context->strokePath();
     108}
     109
    59110} // namespace WebCore
    60111
  • trunk/WebCore/svg/graphics/SVGPaintServerSolid.h

    r35852 r38426  
    4747
    4848        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const;
     49        virtual void renderPath(GraphicsContext*&, const RenderObject*, SVGPaintTargetType) const;
    4950
    5051    private:
Note: See TracChangeset for help on using the changeset viewer.