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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 if (!svgStyle.maskerResource().isEmpty()) { | 642 if (!svgStyle.maskerResource().isEmpty()) { |
643 if (LayoutSVGResourceMasker* masker = getLayoutSVGResourceById<LayoutSVG
ResourceMasker>(object.document(), svgStyle.maskerResource())) { | 643 if (LayoutSVGResourceMasker* masker = getLayoutSVGResourceById<LayoutSVG
ResourceMasker>(object.document(), svgStyle.maskerResource())) { |
644 writeIndent(ts, indent); | 644 writeIndent(ts, indent); |
645 ts << " "; | 645 ts << " "; |
646 writeNameAndQuotedValue(ts, "masker", svgStyle.maskerResource()); | 646 writeNameAndQuotedValue(ts, "masker", svgStyle.maskerResource()); |
647 ts << " "; | 647 ts << " "; |
648 writeStandardPrefix(ts, *masker, 0); | 648 writeStandardPrefix(ts, *masker, 0); |
649 ts << " " << masker->resourceBoundingBox(&object) << "\n"; | 649 ts << " " << masker->resourceBoundingBox(&object) << "\n"; |
650 } | 650 } |
651 } | 651 } |
652 if (!svgStyle.clipperResource().isEmpty()) { | 652 if (ClipPathOperation* clipPathOperation = svgStyle.clipPath()) { |
653 if (LayoutSVGResourceClipper* clipper = getLayoutSVGResourceById<LayoutS
VGResourceClipper>(object.document(), svgStyle.clipperResource())) { | 653 if (clipPathOperation->type() == ClipPathOperation::REFERENCE) { |
654 writeIndent(ts, indent); | 654 const ReferenceClipPathOperation& clipPathReference = toReferenceCli
pPathOperation(*clipPathOperation); |
655 ts << " "; | 655 AtomicString id = SVGURIReference::fragmentIdentifierFromIRIString(c
lipPathReference.url(), object.document()); |
656 writeNameAndQuotedValue(ts, "clipPath", svgStyle.clipperResource()); | 656 if (LayoutSVGResourceClipper* clipper = getLayoutSVGResourceById<Lay
outSVGResourceClipper>(object.document(), id)) { |
657 ts << " "; | 657 writeIndent(ts, indent); |
658 writeStandardPrefix(ts, *clipper, 0); | 658 ts << " "; |
659 ts << " " << clipper->resourceBoundingBox(object.objectBoundingBox()
) << "\n"; | 659 writeNameAndQuotedValue(ts, "clipPath", id); |
| 660 ts << " "; |
| 661 writeStandardPrefix(ts, *clipper, 0); |
| 662 ts << " " << clipper->resourceBoundingBox(object.objectBoundingB
ox()) << "\n"; |
| 663 } |
660 } | 664 } |
661 } | 665 } |
662 if (style.hasFilter()) { | 666 if (style.hasFilter()) { |
663 const FilterOperations& filterOperations = style.filter(); | 667 const FilterOperations& filterOperations = style.filter(); |
664 if (filterOperations.size() == 1) { | 668 if (filterOperations.size() == 1) { |
665 const FilterOperation& filterOperation = *filterOperations.at(0); | 669 const FilterOperation& filterOperation = *filterOperations.at(0); |
666 if (filterOperation.type() == FilterOperation::REFERENCE) { | 670 if (filterOperation.type() == FilterOperation::REFERENCE) { |
667 const auto& referenceFilterOperation = toReferenceFilterOperatio
n(filterOperation); | 671 const auto& referenceFilterOperation = toReferenceFilterOperatio
n(filterOperation); |
668 AtomicString id = SVGURIReference::fragmentIdentifierFromIRIStri
ng(referenceFilterOperation.url(), object.document()); | 672 AtomicString id = SVGURIReference::fragmentIdentifierFromIRIStri
ng(referenceFilterOperation.url(), object.document()); |
669 if (LayoutSVGResourceFilter* filter = getLayoutSVGResourceById<L
ayoutSVGResourceFilter>(object.document(), id)) { | 673 if (LayoutSVGResourceFilter* filter = getLayoutSVGResourceById<L
ayoutSVGResourceFilter>(object.document(), id)) { |
670 writeIndent(ts, indent); | 674 writeIndent(ts, indent); |
671 ts << " "; | 675 ts << " "; |
672 writeNameAndQuotedValue(ts, "filter", id); | 676 writeNameAndQuotedValue(ts, "filter", id); |
673 ts << " "; | 677 ts << " "; |
674 writeStandardPrefix(ts, *filter, 0); | 678 writeStandardPrefix(ts, *filter, 0); |
675 ts << " " << filter->resourceBoundingBox(&object) << "\n"; | 679 ts << " " << filter->resourceBoundingBox(&object) << "\n"; |
676 } | 680 } |
677 } | 681 } |
678 } | 682 } |
679 } | 683 } |
680 } | 684 } |
681 | 685 |
682 } // namespace blink | 686 } // namespace blink |
OLD | NEW |