| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 if (text.parent() && (text.parent()->resolveColor(CSSPropertyColor) != text.
resolveColor(CSSPropertyColor))) | 392 if (text.parent() && (text.parent()->resolveColor(CSSPropertyColor) != text.
resolveColor(CSSPropertyColor))) |
| 393 writeNameValuePair(ts, "color", text.resolveColor(CSSPropertyColor).name
ForLayoutTreeAsText()); | 393 writeNameValuePair(ts, "color", text.resolveColor(CSSPropertyColor).name
ForLayoutTreeAsText()); |
| 394 } | 394 } |
| 395 | 395 |
| 396 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textB
ox, int indent) | 396 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textB
ox, int indent) |
| 397 { | 397 { |
| 398 Vector<SVGTextFragment>& fragments = textBox->textFragments(); | 398 Vector<SVGTextFragment>& fragments = textBox->textFragments(); |
| 399 if (fragments.isEmpty()) | 399 if (fragments.isEmpty()) |
| 400 return; | 400 return; |
| 401 | 401 |
| 402 LayoutSVGInlineText& textRenderer = toLayoutSVGInlineText(textBox->renderer(
)); | 402 LayoutSVGInlineText& textRenderer = toLayoutSVGInlineText(textBox->layoutObj
ect()); |
| 403 | 403 |
| 404 const SVGLayoutStyle& svgStyle = textRenderer.style()->svgStyle(); | 404 const SVGLayoutStyle& svgStyle = textRenderer.style()->svgStyle(); |
| 405 String text = textBox->renderer().text(); | 405 String text = textBox->layoutObject().text(); |
| 406 | 406 |
| 407 unsigned fragmentsSize = fragments.size(); | 407 unsigned fragmentsSize = fragments.size(); |
| 408 for (unsigned i = 0; i < fragmentsSize; ++i) { | 408 for (unsigned i = 0; i < fragmentsSize; ++i) { |
| 409 SVGTextFragment& fragment = fragments.at(i); | 409 SVGTextFragment& fragment = fragments.at(i); |
| 410 writeIndent(ts, indent + 1); | 410 writeIndent(ts, indent + 1); |
| 411 | 411 |
| 412 unsigned startOffset = fragment.characterOffset; | 412 unsigned startOffset = fragment.characterOffset; |
| 413 unsigned endOffset = fragment.characterOffset + fragment.length; | 413 unsigned endOffset = fragment.characterOffset + fragment.length; |
| 414 | 414 |
| 415 // FIXME: Remove this hack, once the new text layout engine is completly
landed. We want to preserve the old layout test results for now. | 415 // 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 Loading... |
| 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 blink | 678 } // namespace blink |
| OLD | NEW |