Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1130)

Side by Side Diff: Source/core/rendering/svg/SVGRenderTreeAsText.cpp

Issue 19097005: Remove one SVG animated type special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the regressions Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = static_cast<SVGRectElement*>(svgElement);
335 writeNameValuePair(ts, "x", element->x().value(lengthContext)); 335 writeNameValuePair(ts, "x", element->xCurrentValue().value(lengthContext ));
336 writeNameValuePair(ts, "y", element->y().value(lengthContext)); 336 writeNameValuePair(ts, "y", element->yCurrentValue().value(lengthContext ));
337 writeNameValuePair(ts, "width", element->width().value(lengthContext)); 337 writeNameValuePair(ts, "width", element->widthCurrentValue().value(lengt hContext));
338 writeNameValuePair(ts, "height", element->height().value(lengthContext)) ; 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->x1().value(lengthContext)); 341 writeNameValuePair(ts, "x1", element->x1CurrentValue().value(lengthConte xt));
342 writeNameValuePair(ts, "y1", element->y1().value(lengthContext)); 342 writeNameValuePair(ts, "y1", element->y1CurrentValue().value(lengthConte xt));
343 writeNameValuePair(ts, "x2", element->x2().value(lengthContext)); 343 writeNameValuePair(ts, "x2", element->x2CurrentValue().value(lengthConte xt));
344 writeNameValuePair(ts, "y2", element->y2().value(lengthContext)); 344 writeNameValuePair(ts, "y2", element->y2CurrentValue().value(lengthConte xt));
345 } else if (svgElement->hasTagName(SVGNames::ellipseTag)) { 345 } else if (svgElement->hasTagName(SVGNames::ellipseTag)) {
346 SVGEllipseElement* element = static_cast<SVGEllipseElement*>(svgElement) ; 346 SVGEllipseElement* element = static_cast<SVGEllipseElement*>(svgElement) ;
347 writeNameValuePair(ts, "cx", element->cx().value(lengthContext)); 347 writeNameValuePair(ts, "cx", element->cxCurrentValue().value(lengthConte xt));
348 writeNameValuePair(ts, "cy", element->cy().value(lengthContext)); 348 writeNameValuePair(ts, "cy", element->cyCurrentValue().value(lengthConte xt));
349 writeNameValuePair(ts, "rx", element->rx().value(lengthContext)); 349 writeNameValuePair(ts, "rx", element->rxCurrentValue().value(lengthConte xt));
350 writeNameValuePair(ts, "ry", element->ry().value(lengthContext)); 350 writeNameValuePair(ts, "ry", element->ryCurrentValue().value(lengthConte xt));
351 } else if (svgElement->hasTagName(SVGNames::circleTag)) { 351 } else if (svgElement->hasTagName(SVGNames::circleTag)) {
352 SVGCircleElement* element = static_cast<SVGCircleElement*>(svgElement); 352 SVGCircleElement* element = static_cast<SVGCircleElement*>(svgElement);
353 writeNameValuePair(ts, "cx", element->cx().value(lengthContext)); 353 writeNameValuePair(ts, "cx", element->cxCurrentValue().value(lengthConte xt));
354 writeNameValuePair(ts, "cy", element->cy().value(lengthContext)); 354 writeNameValuePair(ts, "cy", element->cyCurrentValue().value(lengthConte xt));
355 writeNameValuePair(ts, "r", element->r().value(lengthContext)); 355 writeNameValuePair(ts, "r", element->rCurrentValue().value(lengthContext ));
356 } else if (svgElement->hasTagName(SVGNames::polygonTag) || svgElement->hasTa gName(SVGNames::polylineTag)) { 356 } else if (svgElement->hasTagName(SVGNames::polygonTag) || svgElement->hasTa gName(SVGNames::polylineTag)) {
357 SVGPolyElement* element = static_cast<SVGPolyElement*>(svgElement); 357 SVGPolyElement* element = static_cast<SVGPolyElement*>(svgElement);
358 writeNameAndQuotedValue(ts, "points", element->pointList().valueAsString ()); 358 writeNameAndQuotedValue(ts, "points", element->pointList().valueAsString ());
359 } else if (svgElement->hasTagName(SVGNames::pathTag)) { 359 } else if (svgElement->hasTagName(SVGNames::pathTag)) {
360 SVGPathElement* element = static_cast<SVGPathElement*>(svgElement); 360 SVGPathElement* element = static_cast<SVGPathElement*>(svgElement);
361 String pathString; 361 String pathString;
362 // FIXME: We should switch to UnalteredParsing here - this will affect t he path dumping output of dozens of tests. 362 // FIXME: We should switch to UnalteredParsing here - this will affect t he path dumping output of dozens of tests.
363 buildStringFromByteStream(element->pathByteStream(), pathString, Normali zedParsing); 363 buildStringFromByteStream(element->pathByteStream(), pathString, Normali zedParsing);
364 writeNameAndQuotedValue(ts, "data", pathString); 364 writeNameAndQuotedValue(ts, "data", pathString);
365 } else 365 } else
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 { 625 {
626 writeStandardPrefix(ts, stop, indent); 626 writeStandardPrefix(ts, stop, indent);
627 627
628 SVGStopElement* stopElement = static_cast<SVGStopElement*>(stop.node()); 628 SVGStopElement* stopElement = static_cast<SVGStopElement*>(stop.node());
629 ASSERT(stopElement); 629 ASSERT(stopElement);
630 630
631 RenderStyle* style = stop.style(); 631 RenderStyle* style = stop.style();
632 if (!style) 632 if (!style)
633 return; 633 return;
634 634
635 ts << " [offset=" << stopElement->offset() << "] [color=" << stopElement->st opColorIncludingOpacity() << "]\n"; 635 ts << " [offset=" << stopElement->offsetCurrentValue() << "] [color=" << sto pElement->stopColorIncludingOpacity() << "]\n";
636 } 636 }
637 637
638 void writeResources(TextStream& ts, const RenderObject& object, int indent) 638 void writeResources(TextStream& ts, const RenderObject& object, int indent)
639 { 639 {
640 const RenderStyle* style = object.style(); 640 const RenderStyle* style = object.style();
641 const SVGRenderStyle* svgStyle = style->svgStyle(); 641 const SVGRenderStyle* svgStyle = style->svgStyle();
642 642
643 // FIXME: We want to use SVGResourcesCache to determine which resources are present, instead of quering the resource <-> id cache. 643 // FIXME: We want to use SVGResourcesCache to determine which resources are present, instead of quering the resource <-> id cache.
644 // For now leave the DRT output as is, but later on we should change this so cycles are properly ignored in the DRT output. 644 // For now leave the DRT output as is, but later on we should change this so cycles are properly ignored in the DRT output.
645 RenderObject& renderer = const_cast<RenderObject&>(object); 645 RenderObject& renderer = const_cast<RenderObject&>(object);
(...skipping 23 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698