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

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index 0b89df745cb2202291cb7fc192200e95f0a2a7dc..95868a7ec5174234663622ecd3595dd0d7a5c8ef 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -142,7 +142,7 @@ bool StyleSheetContents::isCacheable() const
return true;
}
-void StyleSheetContents::parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase> rule)
+void StyleSheetContents::parserAppendRule(RawPtr<StyleRuleBase> rule)
{
if (rule->isImportRule()) {
// Parser enforces that @import rules come before anything else
@@ -212,7 +212,7 @@ void StyleSheetContents::clearRules()
m_childRules.clear();
}
-bool StyleSheetContents::wrapperInsertRule(PassRefPtrWillBeRawPtr<StyleRuleBase> rule, unsigned index)
+bool StyleSheetContents::wrapperInsertRule(RawPtr<StyleRuleBase> rule, unsigned index)
{
ASSERT(m_isMutable);
ASSERT_WITH_SECURITY_IMPLICATION(index <= ruleCount());
@@ -374,7 +374,7 @@ void StyleSheetContents::checkLoaded()
// Avoid |this| being deleted by scripts that run via
// ScriptableDocumentParser::executeScriptsWaitingForResources().
// See https://bugs.webkit.org/show_bug.cgi?id=95106
- RefPtrWillBeRawPtr<StyleSheetContents> protect(this);
+ RawPtr<StyleSheetContents> protect(this);
StyleSheetContents* parentSheet = parentStyleSheet();
if (parentSheet) {
@@ -394,7 +394,7 @@ void StyleSheetContents::checkLoaded()
// When a sheet is loaded it is moved from the set of loading clients
// to the set of completed clients. We therefore need the copy in order to
// not modify the set while iterating it.
- WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> loadingClients;
+ HeapVector<Member<CSSStyleSheet>> loadingClients;
copyToVector(m_loadingClients, loadingClients);
for (unsigned i = 0; i < loadingClients.size(); ++i) {
@@ -402,7 +402,7 @@ void StyleSheetContents::checkLoaded()
continue;
// sheetLoaded might be invoked after its owner node is removed from document.
- if (RefPtrWillBeRawPtr<Node> ownerNode = loadingClients[i]->ownerNode()) {
+ if (RawPtr<Node> ownerNode = loadingClients[i]->ownerNode()) {
if (loadingClients[i]->sheetLoaded())
ownerNode->notifyLoadedSheetAndAllCriticalSubresources(m_didLoadErrorOccur ? Node::ErrorOccurredLoadingSubresource : Node::NoErrorLoadingSubresource);
}
@@ -429,7 +429,7 @@ void StyleSheetContents::startLoadingDynamicSheet()
// completed state to the loading state which modifies the set of
// completed clients. We therefore need the copy in order to not
// modify the set of completed clients while iterating it.
- WillBeHeapVector<RawPtrWillBeMember<CSSStyleSheet>> completedClients;
+ HeapVector<Member<CSSStyleSheet>> completedClients;
copyToVector(root->m_completedClients, completedClients);
for (unsigned i = 0; i < completedClients.size(); ++i)
completedClients[i]->startLoadingDynamicSheet();
@@ -464,7 +464,7 @@ Document* StyleSheetContents::singleOwnerDocument() const
return root->clientSingleOwnerDocument();
}
-static bool childRulesHaveFailedOrCanceledSubresources(const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& rules)
+static bool childRulesHaveFailedOrCanceledSubresources(const HeapVector<Member<StyleRuleBase>>& rules)
{
for (unsigned i = 0; i < rules.size(); ++i) {
const StyleRuleBase* rule = rules[i].get();
@@ -592,7 +592,7 @@ RuleSet& StyleSheetContents::ensureRuleSet(const MediaQueryEvaluator& medium, Ad
return *m_ruleSet.get();
}
-static void clearResolvers(WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>>& clients)
+static void clearResolvers(HeapHashSet<WeakMember<CSSStyleSheet>>& clients)
{
for (const auto& sheet : clients) {
if (Document* document = sheet->ownerDocument())
@@ -618,11 +618,11 @@ void StyleSheetContents::clearRuleSet()
m_ruleSet.clear();
}
-static void removeFontFaceRules(WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSStyleSheet>>& clients, const StyleRuleFontFace* fontFaceRule)
+static void removeFontFaceRules(HeapHashSet<WeakMember<CSSStyleSheet>>& clients, const StyleRuleFontFace* fontFaceRule)
{
for (const auto& sheet : clients) {
if (Node* ownerNode = sheet->ownerNode())
- ownerNode->document().styleEngine().removeFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFontFace>>(1, fontFaceRule));
+ ownerNode->document().styleEngine().removeFontFaceRules(HeapVector<Member<const StyleRuleFontFace>>(1, fontFaceRule));
}
}
@@ -633,7 +633,7 @@ void StyleSheetContents::notifyRemoveFontFaceRule(const StyleRuleFontFace* fontF
removeFontFaceRules(root->m_completedClients, fontFaceRule);
}
-static void findFontFaceRulesFromRules(const WillBeHeapVector<RefPtrWillBeMember<StyleRuleBase>>& rules, WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFontFace>>& fontFaceRules)
+static void findFontFaceRulesFromRules(const HeapVector<Member<StyleRuleBase>>& rules, HeapVector<Member<const StyleRuleFontFace>>& fontFaceRules)
{
for (unsigned i = 0; i < rules.size(); ++i) {
StyleRuleBase* rule = rules[i].get();
@@ -649,7 +649,7 @@ static void findFontFaceRulesFromRules(const WillBeHeapVector<RefPtrWillBeMember
}
}
-void StyleSheetContents::findFontFaceRules(WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFontFace>>& fontFaceRules)
+void StyleSheetContents::findFontFaceRules(HeapVector<Member<const StyleRuleFontFace>>& fontFaceRules)
{
for (unsigned i = 0; i < m_importRules.size(); ++i) {
if (!m_importRules[i]->styleSheet())
« no previous file with comments | « third_party/WebKit/Source/core/css/StyleSheetContents.h ('k') | third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698