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

Side by Side Diff: Source/WebCore/rendering/RenderCombineText.cpp

Issue 11190053: Merge 131077 - <rdar://problem/12477191> Combined text reverts to full-width font after a style cha… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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 | « LayoutTests/fast/text/text-combine-width-after-style-change-expected.html ('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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 23 matching lines...) Expand all
34 , m_isCombined(false) 34 , m_isCombined(false)
35 , m_needsFontUpdate(false) 35 , m_needsFontUpdate(false)
36 { 36 {
37 } 37 }
38 38
39 void RenderCombineText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) 39 void RenderCombineText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
40 { 40 {
41 setStyleInternal(RenderStyle::clone(style())); 41 setStyleInternal(RenderStyle::clone(style()));
42 RenderText::styleDidChange(diff, oldStyle); 42 RenderText::styleDidChange(diff, oldStyle);
43 43
44 if (m_isCombined) 44 if (m_isCombined) {
45 RenderText::setTextInternal(originalText()); // This RenderCombineText h as been combined once. Restore the original text for the next combineText(). 45 RenderText::setTextInternal(originalText()); // This RenderCombineText h as been combined once. Restore the original text for the next combineText().
46 m_isCombined = false;
47 }
46 48
47 m_needsFontUpdate = true; 49 m_needsFontUpdate = true;
48 } 50 }
49 51
50 void RenderCombineText::setTextInternal(PassRefPtr<StringImpl> text) 52 void RenderCombineText::setTextInternal(PassRefPtr<StringImpl> text)
51 { 53 {
52 RenderText::setTextInternal(text); 54 RenderText::setTextInternal(text);
53 55
54 m_needsFontUpdate = true; 56 m_needsFontUpdate = true;
55 } 57 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (shouldUpdateFont) 132 if (shouldUpdateFont)
131 style()->font().update(style()->font().fontSelector()); 133 style()->font().update(style()->font().fontSelector());
132 134
133 if (m_isCombined) { 135 if (m_isCombined) {
134 DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectRe placementCharacter, 1)); 136 DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectRe placementCharacter, 1));
135 RenderText::setTextInternal(objectReplacementCharacterString.impl()); 137 RenderText::setTextInternal(objectReplacementCharacterString.impl());
136 } 138 }
137 } 139 }
138 140
139 } // namespace WebCore 141 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/text-combine-width-after-style-change-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698