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

Side by Side Diff: third_party/WebKit/WebCore/rendering/SVGRootInlineBox.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 * This file is part of the WebKit project. 2 * This file is part of the WebKit project.
3 * 3 *
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * (C) 2006 Apple Computer Inc. 5 * (C) 2006 Apple Computer Inc.
6 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 6 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 (computedHeight <= 0.0f && chunk.isVerticalText)) 813 (computedHeight <= 0.0f && chunk.isVerticalText))
814 return 0.0f; 814 return 0.0f;
815 815
816 if (chunk.isVerticalText) 816 if (chunk.isVerticalText)
817 computedLength = computedHeight; 817 computedLength = computedHeight;
818 else 818 else
819 computedLength = computedWidth; 819 computedLength = computedWidth;
820 820
821 if (lengthAdjust == SVGTextContentElement::LENGTHADJUST_SPACINGANDGLYPHS) { 821 if (lengthAdjust == SVGTextContentElement::LENGTHADJUST_SPACINGANDGLYPHS) {
822 if (chunk.isVerticalText) 822 if (chunk.isVerticalText)
823 chunk.ctm.scale(1.0f, chunk.textLength / computedLength); 823 chunk.ctm.scaleNonUniform(1.0f, chunk.textLength / computedLength);
824 else 824 else
825 chunk.ctm.scale(chunk.textLength / computedLength, 1.0f); 825 chunk.ctm.scaleNonUniform(chunk.textLength / computedLength, 1.0f);
826 826
827 return 0.0f; 827 return 0.0f;
828 } 828 }
829 829
830 return (chunk.textLength - computedLength) / float(chunk.end - chunk.start); 830 return (chunk.textLength - computedLength) / float(chunk.end - chunk.start);
831 } 831 }
832 832
833 static void applyTextLengthCorrectionToTextChunk(SVGTextChunk& chunk) 833 static void applyTextLengthCorrectionToTextChunk(SVGTextChunk& chunk)
834 { 834 {
835 // This method is not called for chunks containing chars aligned on a path. 835 // This method is not called for chunks containing chars aligned on a path.
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 } 1710 }
1711 1711
1712 if (!textBox && startedFirstChunk) 1712 if (!textBox && startedFirstChunk)
1713 walker->end(lastNotifiedBox); 1713 walker->end(lastNotifiedBox);
1714 } 1714 }
1715 } 1715 }
1716 1716
1717 } // namespace WebCore 1717 } // namespace WebCore
1718 1718
1719 #endif // ENABLE(SVG) 1719 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/SVGCharacterLayoutInfo.cpp ('k') | third_party/WebKit/WebCore/rendering/bidi.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698