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

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

Issue 2752163003: Clear pseudoElement from ElementRareData when FirstLetterPseudoElement doesn't have a LayoutObject (Closed)
Patch Set: Change test to be testharness Created 3 years, 8 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/LayoutTests/fast/css/crash-in-attachFirstLetterTextLayoutObjects.html ('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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 56eede0205aa29a9d07182d06914186997cdd3ec..09511f777b024f27d8fbca790d877439bc87d4b8 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2086,9 +2086,12 @@ void Element::rebuildShadowRootLayoutTree(Text*& nextTextSibling) {
void Element::rebuildPseudoElementLayoutTree(PseudoId pseudoId,
Text* nextTextSibling) {
if (PseudoElement* element = pseudoElement(pseudoId)) {
+ if (pseudoId == PseudoIdFirstLetter && updateFirstLetter(element))
+ return;
if (element->needsReattachLayoutTree() ||
- element->childNeedsReattachLayoutTree())
+ element->childNeedsReattachLayoutTree()) {
element->rebuildLayoutTree(nextTextSibling);
+ }
} else {
createPseudoElementIfNeeded(pseudoId);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/crash-in-attachFirstLetterTextLayoutObjects.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698