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

Side by Side Diff: Source/core/dom/FirstLetterPseudoElement.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/dom/FirstLetterPseudoElement.h ('k') | Source/core/dom/Fullscreen.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 FirstLetterPseudoElement::FirstLetterPseudoElement(Element* parent) 163 FirstLetterPseudoElement::FirstLetterPseudoElement(Element* parent)
164 : PseudoElement(parent, FIRST_LETTER) 164 : PseudoElement(parent, FIRST_LETTER)
165 , m_remainingTextRenderer(nullptr) 165 , m_remainingTextRenderer(nullptr)
166 { 166 {
167 } 167 }
168 168
169 FirstLetterPseudoElement::~FirstLetterPseudoElement() 169 FirstLetterPseudoElement::~FirstLetterPseudoElement()
170 { 170 {
171 } 171 }
172 172
173 void FirstLetterPseudoElement::trace(Visitor* visitor)
174 {
175 visitor->trace(m_remainingTextRenderer);
176 PseudoElement::trace(visitor);
177 }
178
179 void FirstLetterPseudoElement::updateTextFragments() 173 void FirstLetterPseudoElement::updateTextFragments()
180 { 174 {
181 String oldText = m_remainingTextRenderer->completeText(); 175 String oldText = m_remainingTextRenderer->completeText();
182 ASSERT(oldText.impl()); 176 ASSERT(oldText.impl());
183 177
184 unsigned length = FirstLetterPseudoElement::firstLetterLength(oldText); 178 unsigned length = FirstLetterPseudoElement::firstLetterLength(oldText);
185 m_remainingTextRenderer->setTextFragment(oldText.impl()->substring(length, o ldText.length()), length, oldText.length() - length); 179 m_remainingTextRenderer->setTextFragment(oldText.impl()->substring(length, o ldText.length()), length, oldText.length() - length);
186 m_remainingTextRenderer->dirtyLineBoxes(); 180 m_remainingTextRenderer->dirtyLineBoxes();
187 181
188 for (auto child = renderer()->slowFirstChild(); child; child = child->nextSi bling()) { 182 for (auto child = renderer()->slowFirstChild(); child; child = child->nextSi bling()) {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 304
311 // We only manage the style for the generated content items. 305 // We only manage the style for the generated content items.
312 if (!child->isText() && !child->isQuote() && !child->isImage()) 306 if (!child->isText() && !child->isQuote() && !child->isImage())
313 continue; 307 continue;
314 308
315 child->setPseudoStyle(renderer->style()); 309 child->setPseudoStyle(renderer->style());
316 } 310 }
317 } 311 }
318 312
319 } // namespace blink 313 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/FirstLetterPseudoElement.h ('k') | Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698