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

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

Issue 2164493002: Renamed Node::attach to Node::attachLayoutTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 elementAnimations->cssAnimations().cancel(); 1525 elementAnimations->cssAnimations().cancel();
1526 1526
1527 if (data->intersectionObserverData()) 1527 if (data->intersectionObserverData())
1528 data->intersectionObserverData()->deactivateAllIntersectionObservers (*this); 1528 data->intersectionObserverData()->deactivateAllIntersectionObservers (*this);
1529 } 1529 }
1530 1530
1531 if (document().frame()) 1531 if (document().frame())
1532 document().frame()->eventHandler().elementRemoved(this); 1532 document().frame()->eventHandler().elementRemoved(this);
1533 } 1533 }
1534 1534
1535 void Element::attach(const AttachContext& context) 1535 void Element::attachLayoutTree(const AttachContext& context)
1536 { 1536 {
1537 DCHECK(document().inStyleRecalc()); 1537 DCHECK(document().inStyleRecalc());
1538 1538
1539 // We've already been through detach when doing an attach, but we might 1539 // We've already been through detach when doing an attach, but we might
1540 // need to clear any state that's been added since then. 1540 // need to clear any state that's been added since then.
1541 if (hasRareData() && getStyleChangeType() == NeedsReattachStyleChange) { 1541 if (hasRareData() && getStyleChangeType() == NeedsReattachStyleChange) {
1542 ElementRareData* data = elementRareData(); 1542 ElementRareData* data = elementRareData();
1543 data->clearComputedStyle(); 1543 data->clearComputedStyle();
1544 } 1544 }
1545 1545
(...skipping 11 matching lines...) Expand all
1557 1557
1558 SelectorFilterParentScope filterScope(*this); 1558 SelectorFilterParentScope filterScope(*this);
1559 StyleSharingDepthScope sharingScope(*this); 1559 StyleSharingDepthScope sharingScope(*this);
1560 1560
1561 createPseudoElementIfNeeded(PseudoIdBefore); 1561 createPseudoElementIfNeeded(PseudoIdBefore);
1562 1562
1563 // When a shadow root exists, it does the work of attaching the children. 1563 // When a shadow root exists, it does the work of attaching the children.
1564 if (ElementShadow* shadow = this->shadow()) 1564 if (ElementShadow* shadow = this->shadow())
1565 shadow->attach(context); 1565 shadow->attach(context);
1566 1566
1567 ContainerNode::attach(context); 1567 ContainerNode::attachLayoutTree(context);
1568 1568
1569 createPseudoElementIfNeeded(PseudoIdAfter); 1569 createPseudoElementIfNeeded(PseudoIdAfter);
1570 createPseudoElementIfNeeded(PseudoIdBackdrop); 1570 createPseudoElementIfNeeded(PseudoIdBackdrop);
1571 1571
1572 // We create the first-letter element after the :before, :after and 1572 // We create the first-letter element after the :before, :after and
1573 // children are attached because the first letter text could come 1573 // children are attached because the first letter text could come
1574 // from any of them. 1574 // from any of them.
1575 createPseudoElementIfNeeded(PseudoIdFirstLetter); 1575 createPseudoElementIfNeeded(PseudoIdFirstLetter);
1576 } 1576 }
1577 1577
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 return; 2945 return;
2946 2946
2947 // Document::ensureStyleResolver is not inlined and shows up on profiles, av oid it here. 2947 // Document::ensureStyleResolver is not inlined and shows up on profiles, av oid it here.
2948 PseudoElement* element = document().styleEngine().ensureResolver().createPse udoElementIfNeeded(*this, pseudoId); 2948 PseudoElement* element = document().styleEngine().ensureResolver().createPse udoElementIfNeeded(*this, pseudoId);
2949 if (!element) 2949 if (!element)
2950 return; 2950 return;
2951 2951
2952 if (pseudoId == PseudoIdBackdrop) 2952 if (pseudoId == PseudoIdBackdrop)
2953 document().addToTopLayer(element, this); 2953 document().addToTopLayer(element, this);
2954 element->insertedInto(this); 2954 element->insertedInto(this);
2955 element->attach(); 2955 element->attachLayoutTree();
2956 2956
2957 InspectorInstrumentation::pseudoElementCreated(element); 2957 InspectorInstrumentation::pseudoElementCreated(element);
2958 2958
2959 ensureElementRareData().setPseudoElement(pseudoId, element); 2959 ensureElementRareData().setPseudoElement(pseudoId, element);
2960 } 2960 }
2961 2961
2962 PseudoElement* Element::pseudoElement(PseudoId pseudoId) const 2962 PseudoElement* Element::pseudoElement(PseudoId pseudoId) const
2963 { 2963 {
2964 return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : nullptr; 2964 return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : nullptr;
2965 } 2965 }
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 3745
3746 DEFINE_TRACE_WRAPPERS(Element) 3746 DEFINE_TRACE_WRAPPERS(Element)
3747 { 3747 {
3748 if (hasRareData()) { 3748 if (hasRareData()) {
3749 visitor->traceWrappers(elementRareData()); 3749 visitor->traceWrappers(elementRareData());
3750 } 3750 }
3751 ContainerNode::traceWrappers(visitor); 3751 ContainerNode::traceWrappers(visitor);
3752 } 3752 }
3753 3753
3754 } // namespace blink 3754 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698