| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved. |
| 3 * (C) 2005 Rob Buis <buis@kde.org> | 3 * (C) 2005 Rob Buis <buis@kde.org> |
| 4 * (C) 2006 Alexander Kellett <lypanov@kde.org> | 4 * (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 ts << "[type=SOLID] [color=" << paintDescription.color << "]"; | 252 ts << "[type=SOLID] [color=" << paintDescription.color << "]"; |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| 256 RenderSVGResource* resource = paintDescription.resource; | 256 RenderSVGResource* resource = paintDescription.resource; |
| 257 // All other resources derive from RenderSVGResourceContainer | 257 // All other resources derive from RenderSVGResourceContainer |
| 258 RenderSVGResourceContainer* container = static_cast<RenderSVGResourceContain
er*>(resource); | 258 RenderSVGResourceContainer* container = static_cast<RenderSVGResourceContain
er*>(resource); |
| 259 SVGElement* element = container->element(); | 259 SVGElement* element = container->element(); |
| 260 ASSERT(element); | 260 ASSERT(element); |
| 261 | 261 |
| 262 if (resource->resourceType() == PatternResourceType) | 262 if (container->resourceType() == PatternResourceType) |
| 263 ts << "[type=PATTERN]"; | 263 ts << "[type=PATTERN]"; |
| 264 else if (resource->resourceType() == LinearGradientResourceType) | 264 else if (container->resourceType() == LinearGradientResourceType) |
| 265 ts << "[type=LINEAR-GRADIENT]"; | 265 ts << "[type=LINEAR-GRADIENT]"; |
| 266 else if (resource->resourceType() == RadialGradientResourceType) | 266 else if (container->resourceType() == RadialGradientResourceType) |
| 267 ts << "[type=RADIAL-GRADIENT]"; | 267 ts << "[type=RADIAL-GRADIENT]"; |
| 268 | 268 |
| 269 ts << " [id=\"" << element->getIdAttribute() << "\"]"; | 269 ts << " [id=\"" << element->getIdAttribute() << "\"]"; |
| 270 } | 270 } |
| 271 | 271 |
| 272 static void writeStyle(TextStream& ts, const RenderObject& object) | 272 static void writeStyle(TextStream& ts, const RenderObject& object) |
| 273 { | 273 { |
| 274 const RenderStyle* style = object.style(); | 274 const RenderStyle* style = object.style(); |
| 275 const SVGRenderStyle& svgStyle = style->svgStyle(); | 275 const SVGRenderStyle& svgStyle = style->svgStyle(); |
| 276 | 276 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 ts << " "; | 676 ts << " "; |
| 677 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); | 677 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); |
| 678 ts << " "; | 678 ts << " "; |
| 679 writeStandardPrefix(ts, *filter, 0); | 679 writeStandardPrefix(ts, *filter, 0); |
| 680 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 680 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 } | 683 } |
| 684 | 684 |
| 685 } // namespace blink | 685 } // namespace blink |
| OLD | NEW |