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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2378103006: Renamed Element::buildLayoutTree to Element::rebuildLayoutTree. (Closed)
Patch Set: rebased Created 4 years, 2 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/Source/core/dom/Element.h ('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 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 if (localChange == NoChange) { 1942 if (localChange == NoChange) {
1943 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesUnchanged, 1); 1943 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesUnchanged, 1);
1944 } else { 1944 } else {
1945 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesChanged, 1); 1945 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), stylesChanged, 1);
1946 } 1946 }
1947 1947
1948 if (localChange == Reattach) { 1948 if (localChange == Reattach) {
1949 // TODO(nainar): Remove the style parameter being passed into 1949 // TODO(nainar): Remove the style parameter being passed into
1950 // buildLayoutTree(). ComputedStyle will now be stored on Node and accessed 1950 // buildLayoutTree(). ComputedStyle will now be stored on Node and accessed
1951 // in buildLayoutTree() using mutableComputedStyle(). 1951 // in buildLayoutTree() using mutableComputedStyle().
1952 return buildLayoutTree(*newStyle); 1952 return rebuildLayoutTree(*newStyle);
1953 } 1953 }
1954 1954
1955 DCHECK(oldStyle); 1955 DCHECK(oldStyle);
1956 1956
1957 if (localChange != NoChange) 1957 if (localChange != NoChange)
1958 updateCallbackSelectors(oldStyle.get(), newStyle.get()); 1958 updateCallbackSelectors(oldStyle.get(), newStyle.get());
1959 1959
1960 if (LayoutObject* layoutObject = this->layoutObject()) { 1960 if (LayoutObject* layoutObject = this->layoutObject()) {
1961 if (localChange != NoChange || 1961 if (localChange != NoChange ||
1962 pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get()) || 1962 pseudoStyleCacheIsInvalid(oldStyle.get(), newStyle.get()) ||
(...skipping 21 matching lines...) Expand all
1984 return Inherit; 1984 return Inherit;
1985 newStyle->copyChildDependentFlagsFrom(*oldStyle); 1985 newStyle->copyChildDependentFlagsFrom(*oldStyle);
1986 } 1986 }
1987 if (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle()) 1987 if (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle())
1988 return UpdatePseudoElements; 1988 return UpdatePseudoElements;
1989 } 1989 }
1990 1990
1991 return localChange; 1991 return localChange;
1992 } 1992 }
1993 1993
1994 StyleRecalcChange Element::buildLayoutTree(ComputedStyle& newStyle) { 1994 StyleRecalcChange Element::rebuildLayoutTree(ComputedStyle& newStyle) {
1995 AttachContext reattachContext; 1995 AttachContext reattachContext;
1996 reattachContext.resolvedStyle = &newStyle; 1996 reattachContext.resolvedStyle = &newStyle;
1997 bool layoutObjectWillChange = needsAttach() || layoutObject(); 1997 bool layoutObjectWillChange = needsAttach() || layoutObject();
1998 reattachLayoutTree(reattachContext); 1998 reattachLayoutTree(reattachContext);
1999 if (layoutObjectWillChange || layoutObject()) 1999 if (layoutObjectWillChange || layoutObject())
2000 return Reattach; 2000 return Reattach;
2001 return ReattachNoLayoutObject; 2001 return ReattachNoLayoutObject;
2002 } 2002 }
2003 2003
2004 void Element::updateCallbackSelectors(const ComputedStyle* oldStyle, 2004 void Element::updateCallbackSelectors(const ComputedStyle* oldStyle,
(...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 } 4081 }
4082 4082
4083 DEFINE_TRACE_WRAPPERS(Element) { 4083 DEFINE_TRACE_WRAPPERS(Element) {
4084 if (hasRareData()) { 4084 if (hasRareData()) {
4085 visitor->traceWrappers(elementRareData()); 4085 visitor->traceWrappers(elementRareData());
4086 } 4086 }
4087 ContainerNode::traceWrappers(visitor); 4087 ContainerNode::traceWrappers(visitor);
4088 } 4088 }
4089 4089
4090 } // namespace blink 4090 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698