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

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

Issue 869323003: Oilpan: move RenderObjects off heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review-induced improvements Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderTextFragment.h ('k') | Source/core/rendering/RenderVTTCue.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 * (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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 void RenderTextFragment::destroy() 60 void RenderTextFragment::destroy()
61 { 61 {
62 if (m_isRemainingTextRenderer && m_firstLetterPseudoElement) 62 if (m_isRemainingTextRenderer && m_firstLetterPseudoElement)
63 m_firstLetterPseudoElement->setRemainingTextRenderer(nullptr); 63 m_firstLetterPseudoElement->setRemainingTextRenderer(nullptr);
64 m_firstLetterPseudoElement = nullptr; 64 m_firstLetterPseudoElement = nullptr;
65 RenderText::destroy(); 65 RenderText::destroy();
66 } 66 }
67 67
68 void RenderTextFragment::trace(Visitor* visitor)
69 {
70 visitor->trace(m_firstLetterPseudoElement);
71 RenderText::trace(visitor);
72 }
73
74 PassRefPtr<StringImpl> RenderTextFragment::completeText() const 68 PassRefPtr<StringImpl> RenderTextFragment::completeText() const
75 { 69 {
76 Text* text = associatedTextNode(); 70 Text* text = associatedTextNode();
77 return text ? text->dataImpl() : contentString(); 71 return text ? text->dataImpl() : contentString();
78 } 72 }
79 73
80 void RenderTextFragment::setContentString(StringImpl* str) 74 void RenderTextFragment::setContentString(StringImpl* str)
81 { 75 {
82 m_contentString = str; 76 m_contentString = str;
83 setText(str); 77 setText(str);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 FirstLetterPseudoElement* pseudo = toFirstLetterPseudoElement(node); 145 FirstLetterPseudoElement* pseudo = toFirstLetterPseudoElement(node);
152 RenderObject* nextRenderer = FirstLetterPseudoElement::firstLetterTextRe nderer(*pseudo); 146 RenderObject* nextRenderer = FirstLetterPseudoElement::firstLetterTextRe nderer(*pseudo);
153 if (!nextRenderer) 147 if (!nextRenderer)
154 return nullptr; 148 return nullptr;
155 node = nextRenderer->node(); 149 node = nextRenderer->node();
156 } 150 }
157 return (node && node->isTextNode()) ? toText(node) : nullptr; 151 return (node && node->isTextNode()) ? toText(node) : nullptr;
158 } 152 }
159 153
160 } // namespace blink 154 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextFragment.h ('k') | Source/core/rendering/RenderVTTCue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698