Changeset 38426 in webkit
- Timestamp:
- Nov 15, 2008 12:48:41 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r38423 r38426 1 2008-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 1 19 2008-11-15 Geoffrey Garen <ggaren@apple.com> 2 20 -
trunk/WebCore/GNUmakefile.am
r38405 r38426 2704 2704 WebCore/svg/graphics/cairo/SVGPaintServerGradientCairo.cpp \ 2705 2705 WebCore/svg/graphics/cairo/SVGPaintServerPatternCairo.cpp \ 2706 WebCore/svg/graphics/cairo/SVGPaintServerSolidCairo.cpp \2707 2706 WebCore/svg/graphics/cairo/SVGResourceFilterCairo.cpp \ 2708 2707 WebCore/svg/graphics/cairo/SVGResourceMaskerCairo.cpp -
trunk/WebCore/WebCore.pro
r38405 r38426 1707 1707 svg/graphics/qt/SVGPaintServerQt.cpp \ 1708 1708 svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp \ 1709 svg/graphics/qt/SVGPaintServerSolidQt.cpp \1710 1709 svg/graphics/qt/SVGResourceFilterQt.cpp \ 1711 1710 svg/graphics/qt/SVGResourceMaskerQt.cpp -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r38405 r38426 15305 15305 </File> 15306 15306 <File 15307 RelativePath="..\svg\graphics\cg\SVGPaintServerSolidCg.cpp"15308 >15309 <FileConfiguration15310 Name="Debug_Cairo|Win32"15311 ExcludedFromBuild="true"15312 >15313 <Tool15314 Name="VCCLCompilerTool"15315 />15316 </FileConfiguration>15317 <FileConfiguration15318 Name="Release_Cairo|Win32"15319 ExcludedFromBuild="true"15320 >15321 <Tool15322 Name="VCCLCompilerTool"15323 />15324 </FileConfiguration>15325 </File>15326 <File15327 15307 RelativePath="..\svg\graphics\cg\SVGResourceFilterCg.cpp" 15328 15308 > … … 15634 15614 <File 15635 15615 RelativePath="..\svg\graphics\cairo\SVGPaintServerPatternCairo.cpp" 15636 >15637 <FileConfiguration15638 Name="Debug|Win32"15639 ExcludedFromBuild="true"15640 >15641 <Tool15642 Name="VCCLCompilerTool"15643 />15644 </FileConfiguration>15645 <FileConfiguration15646 Name="Release|Win32"15647 ExcludedFromBuild="true"15648 >15649 <Tool15650 Name="VCCLCompilerTool"15651 />15652 </FileConfiguration>15653 <FileConfiguration15654 Name="Debug_Internal|Win32"15655 ExcludedFromBuild="true"15656 >15657 <Tool15658 Name="VCCLCompilerTool"15659 />15660 </FileConfiguration>15661 <FileConfiguration15662 Name="Release_PGO|Win32"15663 ExcludedFromBuild="true"15664 >15665 <Tool15666 Name="VCCLCompilerTool"15667 />15668 </FileConfiguration>15669 </File>15670 <File15671 RelativePath="..\svg\graphics\cairo\SVGPaintServerSolidCairo.cpp"15672 15616 > 15673 15617 <FileConfiguration -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r38405 r38426 3095 3095 B25599300D00D8BA00BB825C /* SVGPaintServerGradientCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25598940D00D8B800BB825C /* SVGPaintServerGradientCg.cpp */; }; 3096 3096 B25599310D00D8BA00BB825C /* SVGPaintServerPatternCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25598950D00D8B800BB825C /* SVGPaintServerPatternCg.cpp */; }; 3097 B25599320D00D8BA00BB825C /* SVGPaintServerSolidCg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25598960D00D8B800BB825C /* SVGPaintServerSolidCg.cpp */; };3098 3097 B25599350D00D8BA00BB825C /* SVGResourceFilterCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */; }; 3099 3098 B25599370D00D8BA00BB825C /* SVGResourceMaskerCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */; }; … … 7692 7691 B25598940D00D8B800BB825C /* SVGPaintServerGradientCg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPaintServerGradientCg.cpp; sourceTree = "<group>"; }; 7693 7692 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>"; };7695 7693 B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceFilterCg.mm; sourceTree = "<group>"; }; 7696 7694 B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceMaskerCg.mm; sourceTree = "<group>"; }; … … 12508 12506 B25598940D00D8B800BB825C /* SVGPaintServerGradientCg.cpp */, 12509 12507 B25598950D00D8B800BB825C /* SVGPaintServerPatternCg.cpp */, 12510 B25598960D00D8B800BB825C /* SVGPaintServerSolidCg.cpp */,12511 12508 B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */, 12512 12509 B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */, … … 17605 17602 B25599AE0D00D8BA00BB825C /* SVGPaintServerRadialGradient.cpp in Sources */, 17606 17603 B25599B00D00D8BA00BB825C /* SVGPaintServerSolid.cpp in Sources */, 17607 B25599320D00D8BA00BB825C /* SVGPaintServerSolidCg.cpp in Sources */,17608 17604 B2227A560D00BF220071B782 /* SVGParserUtilities.cpp in Sources */, 17609 17605 B2227A580D00BF220071B782 /* SVGPathElement.cpp in Sources */, -
trunk/WebCore/svg/graphics/SVGPaintServerSolid.cpp
r29663 r38426 1 1 /* 2 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 28 29 #if ENABLE(SVG) 29 30 #include "SVGPaintServerSolid.h" 31 32 #include "GraphicsContext.h" 33 #include "RenderPath.h" 30 34 #include "SVGRenderTreeAsText.h" 31 35 … … 57 61 } 58 62 63 bool 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 99 void 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 59 110 } // namespace WebCore 60 111 -
trunk/WebCore/svg/graphics/SVGPaintServerSolid.h
r35852 r38426 47 47 48 48 virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const; 49 virtual void renderPath(GraphicsContext*&, const RenderObject*, SVGPaintTargetType) const; 49 50 50 51 private:
Note: See TracChangeset
for help on using the changeset viewer.