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

Unified Diff: third_party/WebKit/Source/core/dom/Text.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 | « no previous file | third_party/WebKit/Source/core/dom/TextTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Text.cpp
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp
index 637ff97396f7a866e972a884f942e4044dd70406..b592b24ec596f23f3ea67e09c69d10587f9a7ec9 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -415,9 +415,9 @@ static bool shouldUpdateLayoutByReattaching(const Text& textNode, LayoutText* te
if (!textNode.textLayoutObjectIsNeeded(*textLayoutObject->style(), *textLayoutObject->parent()))
return true;
if (textLayoutObject->isTextFragment()) {
- FirstLetterPseudoElement* pseudo = toLayoutTextFragment(textLayoutObject)->firstLetterPseudoElement();
- if (pseudo && !FirstLetterPseudoElement::firstLetterTextLayoutObject(*pseudo))
- return true;
+ // Changes of |textNode| may change first letter part, so we should
+ // reattach.
+ return toLayoutTextFragment(textLayoutObject)->firstLetterPseudoElement();
}
return false;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/TextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698