Chromium Code Reviews| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 } | 476 } |
| 477 | 477 |
| 478 void writeSVGResourceContainer(TextStream& ts, const RenderObject& object, int i ndent) | 478 void writeSVGResourceContainer(TextStream& ts, const RenderObject& object, int i ndent) |
| 479 { | 479 { |
| 480 writeStandardPrefix(ts, object, indent); | 480 writeStandardPrefix(ts, object, indent); |
| 481 | 481 |
| 482 Element* element = toElement(object.node()); | 482 Element* element = toElement(object.node()); |
| 483 const AtomicString& id = element->getIdAttribute(); | 483 const AtomicString& id = element->getIdAttribute(); |
| 484 writeNameAndQuotedValue(ts, "id", id); | 484 writeNameAndQuotedValue(ts, "id", id); |
| 485 | 485 |
| 486 RenderSVGResourceContainer* resource = const_cast<RenderObject&>(object).toR enderSVGResourceContainer(); | 486 RenderSVGResourceContainer* resource = toRenderSVGResourceContainer(element- >renderer()); |
|
pdr.
2013/10/17 21:12:51
I think you should use object here instead of elem
| |
| 487 ASSERT(resource); | 487 ASSERT(resource); |
| 488 | 488 |
| 489 if (resource->resourceType() == MaskerResourceType) { | 489 if (resource->resourceType() == MaskerResourceType) { |
| 490 RenderSVGResourceMasker* masker = toRenderSVGResourceMasker(resource); | 490 RenderSVGResourceMasker* masker = toRenderSVGResourceMasker(resource); |
| 491 writeNameValuePair(ts, "maskUnits", masker->maskUnits()); | 491 writeNameValuePair(ts, "maskUnits", masker->maskUnits()); |
| 492 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); | 492 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); |
| 493 ts << "\n"; | 493 ts << "\n"; |
| 494 } else if (resource->resourceType() == FilterResourceType) { | 494 } else if (resource->resourceType() == FilterResourceType) { |
| 495 RenderSVGResourceFilter* filter = toRenderSVGResourceFilter(resource); | 495 RenderSVGResourceFilter* filter = toRenderSVGResourceFilter(resource); |
| 496 writeNameValuePair(ts, "filterUnits", filter->filterUnits()); | 496 writeNameValuePair(ts, "filterUnits", filter->filterUnits()); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 ts << " "; | 659 ts << " "; |
| 660 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); | 660 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); |
| 661 ts << " "; | 661 ts << " "; |
| 662 writeStandardPrefix(ts, *filter, 0); | 662 writeStandardPrefix(ts, *filter, 0); |
| 663 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; | 663 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; |
| 664 } | 664 } |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 | 667 |
| 668 } // namespace WebCore | 668 } // namespace WebCore |
| OLD | NEW |