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

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

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 7c7dd2e8ac3d6b2bf18652df809cffed467b5be1..a23a491b041458907fada7abe460c6709918205a 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -142,12 +142,12 @@ bool StyleSheetContents::isCacheable() const
return true;
}
-void StyleSheetContents::parserAppendRule(RawPtr<StyleRuleBase> rule)
+void StyleSheetContents::parserAppendRule(StyleRuleBase* rule)
{
if (rule->isImportRule()) {
// Parser enforces that @import rules come before anything else
ASSERT(m_childRules.isEmpty());
- StyleRuleImport* importRule = toStyleRuleImport(rule.get());
+ StyleRuleImport* importRule = toStyleRuleImport(rule);
if (importRule->mediaQueries())
setHasMediaQueries();
m_importRules.append(importRule);
@@ -212,7 +212,7 @@ void StyleSheetContents::clearRules()
m_childRules.clear();
}
-bool StyleSheetContents::wrapperInsertRule(RawPtr<StyleRuleBase> rule, unsigned index)
+bool StyleSheetContents::wrapperInsertRule(StyleRuleBase* rule, unsigned index)
{
ASSERT(m_isMutable);
ASSERT_WITH_SECURITY_IMPLICATION(index <= ruleCount());
@@ -222,7 +222,7 @@ bool StyleSheetContents::wrapperInsertRule(RawPtr<StyleRuleBase> rule, unsigned
if (!rule->isImportRule())
return false;
- StyleRuleImport* importRule = toStyleRuleImport(rule.get());
+ StyleRuleImport* importRule = toStyleRuleImport(rule);
if (importRule->mediaQueries())
setHasMediaQueries();
@@ -246,7 +246,7 @@ bool StyleSheetContents::wrapperInsertRule(RawPtr<StyleRuleBase> rule, unsigned
if (!m_childRules.isEmpty())
return false;
- StyleRuleNamespace* namespaceRule = toStyleRuleNamespace(rule.get());
+ StyleRuleNamespace* namespaceRule = toStyleRuleNamespace(rule);
m_namespaceRules.insert(index, namespaceRule);
// For now to be compatible with IE and Firefox if namespace rule with same prefix is added
// irrespective of adding the rule at any index, last added rule's value is considered.
@@ -381,11 +381,6 @@ void StyleSheetContents::checkLoaded()
if (isLoading())
return;
- // Avoid |this| being deleted by scripts that run via
- // ScriptableDocumentParser::executeScriptsWaitingForResources().
- // See https://bugs.webkit.org/show_bug.cgi?id=95106
- RawPtr<StyleSheetContents> protect(this);
-
StyleSheetContents* parentSheet = parentStyleSheet();
if (parentSheet) {
parentSheet->checkLoaded();
@@ -412,7 +407,7 @@ void StyleSheetContents::checkLoaded()
continue;
// sheetLoaded might be invoked after its owner node is removed from document.
- if (RawPtr<Node> ownerNode = loadingClients[i]->ownerNode()) {
+ if (Node* ownerNode = loadingClients[i]->ownerNode()) {
if (loadingClients[i]->sheetLoaded())
ownerNode->notifyLoadedSheetAndAllCriticalSubresources(m_didLoadErrorOccur ? Node::ErrorOccurredLoadingSubresource : Node::NoErrorLoadingSubresource);
}
« 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