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

Unified Diff: Source/core/dom/PseudoElement.h

Issue 639863006: Revert of Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/dom/PseudoElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/PseudoElement.h
diff --git a/Source/core/dom/PseudoElement.h b/Source/core/dom/PseudoElement.h
index 14c7cf9a2d06ca4e63d0017d5f07a0a2f7ebb09a..db6671fa6fd5cd9b3088f8f2cead7ebca09c9ec1 100644
--- a/Source/core/dom/PseudoElement.h
+++ b/Source/core/dom/PseudoElement.h
@@ -32,9 +32,12 @@
namespace blink {
-class PseudoElement : public Element {
+class PseudoElement final : public Element {
public:
- static PassRefPtrWillBeRawPtr<PseudoElement> create(Element* parent, PseudoId);
+ static PassRefPtrWillBeRawPtr<PseudoElement> create(Element* parent, PseudoId pseudoId)
+ {
+ return adoptRefWillBeNoop(new PseudoElement(parent, pseudoId));
+ }
virtual PassRefPtr<RenderStyle> customStyleForRenderer() override;
virtual void attach(const AttachContext& = AttachContext()) override;
@@ -46,12 +49,11 @@ public:
static String pseudoElementNameForEvents(PseudoId);
- virtual void dispose();
+ void dispose();
-protected:
+private:
PseudoElement(Element*, PseudoId);
-private:
virtual void didRecalcStyle(StyleRecalcChange) override;
PseudoId m_pseudoId;
@@ -61,13 +63,7 @@ const QualifiedName& pseudoElementTagName();
inline bool pseudoElementRendererIsNeeded(const RenderStyle* style)
{
- if (!style)
- return false;
- if (style->display() == NONE)
- return false;
- if (style->styleType() == FIRST_LETTER || style->styleType() == BACKDROP)
- return true;
- return style->contentData();
+ return style && style->display() != NONE && (style->styleType() == BACKDROP || style->contentData());
}
DEFINE_ELEMENT_TYPE_CASTS(PseudoElement, isPseudoElement());
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/dom/PseudoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698