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

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

Issue 1156273002: Add assert that updateLayoutTree clears dirty bits. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check the accept conditions for documents. 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
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 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 // We've already been through detach when doing an attach, but we might 1451 // We've already been through detach when doing an attach, but we might
1452 // need to clear any state that's been added since then. 1452 // need to clear any state that's been added since then.
1453 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { 1453 if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) {
1454 ElementRareData* data = elementRareData(); 1454 ElementRareData* data = elementRareData();
1455 data->clearComputedStyle(); 1455 data->clearComputedStyle();
1456 } 1456 }
1457 1457
1458 if (!isActiveInsertionPoint(*this)) 1458 if (!isActiveInsertionPoint(*this))
1459 LayoutTreeBuilderForElement(*this, context.resolvedStyle).createLayoutOb jectIfNeeded(); 1459 LayoutTreeBuilderForElement(*this, context.resolvedStyle).createLayoutOb jectIfNeeded();
1460 1460
1461 if (hasRareData() && !layoutObject()) {
1462 if (ElementAnimations* elementAnimations = elementRareData()->elementAni mations()) {
1463 elementAnimations->cssAnimations().cancel();
1464 elementAnimations->setAnimationStyleChange(false);
1465 }
1466 }
1467
1461 addCallbackSelectors(); 1468 addCallbackSelectors();
1462 1469
1463 StyleResolverParentScope parentScope(*this); 1470 StyleResolverParentScope parentScope(*this);
1464 1471
1465 createPseudoElementIfNeeded(BEFORE); 1472 createPseudoElementIfNeeded(BEFORE);
1466 1473
1467 // When a shadow root exists, it does the work of attaching the children. 1474 // When a shadow root exists, it does the work of attaching the children.
1468 if (ElementShadow* shadow = this->shadow()) 1475 if (ElementShadow* shadow = this->shadow())
1469 shadow->attach(context); 1476 shadow->attach(context);
1470 1477
1471 ContainerNode::attach(context); 1478 ContainerNode::attach(context);
1472 1479
1473 createPseudoElementIfNeeded(AFTER); 1480 createPseudoElementIfNeeded(AFTER);
1474 createPseudoElementIfNeeded(BACKDROP); 1481 createPseudoElementIfNeeded(BACKDROP);
1475 1482
1476 // We create the first-letter element after the :before, :after and 1483 // We create the first-letter element after the :before, :after and
1477 // children are attached because the first letter text could come 1484 // children are attached because the first letter text could come
1478 // from any of them. 1485 // from any of them.
1479 createPseudoElementIfNeeded(FIRST_LETTER); 1486 createPseudoElementIfNeeded(FIRST_LETTER);
1480
1481 if (hasRareData() && !layoutObject()) {
1482 if (ElementAnimations* elementAnimations = elementRareData()->elementAni mations()) {
1483 elementAnimations->cssAnimations().cancel();
1484 elementAnimations->setAnimationStyleChange(false);
1485 }
1486 }
1487 } 1487 }
1488 1488
1489 void Element::detach(const AttachContext& context) 1489 void Element::detach(const AttachContext& context)
1490 { 1490 {
1491 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; 1491 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
1492 cancelFocusAppearanceUpdate(); 1492 cancelFocusAppearanceUpdate();
1493 removeCallbackSelectors(); 1493 removeCallbackSelectors();
1494 if (hasRareData()) { 1494 if (hasRareData()) {
1495 ElementRareData* data = elementRareData(); 1495 ElementRareData* data = elementRareData();
1496 data->clearPseudoElements(); 1496 data->clearPseudoElements();
(...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 { 3470 {
3471 #if ENABLE(OILPAN) 3471 #if ENABLE(OILPAN)
3472 if (hasRareData()) 3472 if (hasRareData())
3473 visitor->trace(elementRareData()); 3473 visitor->trace(elementRareData());
3474 visitor->trace(m_elementData); 3474 visitor->trace(m_elementData);
3475 #endif 3475 #endif
3476 ContainerNode::trace(visitor); 3476 ContainerNode::trace(visitor);
3477 } 3477 }
3478 3478
3479 } // namespace blink 3479 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698