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

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

Issue 468793003: Make style building for 'font-size' less custom. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix regression related to FontDescriptions with isAbsolute=true. Created 6 years, 3 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
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('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) 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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 918
919 Node* parentNode = NodeRenderingTraversal::parent(textNode); 919 Node* parentNode = NodeRenderingTraversal::parent(textNode);
920 if (!parentNode || !parentNode->renderStyle()) 920 if (!parentNode || !parentNode->renderStyle())
921 return defaultStyleForElement(); 921 return defaultStyleForElement();
922 return parentNode->renderStyle(); 922 return parentNode->renderStyle();
923 } 923 }
924 924
925 void StyleResolver::updateFont(StyleResolverState& state) 925 void StyleResolver::updateFont(StyleResolverState& state)
926 { 926 {
927 state.fontBuilder().createFont(document().styleEngine()->fontSelector(), sta te.parentStyle(), state.style()); 927 state.fontBuilder().createFont(document().styleEngine()->fontSelector(), sta te.parentStyle(), state.style());
928 if (state.fontBuilder().fontSizeHasViewportUnits())
929 state.style()->setHasViewportUnits();
930 } 928 }
931 929
932 PassRefPtrWillBeRawPtr<StyleRuleList> StyleResolver::styleRulesForElement(Elemen t* element, unsigned rulesToInclude) 930 PassRefPtrWillBeRawPtr<StyleRuleList> StyleResolver::styleRulesForElement(Elemen t* element, unsigned rulesToInclude)
933 { 931 {
934 ASSERT(element); 932 ASSERT(element);
935 StyleResolverState state(document(), element); 933 StyleResolverState state(document(), element);
936 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, sta te.style()); 934 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, sta te.style());
937 collector.setMode(SelectorChecker::CollectingStyleRules); 935 collector.setMode(SelectorChecker::CollectingStyleRules);
938 collectPseudoRulesForElement(element, collector, NOPSEUDO, rulesToInclude); 936 collectPseudoRulesForElement(element, collector, NOPSEUDO, rulesToInclude);
939 return collector.matchedStyleRuleList(); 937 return collector.matchedStyleRuleList();
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 visitor->trace(m_uncommonAttributeRuleSet); 1590 visitor->trace(m_uncommonAttributeRuleSet);
1593 visitor->trace(m_watchedSelectorsRules); 1591 visitor->trace(m_watchedSelectorsRules);
1594 visitor->trace(m_treeBoundaryCrossingRules); 1592 visitor->trace(m_treeBoundaryCrossingRules);
1595 visitor->trace(m_styleSharingLists); 1593 visitor->trace(m_styleSharingLists);
1596 visitor->trace(m_pendingStyleSheets); 1594 visitor->trace(m_pendingStyleSheets);
1597 visitor->trace(m_document); 1595 visitor->trace(m_document);
1598 #endif 1596 #endif
1599 } 1597 }
1600 1598
1601 } // namespace blink 1599 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698