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

Unified Diff: Source/core/rendering/RenderTreeAsText.cpp

Issue 571603003: Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master 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
Index: Source/core/rendering/RenderTreeAsText.cpp
diff --git a/Source/core/rendering/RenderTreeAsText.cpp b/Source/core/rendering/RenderTreeAsText.cpp
index 6fb01b89623dd2a2645ff5a37939fe8f78a3816d..8ecb8923711f786cacb55e4bbb82060a6dfa3d84 100644
--- a/Source/core/rendering/RenderTreeAsText.cpp
+++ b/Source/core/rendering/RenderTreeAsText.cpp
@@ -29,6 +29,7 @@
#include "core/HTMLNames.h"
#include "core/css/StylePropertySet.h"
#include "core/dom/Document.h"
+#include "core/dom/PseudoElement.h"
#include "core/editing/FrameSelection.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
@@ -176,7 +177,7 @@ void RenderTreeAsText::writeRenderObject(TextStream& ts, const RenderObject& o,
if (o.node()) {
String tagName = getTagName(o.node());
// FIXME: Temporary hack to make tests pass by simulating the old generated content output.
- if (o.isPseudoElement() || (o.parent() && o.parent()->isPseudoElement()))
+ if (o.isPseudoElement() || (o.parent() && o.parent()->isPseudoElement() && toPseudoElement(o.parent()->node())->pseudoId() != FIRST_LETTER))
Julien - ping for review 2014/10/09 18:24:49 :-( I would like us to remove this code upfront (
dsinclair 2014/10/09 21:14:23 Done. https://codereview.chromium.org/645623003
tagName = emptyAtom;
if (!tagName.isEmpty()) {
ts << " {" << tagName << "}";
« Source/core/rendering/RenderTextFragment.cpp ('K') | « Source/core/rendering/RenderTextFragment.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698