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

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

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/PseudoElement.h ('k') | Source/core/dom/RenderTreeBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/PseudoElement.cpp
diff --git a/Source/core/dom/PseudoElement.cpp b/Source/core/dom/PseudoElement.cpp
index 559b1742fd5bb4e43ba40de4f827900c7eade58f..9e3d981ea39d84921a1f192a096b052e1c2636c4 100644
--- a/Source/core/dom/PseudoElement.cpp
+++ b/Source/core/dom/PseudoElement.cpp
@@ -27,7 +27,6 @@
#include "config.h"
#include "core/dom/PseudoElement.h"
-#include "core/dom/FirstLetterPseudoElement.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderQuote.h"
@@ -35,11 +34,6 @@
namespace blink {
-PassRefPtrWillBeRawPtr<PseudoElement> PseudoElement::create(Element* parent, PseudoId pseudoId)
-{
- return adoptRefWillBeNoop(new PseudoElement(parent, pseudoId));
-}
-
const QualifiedName& pseudoElementTagName(PseudoId pseudoId)
{
switch (pseudoId) {
@@ -55,10 +49,6 @@ const QualifiedName& pseudoElementTagName(PseudoId pseudoId)
DEFINE_STATIC_LOCAL(QualifiedName, backdrop, (nullAtom, "<pseudo:backdrop>", nullAtom));
return backdrop;
}
- case FIRST_LETTER: {
- DEFINE_STATIC_LOCAL(QualifiedName, firstLetter, (nullAtom, "<pseudo:first-letter>", nullAtom));
- return firstLetter;
- }
default: {
ASSERT_NOT_REACHED();
}
@@ -119,7 +109,6 @@ void PseudoElement::attach(const AttachContext& context)
RenderObject* renderer = this->renderer();
if (!renderer)
return;
-
RenderStyle* style = renderer->style();
if (style->styleType() != BEFORE && style->styleType() != AFTER)
return;
@@ -154,6 +143,10 @@ void PseudoElement::didRecalcStyle(StyleRecalcChange)
if (!child->isText() && !child->isQuote() && !child->isImage())
continue;
+ // The style for the RenderTextFragment for first letter is managed by an enclosing block, not by us.
+ if (child->style()->styleType() == FIRST_LETTER)
+ continue;
+
child->setPseudoStyle(renderer->style());
}
}
« no previous file with comments | « Source/core/dom/PseudoElement.h ('k') | Source/core/dom/RenderTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698