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

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

Issue 12301012: Merge 143060 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 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
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 12 matching lines...) Expand all
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "PseudoElement.h" 28 #include "PseudoElement.h"
29 29
30 #include "ContentData.h" 30 #include "ContentData.h"
31 #include "NodeRenderingContext.h" 31 #include "NodeRenderingContext.h"
32 #include "RenderObject.h" 32 #include "RenderObject.h"
33 #include "RenderQuote.h"
33 34
34 namespace WebCore { 35 namespace WebCore {
35 36
36 const QualifiedName& pseudoElementTagName() 37 const QualifiedName& pseudoElementTagName()
37 { 38 {
38 DEFINE_STATIC_LOCAL(QualifiedName, name, (nullAtom, "<pseudo>", nullAtom)); 39 DEFINE_STATIC_LOCAL(QualifiedName, name, (nullAtom, "<pseudo>", nullAtom));
39 return name; 40 return name;
40 } 41 }
41 42
42 String PseudoElement::pseudoElementNameForEvents(PseudoId pseudoId) 43 String PseudoElement::pseudoElementNameForEvents(PseudoId pseudoId)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 76
76 RenderObject* renderer = this->renderer(); 77 RenderObject* renderer = this->renderer();
77 if (!renderer || !renderer->style()->regionThread().isEmpty()) 78 if (!renderer || !renderer->style()->regionThread().isEmpty())
78 return; 79 return;
79 80
80 RenderStyle* style = renderer->style(); 81 RenderStyle* style = renderer->style();
81 ASSERT(style->contentData()); 82 ASSERT(style->contentData());
82 83
83 for (const ContentData* content = style->contentData(); content; content = c ontent->next()) { 84 for (const ContentData* content = style->contentData(); content; content = c ontent->next()) {
84 RenderObject* child = content->createRenderer(document(), style); 85 RenderObject* child = content->createRenderer(document(), style);
85 if (renderer->isChildAllowed(child, style)) 86 if (renderer->isChildAllowed(child, style)) {
86 renderer->addChild(child); 87 renderer->addChild(child);
87 else 88 if (child->isQuote())
89 toRenderQuote(child)->attachQuote();
90 } else
88 child->destroy(); 91 child->destroy();
89 } 92 }
90 } 93 }
91 94
92 bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context) 95 bool PseudoElement::rendererIsNeeded(const NodeRenderingContext& context)
93 { 96 {
94 return pseudoElementRendererIsNeeded(context.style()); 97 return pseudoElementRendererIsNeeded(context.style());
95 } 98 }
96 99
97 void PseudoElement::didRecalcStyle(StyleChange) 100 void PseudoElement::didRecalcStyle(StyleChange)
(...skipping 11 matching lines...) Expand all
109 112
110 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us. 113 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us.
111 if (child->style()->styleType() == FIRST_LETTER) 114 if (child->style()->styleType() == FIRST_LETTER)
112 continue; 115 continue;
113 116
114 child->setPseudoStyle(renderer->style()); 117 child->setPseudoStyle(renderer->style());
115 } 118 }
116 } 119 }
117 120
118 } // namespace 121 } // namespace
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-generated-content/quote-layout-focus-crash-expected.txt ('k') | Source/WebCore/rendering/RenderQuote.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698