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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 // TODO(rune@opera.com): nextTextSibling is not set correctly when we have 2079 // TODO(rune@opera.com): nextTextSibling is not set correctly when we have
2080 // slotted nodes (crbug.com/648931). Also, it may be incorrect when we have 2080 // slotted nodes (crbug.com/648931). Also, it may be incorrect when we have
2081 // multiple shadow roots (for V0 shadow hosts). 2081 // multiple shadow roots (for V0 shadow hosts).
2082 root->rebuildLayoutTree(nextTextSibling); 2082 root->rebuildLayoutTree(nextTextSibling);
2083 } 2083 }
2084 } 2084 }
2085 2085
2086 void Element::rebuildPseudoElementLayoutTree(PseudoId pseudoId, 2086 void Element::rebuildPseudoElementLayoutTree(PseudoId pseudoId,
2087 Text* nextTextSibling) { 2087 Text* nextTextSibling) {
2088 if (PseudoElement* element = pseudoElement(pseudoId)) { 2088 if (PseudoElement* element = pseudoElement(pseudoId)) {
2089 if (pseudoId == PseudoIdFirstLetter && updateFirstLetter(element))
2090 return;
2089 if (element->needsReattachLayoutTree() || 2091 if (element->needsReattachLayoutTree() ||
2090 element->childNeedsReattachLayoutTree()) 2092 element->childNeedsReattachLayoutTree()) {
2091 element->rebuildLayoutTree(nextTextSibling); 2093 element->rebuildLayoutTree(nextTextSibling);
2094 }
2092 } else { 2095 } else {
2093 createPseudoElementIfNeeded(pseudoId); 2096 createPseudoElementIfNeeded(pseudoId);
2094 } 2097 }
2095 } 2098 }
2096 2099
2097 void Element::updateCallbackSelectors(const ComputedStyle* oldStyle, 2100 void Element::updateCallbackSelectors(const ComputedStyle* oldStyle,
2098 const ComputedStyle* newStyle) { 2101 const ComputedStyle* newStyle) {
2099 Vector<String> emptyVector; 2102 Vector<String> emptyVector;
2100 const Vector<String>& oldCallbackSelectors = 2103 const Vector<String>& oldCallbackSelectors =
2101 oldStyle ? oldStyle->callbackSelectors() : emptyVector; 2104 oldStyle ? oldStyle->callbackSelectors() : emptyVector;
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4289 } 4292 }
4290 4293
4291 DEFINE_TRACE_WRAPPERS(Element) { 4294 DEFINE_TRACE_WRAPPERS(Element) {
4292 if (hasRareData()) { 4295 if (hasRareData()) {
4293 visitor->traceWrappers(elementRareData()); 4296 visitor->traceWrappers(elementRareData());
4294 } 4297 }
4295 ContainerNode::traceWrappers(visitor); 4298 ContainerNode::traceWrappers(visitor);
4296 } 4299 }
4297 4300
4298 } // namespace blink 4301 } // namespace blink
OLDNEW
« 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