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

Unified Diff: Source/core/css/FontFaceSet.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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: Source/core/css/FontFaceSet.cpp
diff --git a/Source/core/css/FontFaceSet.cpp b/Source/core/css/FontFaceSet.cpp
index af5f8d5cdf17ac554e87250da7a90c2594655909..a0823d839e5dcdb71d3b468f029feb21e6b2a758 100644
--- a/Source/core/css/FontFaceSet.cpp
+++ b/Source/core/css/FontFaceSet.cpp
@@ -118,8 +118,8 @@ private:
RefPtr<ScriptPromiseResolver> m_resolver;
};
-FontFaceSet::FontFaceSet(Document* document)
- : ActiveDOMObject(document)
+FontFaceSet::FontFaceSet(Document& document)
+ : ActiveDOMObject(&document)
, m_loadingCount(0)
, m_shouldFireLoadingEvent(false)
, m_asyncRunner(this, &FontFaceSet::handlePendingEventsAndPromises)
@@ -528,7 +528,7 @@ static const char* supplementName()
return "FontFaceSet";
}
-PassRefPtr<FontFaceSet> FontFaceSet::from(Document* document)
+PassRefPtr<FontFaceSet> FontFaceSet::from(Document& document)
{
RefPtr<FontFaceSet> fonts = static_cast<FontFaceSet*>(SupplementType::from(document, supplementName()));
if (!fonts) {
@@ -539,7 +539,7 @@ PassRefPtr<FontFaceSet> FontFaceSet::from(Document* document)
return fonts.release();
}
-void FontFaceSet::didLayout(Document* document)
+void FontFaceSet::didLayout(Document& document)
{
if (FontFaceSet* fonts = static_cast<FontFaceSet*>(SupplementType::from(document, supplementName())))
fonts->didLayout();

Powered by Google App Engine
This is Rietveld 408576698