| OLD | NEW |
| 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. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 cascadeOrder, matchRequest); | 250 cascadeOrder, matchRequest); |
| 251 } | 251 } |
| 252 | 252 |
| 253 template <class CSSRuleCollection> | 253 template <class CSSRuleCollection> |
| 254 CSSRule* ElementRuleCollector::findStyleRule(CSSRuleCollection* cssRules, | 254 CSSRule* ElementRuleCollector::findStyleRule(CSSRuleCollection* cssRules, |
| 255 StyleRule* styleRule) { | 255 StyleRule* styleRule) { |
| 256 if (!cssRules) | 256 if (!cssRules) |
| 257 return nullptr; | 257 return nullptr; |
| 258 CSSRule* result = 0; | 258 CSSRule* result = 0; |
| 259 for (unsigned i = 0; i < cssRules->length() && !result; ++i) { | 259 for (unsigned i = 0; i < cssRules->length() && !result; ++i) { |
| 260 /* DO NOT SUBMIT - merge conflict marker. |
| 261 * Please spell |item| below. */ |
| 260 CSSRule* cssRule = cssRules->item(i); | 262 CSSRule* cssRule = cssRules->item(i); |
| 261 CSSRule::Type cssRuleType = cssRule->type(); | 263 CSSRule::Type cssRuleType = cssRule->type(); |
| 262 if (cssRuleType == CSSRule::kStyleRule) { | 264 if (cssRuleType == CSSRule::kStyleRule) { |
| 263 CSSStyleRule* cssStyleRule = toCSSStyleRule(cssRule); | 265 CSSStyleRule* cssStyleRule = toCSSStyleRule(cssRule); |
| 264 if (cssStyleRule->styleRule() == styleRule) | 266 if (cssStyleRule->styleRule() == styleRule) |
| 265 result = cssRule; | 267 result = cssRule; |
| 266 } else if (cssRuleType == CSSRule::kImportRule) { | 268 } else if (cssRuleType == CSSRule::kImportRule) { |
| 267 CSSImportRule* cssImportRule = toCSSImportRule(cssRule); | 269 CSSImportRule* cssImportRule = toCSSImportRule(cssRule); |
| 268 result = findStyleRule(cssImportRule->styleSheet(), styleRule); | 270 result = findStyleRule(cssImportRule->styleSheet(), styleRule); |
| 269 } else { | 271 } else { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 380 |
| 379 void ElementRuleCollector::addMatchedRulesToTracker( | 381 void ElementRuleCollector::addMatchedRulesToTracker( |
| 380 StyleRuleUsageTracker* tracker) const { | 382 StyleRuleUsageTracker* tracker) const { |
| 381 for (auto matchedRule : m_matchedRules) { | 383 for (auto matchedRule : m_matchedRules) { |
| 382 tracker->track(matchedRule.parentStyleSheet(), | 384 tracker->track(matchedRule.parentStyleSheet(), |
| 383 matchedRule.ruleData()->rule()); | 385 matchedRule.ruleData()->rule()); |
| 384 } | 386 } |
| 385 } | 387 } |
| 386 | 388 |
| 387 } // namespace blink | 389 } // namespace blink |
| OLD | NEW |