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

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

Issue 10913091: Merge 125343 (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 | « LayoutTests/fast/css-generated-content/quote-crash-93750-expected.txt ('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 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 m_next = m_previous->m_next; 285 m_next = m_previous->m_next;
286 m_previous->m_next = this; 286 m_previous->m_next = this;
287 if (m_next) 287 if (m_next)
288 m_next->m_previous = this; 288 m_next->m_previous = this;
289 break; 289 break;
290 } 290 }
291 291
292 if (!m_previous) { 292 if (!m_previous) {
293 m_next = view()->renderQuoteHead(); 293 m_next = view()->renderQuoteHead();
294 view()->setRenderQuoteHead(this); 294 view()->setRenderQuoteHead(this);
295 if (m_next)
296 m_next->m_previous = this;
295 } 297 }
296 m_attached = true; 298 m_attached = true;
297 299
298 for (RenderQuote* quote = this; quote; quote = quote->m_next) 300 for (RenderQuote* quote = this; quote; quote = quote->m_next)
299 quote->updateDepth(); 301 quote->updateDepth();
300 302
301 ASSERT(!m_next || m_next->m_attached); 303 ASSERT(!m_next || m_next->m_attached);
304 ASSERT(!m_next || m_next->m_previous == this);
302 ASSERT(!m_previous || m_previous->m_attached); 305 ASSERT(!m_previous || m_previous->m_attached);
306 ASSERT(!m_previous || m_previous->m_next == this);
303 } 307 }
304 308
305 void RenderQuote::detachQuote() 309 void RenderQuote::detachQuote()
306 { 310 {
307 ASSERT(!m_next || m_next->m_attached); 311 ASSERT(!m_next || m_next->m_attached);
308 ASSERT(!m_previous || m_previous->m_attached); 312 ASSERT(!m_previous || m_previous->m_attached);
309 if (!m_attached) 313 if (!m_attached)
310 return; 314 return;
311 if (m_previous) 315 if (m_previous)
312 m_previous->m_next = m_next; 316 m_previous->m_next = m_next;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 349 }
346 // FIXME: Don't call setNeedsLayout or dirty our preferred widths during lay out. 350 // FIXME: Don't call setNeedsLayout or dirty our preferred widths during lay out.
347 // This is likely to fail anyway as one of our ancestor will call setNeedsLa yout(false), 351 // This is likely to fail anyway as one of our ancestor will call setNeedsLa yout(false),
348 // preventing the future layout to occur on |this|. The solution is to move that to a 352 // preventing the future layout to occur on |this|. The solution is to move that to a
349 // pre-layout phase. 353 // pre-layout phase.
350 if (oldDepth != m_depth) 354 if (oldDepth != m_depth)
351 setNeedsLayoutAndPrefWidthsRecalc(); 355 setNeedsLayoutAndPrefWidthsRecalc();
352 } 356 }
353 357
354 } // namespace WebCore 358 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-generated-content/quote-crash-93750-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698