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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 1156143002: *** NOT FOR LANDING *** Text nodes should only inherit inheritable properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Some tests need to be rebaselined. Text nodes can no longer have z-index. 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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 return style.release(); 891 return style.release();
892 } 892 }
893 893
894 PassRefPtr<ComputedStyle> StyleResolver::styleForText(Text* textNode) 894 PassRefPtr<ComputedStyle> StyleResolver::styleForText(Text* textNode)
895 { 895 {
896 ASSERT(textNode); 896 ASSERT(textNode);
897 897
898 Node* parentNode = LayoutTreeBuilderTraversal::parent(*textNode); 898 Node* parentNode = LayoutTreeBuilderTraversal::parent(*textNode);
899 if (!parentNode || !parentNode->computedStyle()) 899 if (!parentNode || !parentNode->computedStyle())
900 return initialStyleForElement(); 900 return initialStyleForElement();
901 return parentNode->mutableComputedStyle(); 901 return ComputedStyle::createWithInheritableProperties(parentNode->computedSt yleRef());
902 } 902 }
903 903
904 void StyleResolver::updateFont(StyleResolverState& state) 904 void StyleResolver::updateFont(StyleResolverState& state)
905 { 905 {
906 state.fontBuilder().createFont(document().styleEngine().fontSelector(), stat e.mutableStyleRef()); 906 state.fontBuilder().createFont(document().styleEngine().fontSelector(), stat e.mutableStyleRef());
907 state.setConversionFontSizes(CSSToLengthConversionData::FontSizes(state.styl e(), state.rootElementStyle())); 907 state.setConversionFontSizes(CSSToLengthConversionData::FontSizes(state.styl e(), state.rootElementStyle()));
908 state.setConversionZoom(state.style()->effectiveZoom()); 908 state.setConversionZoom(state.style()->effectiveZoom());
909 } 909 }
910 910
911 PassRefPtrWillBeRawPtr<StyleRuleList> StyleResolver::styleRulesForElement(Elemen t* element, unsigned rulesToInclude) 911 PassRefPtrWillBeRawPtr<StyleRuleList> StyleResolver::styleRulesForElement(Elemen t* element, unsigned rulesToInclude)
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 visitor->trace(m_watchedSelectorsRules); 1499 visitor->trace(m_watchedSelectorsRules);
1500 visitor->trace(m_treeBoundaryCrossingRules); 1500 visitor->trace(m_treeBoundaryCrossingRules);
1501 visitor->trace(m_styleResourceLoader); 1501 visitor->trace(m_styleResourceLoader);
1502 visitor->trace(m_styleSharingLists); 1502 visitor->trace(m_styleSharingLists);
1503 visitor->trace(m_pendingStyleSheets); 1503 visitor->trace(m_pendingStyleSheets);
1504 visitor->trace(m_document); 1504 visitor->trace(m_document);
1505 #endif 1505 #endif
1506 } 1506 }
1507 1507
1508 } // namespace blink 1508 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698