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

Side by Side Diff: sky/engine/core/dom/Element.cpp

Issue 858423002: Don't store a RuleFeatureSet on ScopedStyleResolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: better test names. Created 5 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
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 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 // FIXME: Why does gaining a layer from outside the style system require dis abling sharing? 1753 // FIXME: Why does gaining a layer from outside the style system require dis abling sharing?
1754 if (isHTMLCanvasElement(*this)) 1754 if (isHTMLCanvasElement(*this))
1755 return false; 1755 return false;
1756 return true; 1756 return true;
1757 } 1757 }
1758 1758
1759 bool Element::affectedByAttributeSelector(const AtomicString& attributeName) con st 1759 bool Element::affectedByAttributeSelector(const AtomicString& attributeName) con st
1760 { 1760 {
1761 if (attributeName.isEmpty()) 1761 if (attributeName.isEmpty())
1762 return false; 1762 return false;
1763 if (treeScope().scopedStyleResolver().features().hasSelectorForAttribute(att ributeName)) 1763 if (treeScope().scopedStyleResolver().hasSelectorForAttribute(attributeName) )
1764 return true; 1764 return true;
1765 // Host rules could also have effects. 1765 // Host rules could also have effects.
1766 if (ShadowRoot* shadowRoot = this->shadowRoot()) 1766 if (ShadowRoot* shadowRoot = this->shadowRoot())
1767 return shadowRoot->scopedStyleResolver().features().hasSelectorForAttrib ute(attributeName); 1767 return shadowRoot->scopedStyleResolver().hasSelectorForAttribute(attribu teName);
1768 return false; 1768 return false;
1769 } 1769 }
1770 1770
1771 bool Element::affectedByClassSelector(const AtomicString& classValue) const 1771 bool Element::affectedByClassSelector(const AtomicString& classValue) const
1772 { 1772 {
1773 if (classValue.isEmpty()) 1773 if (classValue.isEmpty())
1774 return false; 1774 return false;
1775 if (treeScope().scopedStyleResolver().features().hasSelectorForClass(classVa lue)) 1775 if (treeScope().scopedStyleResolver().hasSelectorForClass(classValue))
1776 return true; 1776 return true;
1777 // Host rules could also have effects. 1777 // Host rules could also have effects.
1778 if (ShadowRoot* shadowRoot = this->shadowRoot()) 1778 if (ShadowRoot* shadowRoot = this->shadowRoot())
1779 return shadowRoot->scopedStyleResolver().features().hasSelectorForClass( classValue); 1779 return shadowRoot->scopedStyleResolver().hasSelectorForClass(classValue) ;
1780 return false; 1780 return false;
1781 } 1781 }
1782 1782
1783 bool Element::affectedByIdSelector(const AtomicString& idValue) const 1783 bool Element::affectedByIdSelector(const AtomicString& idValue) const
1784 { 1784 {
1785 if (idValue.isEmpty()) 1785 if (idValue.isEmpty())
1786 return false; 1786 return false;
1787 if (treeScope().scopedStyleResolver().features().hasSelectorForId(idValue)) 1787 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue))
1788 return true; 1788 return true;
1789 // Host rules could also have effects. 1789 // Host rules could also have effects.
1790 if (ShadowRoot* shadowRoot = this->shadowRoot()) 1790 if (ShadowRoot* shadowRoot = this->shadowRoot())
1791 return shadowRoot->scopedStyleResolver().features().hasSelectorForId(idV alue); 1791 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue);
1792 return false; 1792 return false;
1793 } 1793 }
1794 1794
1795 } // namespace blink 1795 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/ScopedStyleResolver.cpp ('k') | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698