| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = lengthContext.valueForLength(svgStyle.strokeDash
Offset(), style); | 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 DashArray dashArray = SVGLayoutSupport::resolveSVGDashArray(*svgStyl
e.strokeDashArray(), style, lengthContext); |
| 294 | |
| 295 DashArray dashArray; | |
| 296 SVGLengthList::ConstIterator it = dashes->begin(); | |
| 297 SVGLengthList::ConstIterator itEnd = dashes->end(); | |
| 298 for (; it != itEnd; ++it) | |
| 299 dashArray.append(it->value(lengthContext)); | |
| 300 | 294 |
| 301 writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f); | 295 writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f); |
| 302 writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0); | 296 writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0); |
| 303 writeIfNotDefault(ts, "miter limit", svgStyle.strokeMiterLimit(), 4.
0f); | 297 writeIfNotDefault(ts, "miter limit", svgStyle.strokeMiterLimit(), 4.
0f); |
| 304 writeIfNotDefault(ts, "line cap", svgStyle.capStyle(), ButtCap); | 298 writeIfNotDefault(ts, "line cap", svgStyle.capStyle(), ButtCap); |
| 305 writeIfNotDefault(ts, "line join", svgStyle.joinStyle(), MiterJoin); | 299 writeIfNotDefault(ts, "line join", svgStyle.joinStyle(), MiterJoin); |
| 306 writeIfNotDefault(ts, "dash offset", dashOffset, 0.0); | 300 writeIfNotDefault(ts, "dash offset", dashOffset, 0.0); |
| 307 if (!dashArray.isEmpty()) | 301 if (!dashArray.isEmpty()) |
| 308 writeNameValuePair(ts, "dash array", dashArray); | 302 writeNameValuePair(ts, "dash array", dashArray); |
| 309 | 303 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 ts << " "; | 669 ts << " "; |
| 676 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); | 670 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); |
| 677 ts << " "; | 671 ts << " "; |
| 678 writeStandardPrefix(ts, *filter, 0); | 672 writeStandardPrefix(ts, *filter, 0); |
| 679 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 673 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
| 680 } | 674 } |
| 681 } | 675 } |
| 682 } | 676 } |
| 683 | 677 |
| 684 } // namespace blink | 678 } // namespace blink |
| OLD | NEW |