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

Side by Side Diff: Source/core/dom/PseudoElement.cpp

Issue 24430002: Rename attach and detach to createRenderTree/destroyRenderTree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ASSERT(pseudoId != NOPSEUDO); 60 ASSERT(pseudoId != NOPSEUDO);
61 setParentOrShadowHostNode(parent); 61 setParentOrShadowHostNode(parent);
62 setHasCustomStyleCallbacks(); 62 setHasCustomStyleCallbacks();
63 } 63 }
64 64
65 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer() 65 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer()
66 { 66 {
67 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud oId); 67 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud oId);
68 } 68 }
69 69
70 void PseudoElement::attach(const AttachContext& context) 70 void PseudoElement::createRenderTree(const AttachContext& context)
71 { 71 {
72 ASSERT(!renderer()); 72 ASSERT(!renderer());
73 73
74 Element::attach(context); 74 Element::createRenderTree(context);
75 75
76 RenderObject* renderer = this->renderer(); 76 RenderObject* renderer = this->renderer();
77 if (!renderer) 77 if (!renderer)
78 return; 78 return;
79 RenderStyle* style = renderer->style(); 79 RenderStyle* style = renderer->style();
80 if (!style->regionThread().isEmpty()) 80 if (!style->regionThread().isEmpty())
81 return; 81 return;
82 if (style->styleType() != BEFORE && style->styleType() != AFTER) 82 if (style->styleType() != BEFORE && style->styleType() != AFTER)
83 return; 83 return;
84 ASSERT(style->contentData()); 84 ASSERT(style->contentData());
(...skipping 29 matching lines...) Expand all
114 114
115 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us. 115 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us.
116 if (child->style()->styleType() == FIRST_LETTER) 116 if (child->style()->styleType() == FIRST_LETTER)
117 continue; 117 continue;
118 118
119 child->setPseudoStyle(renderer->style()); 119 child->setPseudoStyle(renderer->style());
120 } 120 }
121 } 121 }
122 122
123 } // namespace 123 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698