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

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

Issue 18309003: Inroduce toSVGInlineTextBox, and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 ts << ": " << quoteAndEscapeNonPrintables(text.substring(fragment.charac terOffset, fragment.length)) << "\n"; 443 ts << ": " << quoteAndEscapeNonPrintables(text.substring(fragment.charac terOffset, fragment.length)) << "\n";
444 } 444 }
445 } 445 }
446 446
447 static inline void writeSVGInlineTextBoxes(TextStream& ts, const RenderText& tex t, int indent) 447 static inline void writeSVGInlineTextBoxes(TextStream& ts, const RenderText& tex t, int indent)
448 { 448 {
449 for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextBox() ) { 449 for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextBox() ) {
450 if (!box->isSVGInlineTextBox()) 450 if (!box->isSVGInlineTextBox())
451 continue; 451 continue;
452 452
453 writeSVGInlineTextBox(ts, static_cast<SVGInlineTextBox*>(box), indent); 453 writeSVGInlineTextBox(ts, toSVGInlineTextBox(box), indent);
454 } 454 }
455 } 455 }
456 456
457 static void writeStandardPrefix(TextStream& ts, const RenderObject& object, int indent) 457 static void writeStandardPrefix(TextStream& ts, const RenderObject& object, int indent)
458 { 458 {
459 writeIndent(ts, indent); 459 writeIndent(ts, indent);
460 ts << object.renderName(); 460 ts << object.renderName();
461 461
462 if (object.node()) 462 if (object.node())
463 ts << " {" << object.node()->nodeName() << "}"; 463 ts << " {" << object.node()->nodeName() << "}";
(...skipping 205 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(&renderer) << "\n"; 673 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
674 } 674 }
675 } 675 }
676 } 676 }
677 677
678 } // namespace WebCore 678 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGInlineTextBox.h ('k') | Source/core/rendering/svg/SVGRootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698