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

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

Issue 1179103002: Forbid entering recalcStyle or attach from inside detach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | 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. 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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 PassRefPtr<ComputedStyle> Element::originalStyleForLayoutObject() 1595 PassRefPtr<ComputedStyle> Element::originalStyleForLayoutObject()
1596 { 1596 {
1597 ASSERT(document().inStyleRecalc()); 1597 ASSERT(document().inStyleRecalc());
1598 return document().ensureStyleResolver().styleForElement(this); 1598 return document().ensureStyleResolver().styleForElement(this);
1599 } 1599 }
1600 1600
1601 void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling) 1601 void Element::recalcStyle(StyleRecalcChange change, Text* nextTextSibling)
1602 { 1602 {
1603 ASSERT(document().inStyleRecalc()); 1603 ASSERT(document().inStyleRecalc());
1604 ASSERT(!document().lifecycle().inDetach());
1604 ASSERT(!parentOrShadowHostNode()->needsStyleRecalc()); 1605 ASSERT(!parentOrShadowHostNode()->needsStyleRecalc());
1605 ASSERT(inActiveDocument()); 1606 ASSERT(inActiveDocument());
1606 1607
1607 if (hasCustomStyleCallbacks()) 1608 if (hasCustomStyleCallbacks())
1608 willRecalcStyle(change); 1609 willRecalcStyle(change);
1609 1610
1610 if (change >= Inherit || needsStyleRecalc()) { 1611 if (change >= Inherit || needsStyleRecalc()) {
1611 if (hasRareData()) { 1612 if (hasRareData()) {
1612 ElementRareData* data = elementRareData(); 1613 ElementRareData* data = elementRareData();
1613 data->clearComputedStyle(); 1614 data->clearComputedStyle();
(...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 { 3418 {
3418 #if ENABLE(OILPAN) 3419 #if ENABLE(OILPAN)
3419 if (hasRareData()) 3420 if (hasRareData())
3420 visitor->trace(elementRareData()); 3421 visitor->trace(elementRareData());
3421 visitor->trace(m_elementData); 3422 visitor->trace(m_elementData);
3422 #endif 3423 #endif
3423 ContainerNode::trace(visitor); 3424 ContainerNode::trace(visitor);
3424 } 3425 }
3425 3426
3426 } // namespace blink 3427 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698