2015-03-31 06:05:33 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_FontFaceSetIterator_h
|
|
|
|
#define mozilla_dom_FontFaceSetIterator_h
|
|
|
|
|
2016-07-08 00:05:28 +03:00
|
|
|
#include "mozilla/dom/FontFaceSet.h"
|
2015-03-31 06:05:33 +03:00
|
|
|
#include "mozilla/dom/FontFaceSetBinding.h"
|
|
|
|
#include "mozilla/dom/NonRefcountedDOMObject.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-07-16 10:35:17 +03:00
|
|
|
class FontFaceSetIterator final
|
2015-03-31 06:05:33 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
FontFaceSetIterator(mozilla::dom::FontFaceSet* aFontFaceSet,
|
|
|
|
bool aIsKeyAndValue);
|
2015-07-16 10:35:17 +03:00
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(FontFaceSetIterator)
|
|
|
|
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(FontFaceSetIterator)
|
2015-03-31 06:05:33 +03:00
|
|
|
|
|
|
|
bool WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto,
|
|
|
|
JS::MutableHandle<JSObject*> aReflector);
|
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
void Next(JSContext* aCx, FontFaceSetIteratorResult& aResult,
|
|
|
|
mozilla::ErrorResult& aRv);
|
|
|
|
|
|
|
|
private:
|
2015-07-16 10:35:17 +03:00
|
|
|
~FontFaceSetIterator();
|
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<FontFaceSet> mFontFaceSet;
|
2015-03-31 06:05:33 +03:00
|
|
|
uint32_t mNextIndex;
|
|
|
|
bool mIsKeyAndValue;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // !defined(mozilla_dom_FontFaceSetIterator_h)
|