| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 static TextStream& operator<<(TextStream& ts, const RenderSVGShape& shape) | 325 static TextStream& operator<<(TextStream& ts, const RenderSVGShape& shape) |
| 326 { | 326 { |
| 327 writePositionAndStyle(ts, shape); | 327 writePositionAndStyle(ts, shape); |
| 328 | 328 |
| 329 ASSERT(shape.node()->isSVGElement()); | 329 ASSERT(shape.node()->isSVGElement()); |
| 330 SVGElement* svgElement = toSVGElement(shape.node()); | 330 SVGElement* svgElement = toSVGElement(shape.node()); |
| 331 SVGLengthContext lengthContext(svgElement); | 331 SVGLengthContext lengthContext(svgElement); |
| 332 | 332 |
| 333 if (svgElement->hasTagName(SVGNames::rectTag)) { | 333 if (svgElement->hasTagName(SVGNames::rectTag)) { |
| 334 SVGRectElement* element = static_cast<SVGRectElement*>(svgElement); | 334 SVGRectElement* element = toSVGRectElement(svgElement); |
| 335 writeNameValuePair(ts, "x", element->xCurrentValue().value(lengthContext
)); | 335 writeNameValuePair(ts, "x", element->xCurrentValue().value(lengthContext
)); |
| 336 writeNameValuePair(ts, "y", element->yCurrentValue().value(lengthContext
)); | 336 writeNameValuePair(ts, "y", element->yCurrentValue().value(lengthContext
)); |
| 337 writeNameValuePair(ts, "width", element->widthCurrentValue().value(lengt
hContext)); | 337 writeNameValuePair(ts, "width", element->widthCurrentValue().value(lengt
hContext)); |
| 338 writeNameValuePair(ts, "height", element->heightCurrentValue().value(len
gthContext)); | 338 writeNameValuePair(ts, "height", element->heightCurrentValue().value(len
gthContext)); |
| 339 } else if (svgElement->hasTagName(SVGNames::lineTag)) { | 339 } else if (svgElement->hasTagName(SVGNames::lineTag)) { |
| 340 SVGLineElement* element = static_cast<SVGLineElement*>(svgElement); | 340 SVGLineElement* element = static_cast<SVGLineElement*>(svgElement); |
| 341 writeNameValuePair(ts, "x1", element->x1CurrentValue().value(lengthConte
xt)); | 341 writeNameValuePair(ts, "x1", element->x1CurrentValue().value(lengthConte
xt)); |
| 342 writeNameValuePair(ts, "y1", element->y1CurrentValue().value(lengthConte
xt)); | 342 writeNameValuePair(ts, "y1", element->y1CurrentValue().value(lengthConte
xt)); |
| 343 writeNameValuePair(ts, "x2", element->x2CurrentValue().value(lengthConte
xt)); | 343 writeNameValuePair(ts, "x2", element->x2CurrentValue().value(lengthConte
xt)); |
| 344 writeNameValuePair(ts, "y2", element->y2CurrentValue().value(lengthConte
xt)); | 344 writeNameValuePair(ts, "y2", element->y2CurrentValue().value(lengthConte
xt)); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 ts << " "; | 669 ts << " "; |
| 670 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); | 670 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); |
| 671 ts << " "; | 671 ts << " "; |
| 672 writeStandardPrefix(ts, *filter, 0); | 672 writeStandardPrefix(ts, *filter, 0); |
| 673 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 673 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
| 674 } | 674 } |
| 675 } | 675 } |
| 676 } | 676 } |
| 677 | 677 |
| 678 } // namespace WebCore | 678 } // namespace WebCore |
| OLD | NEW |