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

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, 10 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 48bbc4c59a49b81ce4bcfcb23a77aedc12e56154..88d91f8bad73d79c41e8754a8cb8e7e07110afa3 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -143,7 +143,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
@@ -213,7 +213,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());
@@ -375,7 +375,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) {
@@ -395,7 +395,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) {
@@ -403,7 +403,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);
}
@@ -430,7 +430,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();
@@ -465,7 +465,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();
@@ -594,7 +594,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())
@@ -620,11 +620,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));
}
}
@@ -635,7 +635,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();
@@ -651,7 +651,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())

Powered by Google App Engine
This is Rietveld 408576698