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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 years, 9 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (text.parent() && (text.parent()->resolveColor(CSSPropertyColor) != text. resolveColor(CSSPropertyColor))) 398 if (text.parent() && (text.parent()->resolveColor(CSSPropertyColor) != text. resolveColor(CSSPropertyColor)))
399 writeNameValuePair(ts, "color", text.resolveColor(CSSPropertyColor).name ForLayoutTreeAsText()); 399 writeNameValuePair(ts, "color", text.resolveColor(CSSPropertyColor).name ForLayoutTreeAsText());
400 } 400 }
401 401
402 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textB ox, int indent) 402 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textB ox, int indent)
403 { 403 {
404 Vector<SVGTextFragment>& fragments = textBox->textFragments(); 404 Vector<SVGTextFragment>& fragments = textBox->textFragments();
405 if (fragments.isEmpty()) 405 if (fragments.isEmpty())
406 return; 406 return;
407 407
408 LayoutSVGInlineText& textRenderer = toLayoutSVGInlineText(textBox->renderer( )); 408 LayoutSVGInlineText& textRenderer = toLayoutSVGInlineText(textBox->layoutObj ect());
409 409
410 const SVGLayoutStyle& svgStyle = textRenderer.style()->svgStyle(); 410 const SVGLayoutStyle& svgStyle = textRenderer.style()->svgStyle();
411 String text = textBox->renderer().text(); 411 String text = textBox->layoutObject().text();
412 412
413 unsigned fragmentsSize = fragments.size(); 413 unsigned fragmentsSize = fragments.size();
414 for (unsigned i = 0; i < fragmentsSize; ++i) { 414 for (unsigned i = 0; i < fragmentsSize; ++i) {
415 SVGTextFragment& fragment = fragments.at(i); 415 SVGTextFragment& fragment = fragments.at(i);
416 writeIndent(ts, indent + 1); 416 writeIndent(ts, indent + 1);
417 417
418 unsigned startOffset = fragment.characterOffset; 418 unsigned startOffset = fragment.characterOffset;
419 unsigned endOffset = fragment.characterOffset + fragment.length; 419 unsigned endOffset = fragment.characterOffset + fragment.length;
420 420
421 // FIXME: Remove this hack, once the new text layout engine is completly landed. We want to preserve the old layout test results for now. 421 // FIXME: Remove this hack, once the new text layout engine is completly landed. We want to preserve the old layout test results for now.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 ts << " "; 675 ts << " ";
676 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); 676 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource());
677 ts << " "; 677 ts << " ";
678 writeStandardPrefix(ts, *filter, 0); 678 writeStandardPrefix(ts, *filter, 0);
679 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; 679 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
680 } 680 }
681 } 681 }
682 } 682 }
683 683
684 } // namespace blink 684 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698