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

Side by Side Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 1782473002: Check if stylesheet resource was cached before marking it as such. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix non-oilpan compilation Created 4 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
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 572
573 void StyleSheetContents::addedToMemoryCache() 573 void StyleSheetContents::addedToMemoryCache()
574 { 574 {
575 ASSERT(!m_isInMemoryCache); 575 ASSERT(!m_isInMemoryCache);
576 ASSERT(isCacheable()); 576 ASSERT(isCacheable());
577 m_isInMemoryCache = true; 577 m_isInMemoryCache = true;
578 } 578 }
579 579
580 void StyleSheetContents::removedFromMemoryCache() 580 void StyleSheetContents::removedFromMemoryCache()
581 { 581 {
582 ASSERT(m_isInMemoryCache);
583 ASSERT(isCacheable()); 582 ASSERT(isCacheable());
584 m_isInMemoryCache = false; 583 m_isInMemoryCache = false;
585 } 584 }
586 585
587 RuleSet& StyleSheetContents::ensureRuleSet(const MediaQueryEvaluator& medium, Ad dRuleFlags addRuleFlags) 586 RuleSet& StyleSheetContents::ensureRuleSet(const MediaQueryEvaluator& medium, Ad dRuleFlags addRuleFlags)
588 { 587 {
589 if (!m_ruleSet) { 588 if (!m_ruleSet) {
590 m_ruleSet = RuleSet::create(); 589 m_ruleSet = RuleSet::create();
591 m_ruleSet->addRulesFromSheet(this, medium, addRuleFlags); 590 m_ruleSet->addRulesFromSheet(this, medium, addRuleFlags);
592 } 591 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 visitor->trace(m_importRules); 667 visitor->trace(m_importRules);
669 visitor->trace(m_namespaceRules); 668 visitor->trace(m_namespaceRules);
670 visitor->trace(m_childRules); 669 visitor->trace(m_childRules);
671 visitor->trace(m_loadingClients); 670 visitor->trace(m_loadingClients);
672 visitor->trace(m_completedClients); 671 visitor->trace(m_completedClients);
673 visitor->trace(m_ruleSet); 672 visitor->trace(m_ruleSet);
674 #endif 673 #endif
675 } 674 }
676 675
677 } // namespace blink 676 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698