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

Side by Side Diff: third_party/WebKit/Source/core/dom/FirstLetterPseudoElement.cpp

Issue 2164493002: Renamed Node::attach to Node::attachLayoutTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 { 205 {
206 // The text fragment we get our content from is being destroyed. We need 206 // The text fragment we get our content from is being destroyed. We need
207 // to tell our parent element to recalcStyle so we can get cleaned up 207 // to tell our parent element to recalcStyle so we can get cleaned up
208 // as well. 208 // as well.
209 if (!fragment) 209 if (!fragment)
210 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::PseudoClass)); 210 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::PseudoClass));
211 211
212 m_remainingTextLayoutObject = fragment; 212 m_remainingTextLayoutObject = fragment;
213 } 213 }
214 214
215 void FirstLetterPseudoElement::attach(const AttachContext& context) 215 void FirstLetterPseudoElement::attachLayoutTree(const AttachContext& context)
216 { 216 {
217 PseudoElement::attach(context); 217 PseudoElement::attachLayoutTree(context);
218 attachFirstLetterTextLayoutObjects(); 218 attachFirstLetterTextLayoutObjects();
219 } 219 }
220 220
221 void FirstLetterPseudoElement::detach(const AttachContext& context) 221 void FirstLetterPseudoElement::detach(const AttachContext& context)
222 { 222 {
223 if (m_remainingTextLayoutObject) { 223 if (m_remainingTextLayoutObject) {
224 if (m_remainingTextLayoutObject->node() && document().isActive()) { 224 if (m_remainingTextLayoutObject->node() && document().isActive()) {
225 Text* textNode = toText(m_remainingTextLayoutObject->node()); 225 Text* textNode = toText(m_remainingTextLayoutObject->node());
226 m_remainingTextLayoutObject->setTextFragment(textNode->dataImpl(), 0 , textNode->dataImpl()->length()); 226 m_remainingTextLayoutObject->setTextFragment(textNode->dataImpl(), 0 , textNode->dataImpl()->length());
227 } 227 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 // We only manage the style for the generated content items. 314 // We only manage the style for the generated content items.
315 if (!child->isText() && !child->isQuote() && !child->isImage()) 315 if (!child->isText() && !child->isQuote() && !child->isImage())
316 continue; 316 continue;
317 317
318 child->setPseudoStyle(layoutObject->mutableStyle()); 318 child->setPseudoStyle(layoutObject->mutableStyle());
319 } 319 }
320 } 320 }
321 321
322 } // namespace blink 322 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698