Chromium Code Reviews| 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..fd1861b875d2dbececa75e8debbc847903c7275a 100644 |
| --- a/third_party/WebKit/Source/core/dom/Text.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Text.cpp |
| @@ -415,9 +415,14 @@ 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; |
| + if (!toLayoutTextFragment(textLayoutObject)->firstLetterPseudoElement()) { |
|
tkent
2016/06/29 08:27:38
The new code is equivalent to
return toLayoutT
yosin_UTC9
2016/06/29 08:41:10
Yes, it seems my brain is damaged... :-<
|
| + // When |textLayoutObject| isn't associated to first-letter, we |
| + // change |textLayoutObject| directly. |
| + return false; |
| + } |
| + // Changes of |textNode| may change first letter part, so we should |
| + // reattach. |
| + return toLayoutTextFragment(textLayoutObject)->firstLetterPseudoElement(); |
| } |
| return false; |
| } |