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

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

Issue 2620293002: Remove CSSFontSelector argument and member from CSSSegmentedFontFace (Closed)
Patch Set: Update test for CL comments Created 3 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/CSSSegmentedFontFace.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp b/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp
index 8ced2f1405db08de855e1b89ae0ec7354334c65f..61770d0e33ad17c7c2b6732e158923b72630f841 100644
--- a/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.cpp
@@ -36,10 +36,8 @@
namespace blink {
-CSSSegmentedFontFace::CSSSegmentedFontFace(CSSFontSelector* fontSelector,
- FontTraits traits)
- : m_fontSelector(fontSelector),
- m_traits(traits),
+CSSSegmentedFontFace::CSSSegmentedFontFace(FontTraits traits)
+ : m_traits(traits),
m_firstNonCssConnectedFace(m_fontFaces.end()),
m_approximateCharacterCount(0) {}
@@ -147,6 +145,7 @@ PassRefPtr<FontData> CSSSegmentedFontFace::getFontData(
}
void CSSSegmentedFontFace::willUseFontData(
+ Document* document,
const FontDescription& fontDescription,
const String& text) {
m_approximateCharacterCount += text.length();
@@ -154,12 +153,13 @@ void CSSSegmentedFontFace::willUseFontData(
it != m_fontFaces.rend(); ++it) {
if ((*it)->loadStatus() != FontFace::Unloaded)
break;
- if ((*it)->cssFontFace()->maybeLoadFont(fontDescription, text))
+ if ((*it)->cssFontFace()->maybeLoadFont(document, fontDescription, text))
break;
}
}
void CSSSegmentedFontFace::willUseRange(
+ Document* document,
const blink::FontDescription& fontDescription,
const blink::FontDataForRangeSet& rangeSet) {
// Iterating backwards since later defined unicode-range faces override
@@ -168,7 +168,7 @@ void CSSSegmentedFontFace::willUseRange(
for (FontFaceList::reverse_iterator it = m_fontFaces.rbegin();
it != m_fontFaces.rend(); ++it) {
CSSFontFace* cssFontFace = (*it)->cssFontFace();
- if (cssFontFace->maybeLoadFont(fontDescription, rangeSet))
+ if (cssFontFace->maybeLoadFont(document, fontDescription, rangeSet))
break;
}
}
@@ -191,7 +191,6 @@ void CSSSegmentedFontFace::match(const String& text,
}
DEFINE_TRACE(CSSSegmentedFontFace) {
- visitor->trace(m_fontSelector);
visitor->trace(m_firstNonCssConnectedFace);
visitor->trace(m_fontFaces);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h ('k') | third_party/WebKit/Source/core/css/FontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698