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

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

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 if (!newPseudoStyle) 1519 if (!newPseudoStyle)
1520 return true; 1520 return true;
1521 if (*newPseudoStyle != *pseudoStyleCache->at(i)) { 1521 if (*newPseudoStyle != *pseudoStyleCache->at(i)) {
1522 if (pseudoId < FIRST_INTERNAL_PSEUDOID) 1522 if (pseudoId < FIRST_INTERNAL_PSEUDOID)
1523 newStyle->setHasPseudoStyle(pseudoId); 1523 newStyle->setHasPseudoStyle(pseudoId);
1524 newStyle->addCachedPseudoStyle(newPseudoStyle); 1524 newStyle->addCachedPseudoStyle(newPseudoStyle);
1525 if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED) { 1525 if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED) {
1526 // FIXME: We should do an actual diff to determine whether a rep aint vs. layout 1526 // FIXME: We should do an actual diff to determine whether a rep aint vs. layout
1527 // is needed, but for now just assume a layout will be required. The diff code 1527 // is needed, but for now just assume a layout will be required. The diff code
1528 // in LayoutObject::setStyle would need to be factored out so th at it could be reused. 1528 // in LayoutObject::setStyle would need to be factored out so th at it could be reused.
1529 layoutObject()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInv alidation(); 1529 layoutObject()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInv alidation(LayoutInvalidationReason::StyleChange);
1530 } 1530 }
1531 return true; 1531 return true;
1532 } 1532 }
1533 } 1533 }
1534 return false; 1534 return false;
1535 } 1535 }
1536 1536
1537 PassRefPtr<LayoutStyle> Element::styleForLayoutObject() 1537 PassRefPtr<LayoutStyle> Element::styleForLayoutObject()
1538 { 1538 {
1539 ASSERT(document().inStyleRecalc()); 1539 ASSERT(document().inStyleRecalc());
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
3386 { 3386 {
3387 #if ENABLE(OILPAN) 3387 #if ENABLE(OILPAN)
3388 if (hasRareData()) 3388 if (hasRareData())
3389 visitor->trace(elementRareData()); 3389 visitor->trace(elementRareData());
3390 visitor->trace(m_elementData); 3390 visitor->trace(m_elementData);
3391 #endif 3391 #endif
3392 ContainerNode::trace(visitor); 3392 ContainerNode::trace(visitor);
3393 } 3393 }
3394 3394
3395 } // namespace blink 3395 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698