mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1028497 - Part 8: Implement Length and array access on FontFaceSet. r=jfkthame
This is a temporary measure until we support iterators on the FontFaceSet; the spec does not expose FontFaces as indexed properties on the FontFaceSet.
This commit is contained in:
parent
e772a00e7b
commit
06f6aeb3c1
@ -163,14 +163,23 @@ FontFaceSet::Has(FontFace& aFontFace)
|
||||
FontFace*
|
||||
FontFaceSet::IndexedGetter(uint32_t aIndex, bool& aFound)
|
||||
{
|
||||
aFound = false;
|
||||
return nullptr;
|
||||
mPresContext->FlushUserFontSet();
|
||||
|
||||
if (aIndex >= mRules.Length()) {
|
||||
aFound = false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
aFound = true;
|
||||
return FontFaceForRule(mRules[aIndex].mContainer.mRule);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
FontFaceSet::Length()
|
||||
{
|
||||
return 0;
|
||||
mPresContext->FlushUserFontSet();
|
||||
|
||||
return mRules.Length();
|
||||
}
|
||||
|
||||
static PLDHashOperator DestroyIterator(nsPtrHashKey<nsFontFaceLoader>* aKey,
|
||||
|
Loading…
Reference in New Issue
Block a user