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

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

Issue 12278026: Merge 142500 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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
« no previous file with comments | « Source/WebCore/rendering/RenderObjectChildList.cpp ('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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void RenderTextFragment::setText(PassRefPtr<StringImpl> text, bool force) 78 void RenderTextFragment::setText(PassRefPtr<StringImpl> text, bool force)
79 { 79 {
80 RenderText::setText(text, force); 80 RenderText::setText(text, force);
81 81
82 m_start = 0; 82 m_start = 0;
83 m_end = textLength(); 83 m_end = textLength();
84 if (m_firstLetter) { 84 if (m_firstLetter) {
85 ASSERT(!m_contentString); 85 ASSERT(!m_contentString);
86 m_firstLetter->destroy(); 86 m_firstLetter->destroy();
87 m_firstLetter = 0; 87 m_firstLetter = 0;
88 ASSERT(!node() || node()->renderer() == this); 88 if (Node* t = node()) {
89 ASSERT(!t->renderer());
90 t->setRenderer(this);
91 }
89 } 92 }
90 } 93 }
91 94
92 void RenderTextFragment::transformText() 95 void RenderTextFragment::transformText()
93 { 96 {
94 // Don't reset first-letter here because we are only transforming the trunca ted fragment. 97 // Don't reset first-letter here because we are only transforming the trunca ted fragment.
95 if (RefPtr<StringImpl> textToTransform = originalText()) 98 if (RefPtr<StringImpl> textToTransform = originalText())
96 RenderText::setText(textToTransform.release(), true); 99 RenderText::setText(textToTransform.release(), true);
97 } 100 }
98 101
(...skipping 14 matching lines...) Expand all
113 if (!m_firstLetter) 116 if (!m_firstLetter)
114 return 0; 117 return 0;
115 for (RenderObject* block = m_firstLetter->parent(); block; block = block->pa rent()) { 118 for (RenderObject* block = m_firstLetter->parent(); block; block = block->pa rent()) {
116 if (block->style()->hasPseudoStyle(FIRST_LETTER) && block->canHaveChildr en() && block->isRenderBlock()) 119 if (block->style()->hasPseudoStyle(FIRST_LETTER) && block->canHaveChildr en() && block->isRenderBlock())
117 return toRenderBlock(block); 120 return toRenderBlock(block);
118 } 121 }
119 return 0; 122 return 0;
120 } 123 }
121 124
122 } // namespace WebCore 125 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObjectChildList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698