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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 if (text.parent() && (text.parent()->resolveColor(CSSPropertyColor) != text.
resolveColor(CSSPropertyColor))) | 389 if (text.parent() && (text.parent()->resolveColor(CSSPropertyColor) != text.
resolveColor(CSSPropertyColor))) |
390 writeNameValuePair(ts, "color", text.resolveColor(CSSPropertyColor).name
ForLayoutTreeAsText()); | 390 writeNameValuePair(ts, "color", text.resolveColor(CSSPropertyColor).name
ForLayoutTreeAsText()); |
391 } | 391 } |
392 | 392 |
393 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textB
ox, int indent) | 393 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textB
ox, int indent) |
394 { | 394 { |
395 Vector<SVGTextFragment>& fragments = textBox->textFragments(); | 395 Vector<SVGTextFragment>& fragments = textBox->textFragments(); |
396 if (fragments.isEmpty()) | 396 if (fragments.isEmpty()) |
397 return; | 397 return; |
398 | 398 |
399 LineLayoutSVGInlineText textLineLayout = LineLayoutSVGInlineText(textBox->li
neLayoutItem()); | 399 LineLayoutSVGInlineText textLineLayout = LineLayoutSVGInlineText(textBox->ge
tLineLayoutItem()); |
400 | 400 |
401 const SVGComputedStyle& svgStyle = textLineLayout.style()->svgStyle(); | 401 const SVGComputedStyle& svgStyle = textLineLayout.style()->svgStyle(); |
402 String text = textBox->lineLayoutItem().text(); | 402 String text = textBox->getLineLayoutItem().text(); |
403 | 403 |
404 unsigned fragmentsSize = fragments.size(); | 404 unsigned fragmentsSize = fragments.size(); |
405 for (unsigned i = 0; i < fragmentsSize; ++i) { | 405 for (unsigned i = 0; i < fragmentsSize; ++i) { |
406 SVGTextFragment& fragment = fragments.at(i); | 406 SVGTextFragment& fragment = fragments.at(i); |
407 writeIndent(ts, indent + 1); | 407 writeIndent(ts, indent + 1); |
408 | 408 |
409 unsigned startOffset = fragment.characterOffset; | 409 unsigned startOffset = fragment.characterOffset; |
410 unsigned endOffset = fragment.characterOffset + fragment.length; | 410 unsigned endOffset = fragment.characterOffset + fragment.length; |
411 | 411 |
412 // FIXME: Remove this hack, once the new text layout engine is completly
landed. We want to preserve the old layout test results for now. | 412 // 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 ts << " "; | 665 ts << " "; |
666 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); | 666 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); |
667 ts << " "; | 667 ts << " "; |
668 writeStandardPrefix(ts, *filter, 0); | 668 writeStandardPrefix(ts, *filter, 0); |
669 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n"; | 669 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n"; |
670 } | 670 } |
671 } | 671 } |
672 } | 672 } |
673 | 673 |
674 } // namespace blink | 674 } // namespace blink |
OLD | NEW |