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

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

Issue 267053002: ASSERT on renderer lifecycle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 RenderText::willBeDestroyed(); 85 RenderText::willBeDestroyed();
86 } 86 }
87 87
88 void RenderTextFragment::setText(PassRefPtr<StringImpl> text, bool force) 88 void RenderTextFragment::setText(PassRefPtr<StringImpl> text, bool force)
89 { 89 {
90 RenderText::setText(text, force); 90 RenderText::setText(text, force);
91 91
92 m_start = 0; 92 m_start = 0;
93 m_end = textLength(); 93 m_end = textLength();
94 if (m_firstLetter) { 94 if (m_firstLetter) {
95 // FIXME: We should not modify the structure of the render tree during
96 // layout. crbug.com/370458
97 DeprecatedDisableModifyRenderTreeStructureAsserts disabler;
98
95 ASSERT(!m_contentString); 99 ASSERT(!m_contentString);
96 m_firstLetter->destroy(); 100 m_firstLetter->destroy();
97 m_firstLetter = 0; 101 m_firstLetter = 0;
98 if (Node* t = node()) { 102 if (Node* t = node()) {
99 ASSERT(!t->renderer()); 103 ASSERT(!t->renderer());
100 t->setRenderer(this); 104 t->setRenderer(this);
101 } 105 }
102 } 106 }
103 } 107 }
104 108
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return; 146 return;
143 RenderObject* nodeRenderer = node()->renderer(); 147 RenderObject* nodeRenderer = node()->renderer();
144 if (!nodeRenderer || !nodeRenderer->isText() || !toRenderText(nodeRenderer)- >isTextFragment()) 148 if (!nodeRenderer || !nodeRenderer->isText() || !toRenderText(nodeRenderer)- >isTextFragment())
145 return; 149 return;
146 150
147 if (isDescendantOf(toRenderTextFragment(nodeRenderer)->m_firstLetter)) 151 if (isDescendantOf(toRenderTextFragment(nodeRenderer)->m_firstLetter))
148 result.setIsFirstLetter(true); 152 result.setIsFirstLetter(true);
149 } 153 }
150 154
151 } // namespace WebCore 155 } // namespace WebCore
OLDNEW
« Source/core/rendering/RenderObject.cpp ('K') | « Source/core/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698