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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 const LayoutSVGShape& shape = static_cast<const LayoutSVGShape&>(object)
; | 281 const LayoutSVGShape& shape = static_cast<const LayoutSVGShape&>(object)
; |
282 ASSERT(shape.element()); | 282 ASSERT(shape.element()); |
283 | 283 |
284 SVGPaintDescription strokePaintDescription = LayoutSVGResourcePaintServe
r::requestPaintDescription(shape, shape.styleRef(), ApplyToStrokeMode); | 284 SVGPaintDescription strokePaintDescription = LayoutSVGResourcePaintServe
r::requestPaintDescription(shape, shape.styleRef(), ApplyToStrokeMode); |
285 if (strokePaintDescription.isValid) { | 285 if (strokePaintDescription.isValid) { |
286 TextStreamSeparator s(" "); | 286 TextStreamSeparator s(" "); |
287 ts << " [stroke={" << s; | 287 ts << " [stroke={" << s; |
288 writeSVGPaintingResource(ts, strokePaintDescription); | 288 writeSVGPaintingResource(ts, strokePaintDescription); |
289 | 289 |
290 SVGLengthContext lengthContext(shape.element()); | 290 SVGLengthContext lengthContext(shape.element()); |
291 double dashOffset = svgStyle.strokeDashOffset()->value(lengthContext
); | 291 double dashOffset = lengthContext.valueForLength(svgStyle.strokeDash
Offset(), style); |
292 double strokeWidth = svgStyle.strokeWidth()->value(lengthContext); | 292 double strokeWidth = svgStyle.strokeWidth()->value(lengthContext); |
293 RefPtrWillBeRawPtr<SVGLengthList> dashes = svgStyle.strokeDashArray(
); | 293 RefPtrWillBeRawPtr<SVGLengthList> dashes = svgStyle.strokeDashArray(
); |
294 | 294 |
295 DashArray dashArray; | 295 DashArray dashArray; |
296 SVGLengthList::ConstIterator it = dashes->begin(); | 296 SVGLengthList::ConstIterator it = dashes->begin(); |
297 SVGLengthList::ConstIterator itEnd = dashes->end(); | 297 SVGLengthList::ConstIterator itEnd = dashes->end(); |
298 for (; it != itEnd; ++it) | 298 for (; it != itEnd; ++it) |
299 dashArray.append(it->value(lengthContext)); | 299 dashArray.append(it->value(lengthContext)); |
300 | 300 |
301 writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f); | 301 writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f); |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 ts << " "; | 675 ts << " "; |
676 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); | 676 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); |
677 ts << " "; | 677 ts << " "; |
678 writeStandardPrefix(ts, *filter, 0); | 678 writeStandardPrefix(ts, *filter, 0); |
679 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 679 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
680 } | 680 } |
681 } | 681 } |
682 } | 682 } |
683 | 683 |
684 } // namespace blink | 684 } // namespace blink |
OLD | NEW |