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

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

Issue 208323003: Add support for attribute selectors in TargetedStyleRecalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation Created 6 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
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | Source/core/dom/Element.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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 619
620 static inline void resetDirectionAndWritingModeOnDocument(Document& document) 620 static inline void resetDirectionAndWritingModeOnDocument(Document& document)
621 { 621 {
622 document.setDirectionSetOnDocumentElement(false); 622 document.setDirectionSetOnDocumentElement(false);
623 document.setWritingModeSetOnDocumentElement(false); 623 document.setWritingModeSetOnDocumentElement(false);
624 } 624 }
625 625
626 static void addContentAttrValuesToFeatures(const Vector<AtomicString>& contentAt trValues, RuleFeatureSet& features) 626 static void addContentAttrValuesToFeatures(const Vector<AtomicString>& contentAt trValues, RuleFeatureSet& features)
627 { 627 {
628 for (size_t i = 0; i < contentAttrValues.size(); ++i) 628 for (size_t i = 0; i < contentAttrValues.size(); ++i)
629 features.addAttributeInASelector(contentAttrValues[i]); 629 features.addContentAttr(contentAttrValues[i]);
630 } 630 }
631 631
632 // Start loading resources referenced by this style. 632 // Start loading resources referenced by this style.
633 void StyleResolver::loadPendingResources(StyleResolverState& state) 633 void StyleResolver::loadPendingResources(StyleResolverState& state)
634 { 634 {
635 m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyle Resources()); 635 m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyle Resources());
636 document().styleEngine()->fontSelector()->loadPendingFonts(); 636 document().styleEngine()->fontSelector()->loadPendingFonts();
637 } 637 }
638 638
639 PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS tyle* defaultParent, StyleSharingBehavior sharingBehavior, 639 PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS tyle* defaultParent, StyleSharingBehavior sharingBehavior,
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 bool StyleResolver::mediaQueryAffectedByViewportChange() const 1419 bool StyleResolver::mediaQueryAffectedByViewportChange() const
1420 { 1420 {
1421 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { 1421 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) {
1422 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio n) != m_viewportDependentMediaQueryResults[i]->m_result) 1422 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio n) != m_viewportDependentMediaQueryResults[i]->m_result)
1423 return true; 1423 return true;
1424 } 1424 }
1425 return false; 1425 return false;
1426 } 1426 }
1427 1427
1428 } // namespace WebCore 1428 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698