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

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

Issue 23731003: Have ContentData::createRenderer() take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « no previous file | Source/core/rendering/style/ContentData.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) 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (!renderer) 82 if (!renderer)
83 return; 83 return;
84 RenderStyle* style = renderer->style(); 84 RenderStyle* style = renderer->style();
85 if (!style->regionThread().isEmpty()) 85 if (!style->regionThread().isEmpty())
86 return; 86 return;
87 if (style->styleType() != BEFORE && style->styleType() != AFTER) 87 if (style->styleType() != BEFORE && style->styleType() != AFTER)
88 return; 88 return;
89 ASSERT(style->contentData()); 89 ASSERT(style->contentData());
90 90
91 for (const ContentData* content = style->contentData(); content; content = c ontent->next()) { 91 for (const ContentData* content = style->contentData(); content; content = c ontent->next()) {
92 RenderObject* child = content->createRenderer(&document(), style); 92 RenderObject* child = content->createRenderer(document(), style);
93 if (renderer->isChildAllowed(child, style)) { 93 if (renderer->isChildAllowed(child, style)) {
94 renderer->addChild(child); 94 renderer->addChild(child);
95 if (child->isQuote()) 95 if (child->isQuote())
96 toRenderQuote(child)->attachQuote(); 96 toRenderQuote(child)->attachQuote();
97 } else 97 } else
98 child->destroy(); 98 child->destroy();
99 } 99 }
100 } 100 }
101 101
102 bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context) 102 bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context)
(...skipping 16 matching lines...) Expand all
119 119
120 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us. 120 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us.
121 if (child->style()->styleType() == FIRST_LETTER) 121 if (child->style()->styleType() == FIRST_LETTER)
122 continue; 122 continue;
123 123
124 child->setPseudoStyle(renderer->style()); 124 child->setPseudoStyle(renderer->style());
125 } 125 }
126 } 126 }
127 127
128 } // namespace 128 } // namespace
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/style/ContentData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698