OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2011 Nokia Inc. All rights reserved. | 2 * Copyright (C) 2011 Nokia Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 void RenderQuote::updateText() | 265 void RenderQuote::updateText() |
266 { | 266 { |
267 String text = computeText(); | 267 String text = computeText(); |
268 if (m_text == text) | 268 if (m_text == text) |
269 return; | 269 return; |
270 | 270 |
271 m_text = text; | 271 m_text = text; |
272 | 272 |
273 RenderTextFragment* fragment = findFragmentChild(); | 273 RenderTextFragment* fragment = findFragmentChild(); |
274 if (fragment) { | 274 if (fragment) { |
275 fragment->setStyle(style()); | 275 fragment->setStyle(deprecatedMutableStyle()); |
276 fragment->setContentString(m_text.impl()); | 276 fragment->setContentString(m_text.impl()); |
277 } else { | 277 } else { |
278 fragment = new RenderTextFragment(&document(), m_text.impl()); | 278 fragment = new RenderTextFragment(&document(), m_text.impl()); |
279 fragment->setStyle(style()); | 279 fragment->setStyle(deprecatedMutableStyle()); |
280 addChild(fragment); | 280 addChild(fragment); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 RenderTextFragment* RenderQuote::findFragmentChild() const | 284 RenderTextFragment* RenderQuote::findFragmentChild() const |
285 { | 285 { |
286 // We walk from the end of the child list because, if we've had a first-lett
er | 286 // We walk from the end of the child list because, if we've had a first-lett
er |
287 // renderer inserted then the remaining text will be at the end. | 287 // renderer inserted then the remaining text will be at the end. |
288 while (RenderObject* child = lastChild()) { | 288 while (RenderObject* child = lastChild()) { |
289 if (child->isText() && toRenderText(child)->isTextFragment()) | 289 if (child->isText() && toRenderText(child)->isTextFragment()) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 if (m_depth) | 406 if (m_depth) |
407 m_depth--; | 407 m_depth--; |
408 break; | 408 break; |
409 } | 409 } |
410 } | 410 } |
411 if (oldDepth != m_depth) | 411 if (oldDepth != m_depth) |
412 updateText(); | 412 updateText(); |
413 } | 413 } |
414 | 414 |
415 } // namespace blink | 415 } // namespace blink |
OLD | NEW |