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

Side by Side Diff: Source/core/css/PageRuleCollector.cpp

Issue 322803004: Make all CSSSelector data members private (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix win dbg build error Created 6 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 std::stable_sort(matchedPageRules.begin(), matchedPageRules.end(), comparePa geRules); 81 std::stable_sort(matchedPageRules.begin(), matchedPageRules.end(), comparePa geRules);
82 82
83 for (unsigned i = 0; i < matchedPageRules.size(); i++) 83 for (unsigned i = 0; i < matchedPageRules.size(); i++)
84 m_result.addMatchedProperties(&matchedPageRules[i]->properties()); 84 m_result.addMatchedProperties(&matchedPageRules[i]->properties());
85 } 85 }
86 86
87 static bool checkPageSelectorComponents(const CSSSelector* selector, bool isLeft Page, bool isFirstPage, const String& pageName) 87 static bool checkPageSelectorComponents(const CSSSelector* selector, bool isLeft Page, bool isFirstPage, const String& pageName)
88 { 88 {
89 for (const CSSSelector* component = selector; component; component = compone nt->tagHistory()) { 89 for (const CSSSelector* component = selector; component; component = compone nt->tagHistory()) {
90 if (component->m_match == CSSSelector::Tag) { 90 if (component->match() == CSSSelector::Tag) {
91 const AtomicString& localName = component->tagQName().localName(); 91 const AtomicString& localName = component->tagQName().localName();
92 if (localName != starAtom && localName != pageName) 92 if (localName != starAtom && localName != pageName)
93 return false; 93 return false;
94 } 94 }
95 95
96 CSSSelector::PseudoType pseudoType = component->pseudoType(); 96 CSSSelector::PseudoType pseudoType = component->pseudoType();
97 if ((pseudoType == CSSSelector::PseudoLeftPage && !isLeftPage) 97 if ((pseudoType == CSSSelector::PseudoLeftPage && !isLeftPage)
98 || (pseudoType == CSSSelector::PseudoRightPage && isLeftPage) 98 || (pseudoType == CSSSelector::PseudoRightPage && isLeftPage)
99 || (pseudoType == CSSSelector::PseudoFirstPage && !isFirstPage)) 99 || (pseudoType == CSSSelector::PseudoFirstPage && !isFirstPage))
100 { 100 {
(...skipping 15 matching lines...) Expand all
116 const StylePropertySet& properties = rule->properties(); 116 const StylePropertySet& properties = rule->properties();
117 if (properties.isEmpty()) 117 if (properties.isEmpty())
118 continue; 118 continue;
119 119
120 // Add this rule to our list of matched rules. 120 // Add this rule to our list of matched rules.
121 matchedRules.append(rule); 121 matchedRules.append(rule);
122 } 122 }
123 } 123 }
124 124
125 } // namespace WebCore 125 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698