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

Side by Side Diff: Source/core/layout/svg/SVGLayoutTreeAsText.cpp

Issue 1348973004: Merge SVGFilter into Filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Nits. Created 5 years, 3 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 writeNameValuePair(ts, "maskUnits", masker->maskUnits()); 503 writeNameValuePair(ts, "maskUnits", masker->maskUnits());
504 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); 504 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits());
505 ts << "\n"; 505 ts << "\n";
506 } else if (resource->resourceType() == FilterResourceType) { 506 } else if (resource->resourceType() == FilterResourceType) {
507 LayoutSVGResourceFilter* filter = toLayoutSVGResourceFilter(resource); 507 LayoutSVGResourceFilter* filter = toLayoutSVGResourceFilter(resource);
508 writeNameValuePair(ts, "filterUnits", filter->filterUnits()); 508 writeNameValuePair(ts, "filterUnits", filter->filterUnits());
509 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits()); 509 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits());
510 ts << "\n"; 510 ts << "\n";
511 // Creating a placeholder filter which is passed to the builder. 511 // Creating a placeholder filter which is passed to the builder.
512 FloatRect dummyRect; 512 FloatRect dummyRect;
513 RefPtrWillBeRawPtr<SVGFilter> dummyFilter = SVGFilter::create(dummyRect, dummyRect, true); 513 RefPtrWillBeRawPtr<Filter> dummyFilter = Filter::create(dummyRect, dummy Rect, 1, Filter::BoundingBox);
514 if (RefPtrWillBeRawPtr<SVGFilterBuilder> builder = filter->buildPrimitiv es(dummyFilter.get())) { 514 if (RefPtrWillBeRawPtr<SVGFilterBuilder> builder = filter->buildPrimitiv es(dummyFilter.get())) {
515 if (FilterEffect* lastEffect = builder->lastEffect()) 515 if (FilterEffect* lastEffect = builder->lastEffect())
516 lastEffect->externalRepresentation(ts, indent + 1); 516 lastEffect->externalRepresentation(ts, indent + 1);
517 } 517 }
518 } else if (resource->resourceType() == ClipperResourceType) { 518 } else if (resource->resourceType() == ClipperResourceType) {
519 writeNameValuePair(ts, "clipPathUnits", toLayoutSVGResourceClipper(resou rce)->clipPathUnits()); 519 writeNameValuePair(ts, "clipPathUnits", toLayoutSVGResourceClipper(resou rce)->clipPathUnits());
520 ts << "\n"; 520 ts << "\n";
521 } else if (resource->resourceType() == MarkerResourceType) { 521 } else if (resource->resourceType() == MarkerResourceType) {
522 LayoutSVGResourceMarker* marker = toLayoutSVGResourceMarker(resource); 522 LayoutSVGResourceMarker* marker = toLayoutSVGResourceMarker(resource);
523 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); 523 writeNameValuePair(ts, "markerUnits", marker->markerUnits());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(&layoutObject) << "\n"; 673 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n";
674 } 674 }
675 } 675 }
676 } 676 }
677 677
678 } // namespace blink 678 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceFilter.cpp ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698