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

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

Issue 10916347: Merge 127381 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 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/RenderQuote.h ('k') | Source/WebCore/rendering/RenderText.h » ('j') | 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 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 return StringImpl::empty(); 235 return StringImpl::empty();
236 case CLOSE_QUOTE: 236 case CLOSE_QUOTE:
237 return quotesData()->getCloseQuote(m_depth - 1).impl(); 237 return quotesData()->getCloseQuote(m_depth - 1).impl();
238 case OPEN_QUOTE: 238 case OPEN_QUOTE:
239 return quotesData()->getOpenQuote(m_depth).impl(); 239 return quotesData()->getOpenQuote(m_depth).impl();
240 } 240 }
241 ASSERT_NOT_REACHED(); 241 ASSERT_NOT_REACHED();
242 return StringImpl::empty(); 242 return StringImpl::empty();
243 } 243 }
244 244
245 void RenderQuote::updateText()
246 {
247 computePreferredLogicalWidths(0);
248 }
249
245 void RenderQuote::computePreferredLogicalWidths(float lead) 250 void RenderQuote::computePreferredLogicalWidths(float lead)
246 { 251 {
247 if (!m_attached) 252 if (!m_attached)
248 attachQuote(); 253 attachQuote();
249 setTextInternal(originalText()); 254 setTextInternal(originalText());
250 RenderText::computePreferredLogicalWidths(lead); 255 RenderText::computePreferredLogicalWidths(lead);
251 } 256 }
252 257
253 const QuotesData* RenderQuote::quotesData() const 258 const QuotesData* RenderQuote::quotesData() const
254 { 259 {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 361 }
357 // FIXME: Don't call setNeedsLayout or dirty our preferred widths during lay out. 362 // FIXME: Don't call setNeedsLayout or dirty our preferred widths during lay out.
358 // This is likely to fail anyway as one of our ancestor will call setNeedsLa yout(false), 363 // This is likely to fail anyway as one of our ancestor will call setNeedsLa yout(false),
359 // preventing the future layout to occur on |this|. The solution is to move that to a 364 // preventing the future layout to occur on |this|. The solution is to move that to a
360 // pre-layout phase. 365 // pre-layout phase.
361 if (oldDepth != m_depth) 366 if (oldDepth != m_depth)
362 setNeedsLayoutAndPrefWidthsRecalc(); 367 setNeedsLayoutAndPrefWidthsRecalc();
363 } 368 }
364 369
365 } // namespace WebCore 370 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderQuote.h ('k') | Source/WebCore/rendering/RenderText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698