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

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

Issue 38943008: Explore the possibility of implementing the CSS Region interface. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Prototype v2 Created 7 years, 1 month 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return before; 50 return before;
51 default: 51 default:
52 return emptyString(); 52 return emptyString();
53 } 53 }
54 } 54 }
55 55
56 PseudoElement::PseudoElement(Element* parent, PseudoId pseudoId) 56 PseudoElement::PseudoElement(Element* parent, PseudoId pseudoId)
57 : Element(pseudoElementTagName(), &parent->document(), CreatePseudoElement) 57 : Element(pseudoElementTagName(), &parent->document(), CreatePseudoElement)
58 , m_pseudoId(pseudoId) 58 , m_pseudoId(pseudoId)
59 { 59 {
60 ScriptWrappable::init(this);
61
60 ASSERT(pseudoId != NOPSEUDO); 62 ASSERT(pseudoId != NOPSEUDO);
61 setParentOrShadowHostNode(parent); 63 setParentOrShadowHostNode(parent);
62 setHasCustomStyleCallbacks(); 64 setHasCustomStyleCallbacks();
63 } 65 }
64 66
65 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer() 67 PassRefPtr<RenderStyle> PseudoElement::customStyleForRenderer()
66 { 68 {
67 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud oId); 69 return parentOrShadowHostElement()->renderer()->getCachedPseudoStyle(m_pseud oId);
68 } 70 }
69 71
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 116
115 // The style for the RenderTextFragment for first letter is managed by a n enclosing block, not by us. 117 // 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) 118 if (child->style()->styleType() == FIRST_LETTER)
117 continue; 119 continue;
118 120
119 child->setPseudoStyle(renderer->style()); 121 child->setPseudoStyle(renderer->style());
120 } 122 }
121 } 123 }
122 124
123 } // namespace 125 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698