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

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

Issue 18882002: [oilpan] Move CSSSegmentedFontFace to the managed heap (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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/FontLoader.cpp
diff --git a/Source/core/css/FontLoader.cpp b/Source/core/css/FontLoader.cpp
index 98687c059edf64ed801ad11597a7b4add42d6668..d5ae7f838116d95d8fbef64f336c5d2f78e16660 100644
--- a/Source/core/css/FontLoader.cpp
+++ b/Source/core/css/FontLoader.cpp
@@ -64,8 +64,8 @@ public:
return LoadFontCallback::create(numFamilies, onsuccess, onerror);
}
- virtual void notifyLoaded(CSSSegmentedFontFace*) OVERRIDE;
- virtual void notifyError(CSSSegmentedFontFace*) OVERRIDE;
+ virtual void notifyLoaded(Handle<CSSSegmentedFontFace>) OVERRIDE;
+ virtual void notifyError(Handle<CSSSegmentedFontFace>) OVERRIDE;
void loaded(Document*);
void error(Document*);
private:
@@ -103,14 +103,18 @@ void LoadFontCallback::error(Document* document)
loaded(document);
}
-void LoadFontCallback::notifyLoaded(CSSSegmentedFontFace* face)
+void LoadFontCallback::notifyLoaded(Handle<CSSSegmentedFontFace> face)
{
- loaded(face->fontSelector()->document());
+ CSSFontSelector* fontSelector = face->fontSelector();
+ ASSERT(fontSelector);
+ loaded(fontSelector->document());
}
-void LoadFontCallback::notifyError(CSSSegmentedFontFace* face)
+void LoadFontCallback::notifyError(Handle<CSSSegmentedFontFace> face)
{
- error(face->fontSelector()->document());
+ CSSFontSelector* fontSelector = face->fontSelector();
+ ASSERT(fontSelector);
+ error(fontSelector->document());
}
FontLoader::FontLoader(Document* document)
@@ -275,7 +279,7 @@ void FontLoader::loadFont(const Dictionary& params)
RefPtr<LoadFontCallback> callback = LoadFontCallback::createFromParams(params, font.family());
for (const FontFamily* f = &font.family(); f; f = f->next()) {
- CSSSegmentedFontFace* face = m_document->styleResolver()->fontSelector()->getFontFace(font.fontDescription(), f->family());
+ Handle<CSSSegmentedFontFace> face = m_document->styleResolver()->fontSelector()->getFontFace(font.fontDescription(), f->family());
if (!face) {
if (callback)
callback->error(m_document);
@@ -292,7 +296,7 @@ bool FontLoader::checkFont(const String& fontString, const String&)
if (!resolveFontStyle(fontString, font))
return false;
for (const FontFamily* f = &font.family(); f; f = f->next()) {
- CSSSegmentedFontFace* face = m_document->styleResolver()->fontSelector()->getFontFace(font.fontDescription(), f->family());
+ Handle<CSSSegmentedFontFace> face = m_document->styleResolver()->fontSelector()->getFontFace(font.fontDescription(), f->family());
if (!face || !face->checkFont())
return false;
}
« Source/core/css/CSSFontSelector.h ('K') | « Source/core/css/CSSSegmentedFontFace.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698