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

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

Issue 139743017: Don't propagate Inherit ad infinitum. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed test review issues. Created 6 years, 11 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 | « LayoutTests/fast/css/recalc-inherit-001-expected.txt ('k') | no next file » | 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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 1642
1643 // If "rem" units are used anywhere in the document, and if the document ele ment's font size changes, then go ahead and force font updating 1643 // If "rem" units are used anywhere in the document, and if the document ele ment's font size changes, then go ahead and force font updating
1644 // all the way down the tree. This is simpler than having to maintain a cach e of objects (and such font size changes should be rare anyway). 1644 // all the way down the tree. This is simpler than having to maintain a cach e of objects (and such font size changes should be rare anyway).
1645 if (document().styleEngine()->usesRemUnits() && document().documentElement() == this && oldStyle->fontSize() != newStyle->fontSize()) { 1645 if (document().styleEngine()->usesRemUnits() && document().documentElement() == this && oldStyle->fontSize() != newStyle->fontSize()) {
1646 // Cached RenderStyles may depend on the re units. 1646 // Cached RenderStyles may depend on the re units.
1647 document().ensureStyleResolver().invalidateMatchedPropertiesCache(); 1647 document().ensureStyleResolver().invalidateMatchedPropertiesCache();
1648 return Force; 1648 return Force;
1649 } 1649 }
1650 1650
1651 if (styleChangeType() >= SubtreeStyleChange) 1651 if (styleChangeType() >= SubtreeStyleChange)
1652 return document().ensureStyleResolver().treeBoundaryCrossingRules().isEm pty() ? Inherit : Force; 1652 return Force;
1653
1654 if (change <= Inherit)
1655 return localChange;
1653 1656
1654 return max(localChange, change); 1657 return max(localChange, change);
1655 } 1658 }
1656 1659
1657 void Element::recalcChildStyle(StyleRecalcChange change) 1660 void Element::recalcChildStyle(StyleRecalcChange change)
1658 { 1661 {
1659 ASSERT(document().inStyleRecalc()); 1662 ASSERT(document().inStyleRecalc());
1660 ASSERT(change >= Inherit || childNeedsStyleRecalc()); 1663 ASSERT(change >= Inherit || childNeedsStyleRecalc());
1661 ASSERT(!needsStyleRecalc()); 1664 ASSERT(!needsStyleRecalc());
1662 1665
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 3641 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
3639 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 3642 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
3640 if (hasTagName(optionTag) || hasTagName(optgroupTag)) 3643 if (hasTagName(optionTag) || hasTagName(optgroupTag))
3641 return false; 3644 return false;
3642 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3645 if (FullscreenElementStack::isActiveFullScreenElement(this))
3643 return false; 3646 return false;
3644 return true; 3647 return true;
3645 } 3648 }
3646 3649
3647 } // namespace WebCore 3650 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/recalc-inherit-001-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698