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

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

Issue 1181183004: Recalc list items for <select> before updating style for the select. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments. 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/html/HTMLSelectElement.h » ('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 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 return hasRareData() ? elementRareData()->shadow() : nullptr; 1747 return hasRareData() ? elementRareData()->shadow() : nullptr;
1748 } 1748 }
1749 1749
1750 ElementShadow& Element::ensureShadow() 1750 ElementShadow& Element::ensureShadow()
1751 { 1751 {
1752 return ensureElementRareData().ensureShadow(); 1752 return ensureElementRareData().ensureShadow();
1753 } 1753 }
1754 1754
1755 void Element::pseudoStateChanged(CSSSelector::PseudoType pseudo) 1755 void Element::pseudoStateChanged(CSSSelector::PseudoType pseudo)
1756 { 1756 {
1757 // We can't schedule invaliation sets from inside style recalc otherwise
1758 // we'd never process them.
1759 // TODO(esprehn): Make this an ASSERT and fix places that call into this
1760 // like HTMLSelectElement.
1761 if (document().inStyleRecalc())
1762 return;
1757 StyleResolver* styleResolver = document().styleResolver(); 1763 StyleResolver* styleResolver = document().styleResolver();
1758
1759 if (inActiveDocument() && styleResolver && styleChangeType() < SubtreeStyleC hange) 1764 if (inActiveDocument() && styleResolver && styleChangeType() < SubtreeStyleC hange)
1760 document().styleEngine().pseudoStateChangedForElement(pseudo, *this); 1765 document().styleEngine().pseudoStateChangedForElement(pseudo, *this);
1761 } 1766 }
1762 1767
1763 void Element::setAnimationStyleChange(bool animationStyleChange) 1768 void Element::setAnimationStyleChange(bool animationStyleChange)
1764 { 1769 {
1765 if (animationStyleChange && document().inStyleRecalc()) 1770 if (animationStyleChange && document().inStyleRecalc())
1766 return; 1771 return;
1767 if (!hasRareData()) 1772 if (!hasRareData())
1768 return; 1773 return;
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 { 3429 {
3425 #if ENABLE(OILPAN) 3430 #if ENABLE(OILPAN)
3426 if (hasRareData()) 3431 if (hasRareData())
3427 visitor->trace(elementRareData()); 3432 visitor->trace(elementRareData());
3428 visitor->trace(m_elementData); 3433 visitor->trace(m_elementData);
3429 #endif 3434 #endif
3430 ContainerNode::trace(visitor); 3435 ContainerNode::trace(visitor);
3431 } 3436 }
3432 3437
3433 } // namespace blink 3438 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698