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

Unified Diff: third_party/WebKit/Source/core/dom/TextTest.cpp

Issue 2109073002: Make Text::updateLayoutTextObject() to handle first-letter pseudo element correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-29T17:39:07 Created 4 years, 6 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 | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/TextTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/TextTest.cpp b/third_party/WebKit/Source/core/dom/TextTest.cpp
index edf48d76f8c94fc6cecca458717574bc382ebed3..f0b2f73aeaef997fe7f85a90abe8a72bdb28830f 100644
--- a/third_party/WebKit/Source/core/dom/TextTest.cpp
+++ b/third_party/WebKit/Source/core/dom/TextTest.cpp
@@ -15,6 +15,18 @@ namespace blink {
class TextTest : public EditingTestBase {
};
+TEST_F(TextTest, SetDataToChangeFirstLetterTextNode)
+{
+ setBodyContent("<style>pre::first-letter {color:red;}</style><pre id=sample>a<span>b</span></pre>");
+
+ Node* sample = document().getElementById("sample");
+ Text* text = toText(sample->firstChild());
+ text->setData(" ");
+ updateAllLifecyclePhases();
+
+ EXPECT_FALSE(text->layoutObject()->isTextFragment());
+}
+
TEST_F(TextTest, RemoveFirstLetterPseudoElementWhenNoLetter)
{
setBodyContent("<style>*::first-letter{font:icon;}</style><pre>AB\n</pre>");
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698