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

Side by Side Diff: Source/WebCore/rendering/svg/RenderSVGInlineText.cpp

Issue 6913012: Merge 85335 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGInlineText.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006 Apple Computer Inc. 3 * Copyright (C) 2006 Apple Computer Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) 2008 Rob Buis <buis@kde.org> 5 * Copyright (C) 2008 Rob Buis <buis@kde.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 newString = newString->replace('\t', ' '); 63 newString = newString->replace('\t', ' ');
64 return newString.release(); 64 return newString.release();
65 } 65 }
66 66
67 RenderSVGInlineText::RenderSVGInlineText(Node* n, PassRefPtr<StringImpl> string) 67 RenderSVGInlineText::RenderSVGInlineText(Node* n, PassRefPtr<StringImpl> string)
68 : RenderText(n, applySVGWhitespaceRules(string, false)) 68 : RenderText(n, applySVGWhitespaceRules(string, false))
69 , m_scalingFactor(1) 69 , m_scalingFactor(1)
70 { 70 {
71 } 71 }
72 72
73 void RenderSVGInlineText::destroy()
74 {
75 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor (this))
76 textRenderer->setNeedsPositioningValuesUpdate();
77
78 RenderText::destroy();
79 }
80
73 void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle * oldStyle) 81 void RenderSVGInlineText::styleDidChange(StyleDifference diff, const RenderStyle * oldStyle)
74 { 82 {
75 RenderText::styleDidChange(diff, oldStyle); 83 RenderText::styleDidChange(diff, oldStyle);
76 84
77 if (diff == StyleDifferenceLayout) { 85 if (diff == StyleDifferenceLayout) {
78 // The text metrics may be influenced by style changes. 86 // The text metrics may be influenced by style changes.
79 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAnce stor(this)) 87 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAnce stor(this))
80 textRenderer->setNeedsPositioningValuesUpdate(); 88 textRenderer->setNeedsPositioningValuesUpdate();
81 89
82 updateScaledFont(); 90 updateScaledFont();
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 FontDescription fontDescription(style->fontDescription()); 251 FontDescription fontDescription(style->fontDescription());
244 fontDescription.setComputedSize(fontDescription.computedSize() * scalingFact or); 252 fontDescription.setComputedSize(fontDescription.computedSize() * scalingFact or);
245 253
246 scaledFont = Font(fontDescription, 0, 0); 254 scaledFont = Font(fontDescription, 0, 0);
247 scaledFont.update(styleSelector->fontSelector()); 255 scaledFont.update(styleSelector->fontSelector());
248 } 256 }
249 257
250 } 258 }
251 259
252 #endif // ENABLE(SVG) 260 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/svg/RenderSVGInlineText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698