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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "core/layout/svg/line/SVGInlineTextBox.h" | 49 #include "core/layout/svg/line/SVGInlineTextBox.h" |
50 #include "core/layout/svg/line/SVGRootInlineBox.h" | 50 #include "core/layout/svg/line/SVGRootInlineBox.h" |
51 #include "core/svg/LinearGradientAttributes.h" | 51 #include "core/svg/LinearGradientAttributes.h" |
52 #include "core/svg/PatternAttributes.h" | 52 #include "core/svg/PatternAttributes.h" |
53 #include "core/svg/RadialGradientAttributes.h" | 53 #include "core/svg/RadialGradientAttributes.h" |
54 #include "core/svg/SVGCircleElement.h" | 54 #include "core/svg/SVGCircleElement.h" |
55 #include "core/svg/SVGEllipseElement.h" | 55 #include "core/svg/SVGEllipseElement.h" |
56 #include "core/svg/SVGLineElement.h" | 56 #include "core/svg/SVGLineElement.h" |
57 #include "core/svg/SVGLinearGradientElement.h" | 57 #include "core/svg/SVGLinearGradientElement.h" |
58 #include "core/svg/SVGPathElement.h" | 58 #include "core/svg/SVGPathElement.h" |
59 #include "core/svg/SVGPathUtilities.h" | |
60 #include "core/svg/SVGPatternElement.h" | 59 #include "core/svg/SVGPatternElement.h" |
61 #include "core/svg/SVGPointList.h" | 60 #include "core/svg/SVGPointList.h" |
62 #include "core/svg/SVGPolyElement.h" | 61 #include "core/svg/SVGPolyElement.h" |
63 #include "core/svg/SVGRadialGradientElement.h" | 62 #include "core/svg/SVGRadialGradientElement.h" |
64 #include "core/svg/SVGRectElement.h" | 63 #include "core/svg/SVGRectElement.h" |
65 #include "core/svg/SVGStopElement.h" | 64 #include "core/svg/SVGStopElement.h" |
66 #include "core/svg/graphics/filters/SVGFilterBuilder.h" | 65 #include "core/svg/graphics/filters/SVGFilterBuilder.h" |
67 #include "platform/graphics/DashArray.h" | 66 #include "platform/graphics/DashArray.h" |
68 #include "platform/graphics/GraphicsTypes.h" | 67 #include "platform/graphics/GraphicsTypes.h" |
69 #include "platform/graphics/filters/SourceGraphic.h" | 68 #include "platform/graphics/filters/SourceGraphic.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 writeNameValuePair(ts, "rx", element.rx()->currentValue()->value(lengthC
ontext)); | 358 writeNameValuePair(ts, "rx", element.rx()->currentValue()->value(lengthC
ontext)); |
360 writeNameValuePair(ts, "ry", element.ry()->currentValue()->value(lengthC
ontext)); | 359 writeNameValuePair(ts, "ry", element.ry()->currentValue()->value(lengthC
ontext)); |
361 } else if (isSVGCircleElement(*svgElement)) { | 360 } else if (isSVGCircleElement(*svgElement)) { |
362 SVGCircleElement& element = toSVGCircleElement(*svgElement); | 361 SVGCircleElement& element = toSVGCircleElement(*svgElement); |
363 writeNameValuePair(ts, "cx", element.cx()->currentValue()->value(lengthC
ontext)); | 362 writeNameValuePair(ts, "cx", element.cx()->currentValue()->value(lengthC
ontext)); |
364 writeNameValuePair(ts, "cy", element.cy()->currentValue()->value(lengthC
ontext)); | 363 writeNameValuePair(ts, "cy", element.cy()->currentValue()->value(lengthC
ontext)); |
365 writeNameValuePair(ts, "r", element.r()->currentValue()->value(lengthCon
text)); | 364 writeNameValuePair(ts, "r", element.r()->currentValue()->value(lengthCon
text)); |
366 } else if (isSVGPolyElement(*svgElement)) { | 365 } else if (isSVGPolyElement(*svgElement)) { |
367 writeNameAndQuotedValue(ts, "points", toSVGPolyElement(*svgElement).poin
ts()->currentValue()->valueAsString()); | 366 writeNameAndQuotedValue(ts, "points", toSVGPolyElement(*svgElement).poin
ts()->currentValue()->valueAsString()); |
368 } else if (isSVGPathElement(*svgElement)) { | 367 } else if (isSVGPathElement(*svgElement)) { |
369 String pathString = buildStringFromByteStream(toSVGPathElement(*svgEleme
nt).pathByteStream(), UnalteredParsing); | 368 writeNameAndQuotedValue(ts, "data", toSVGPathElement(*svgElement).path()
->currentValue()->valueAsString()); |
370 writeNameAndQuotedValue(ts, "data", pathString); | |
371 } else { | 369 } else { |
372 ASSERT_NOT_REACHED(); | 370 ASSERT_NOT_REACHED(); |
373 } | 371 } |
374 return ts; | 372 return ts; |
375 } | 373 } |
376 | 374 |
377 static TextStream& operator<<(TextStream& ts, const LayoutSVGRoot& root) | 375 static TextStream& operator<<(TextStream& ts, const LayoutSVGRoot& root) |
378 { | 376 { |
379 return writePositionAndStyle(ts, root); | 377 return writePositionAndStyle(ts, root); |
380 } | 378 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 ts << " "; | 667 ts << " "; |
670 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); | 668 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); |
671 ts << " "; | 669 ts << " "; |
672 writeStandardPrefix(ts, *filter, 0); | 670 writeStandardPrefix(ts, *filter, 0); |
673 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n"; | 671 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n"; |
674 } | 672 } |
675 } | 673 } |
676 } | 674 } |
677 | 675 |
678 } // namespace blink | 676 } // namespace blink |
OLD | NEW |