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 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 } | 288 } |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 void RuleSet::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvalu ator& medium, AddRuleFlags addRuleFlags) | 292 void RuleSet::addRulesFromSheet(StyleSheetContents* sheet, const MediaQueryEvalu ator& medium, AddRuleFlags addRuleFlags) |
293 { | 293 { |
294 TRACE_EVENT0("blink", "RuleSet::addRulesFromSheet"); | 294 TRACE_EVENT0("blink", "RuleSet::addRulesFromSheet"); |
295 | 295 |
296 ASSERT(sheet); | 296 ASSERT(sheet); |
297 | 297 |
298 addRuleFlags = static_cast<AddRuleFlags>(addRuleFlags | RuleCanUseFastCheckS elector); | 298 addRuleFlags = static_cast<AddRuleFlags>(addRuleFlags); |
rune
2015/01/12 14:44:13
Bleh. Useless cast.
rune
2015/01/12 14:47:06
Fixed.
| |
299 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport> >& importRules = sheet->importRules(); | 299 const WillBeHeapVector<RefPtrWillBeMember<StyleRuleImport> >& importRules = sheet->importRules(); |
300 for (unsigned i = 0; i < importRules.size(); ++i) { | 300 for (unsigned i = 0; i < importRules.size(); ++i) { |
301 StyleRuleImport* importRule = importRules[i].get(); | 301 StyleRuleImport* importRule = importRules[i].get(); |
302 if (importRule->styleSheet() && (!importRule->mediaQueries() || medium.e val(importRule->mediaQueries(), &m_viewportDependentMediaQueryResults))) | 302 if (importRule->styleSheet() && (!importRule->mediaQueries() || medium.e val(importRule->mediaQueries(), &m_viewportDependentMediaQueryResults))) |
303 addRulesFromSheet(importRule->styleSheet(), medium, addRuleFlags); | 303 addRulesFromSheet(importRule->styleSheet(), medium, addRuleFlags); |
304 } | 304 } |
305 | 305 |
306 addChildRules(sheet->childRules(), medium, addRuleFlags); | 306 addChildRules(sheet->childRules(), medium, addRuleFlags); |
307 } | 307 } |
308 | 308 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
399 | 399 |
400 #ifndef NDEBUG | 400 #ifndef NDEBUG |
401 void RuleSet::show() | 401 void RuleSet::show() |
402 { | 402 { |
403 for (const auto& rule: m_allRules) | 403 for (const auto& rule: m_allRules) |
404 rule.selector().show(); | 404 rule.selector().show(); |
405 } | 405 } |
406 #endif | 406 #endif |
407 | 407 |
408 } // namespace blink | 408 } // namespace blink |
OLD | NEW |