mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
3a02ab4d4d
- Bug 1131308 (part 0) - Fix minor problems with RemovingIterator. r=froydnj. (5c232c9ca)
- Bug 1176163 - Remove remaining uses of PL_DHashTableEnumerate() from xpcom/. r=froydnj. (bd2478b3a)
- Bug 1179657 - Remove PL_DHASHMETER. r=froydnj. (30f581478)
- Bug 1131308 (part 1) - Improve PLDHashTable's internal checking. r=froydnj. (faba4a3b9)
- Bug 1180084 - Convert TestPLDHash.cpp to a gtest. r=froydnj. (de6ee3c5c)
- Bug 1171578 - Avoid crashing if indexedDB is used at a particular point in the worker shutdown sequence, r=baku. (f325c218e)
- Bug 804975 - Part 1: Expose WritingMode bits. r=dbaron (0635d01dd)
- Bug 1072101 - Part 1: Implement FontFaceSet.size. r=peterv (7e0b4848a)
- Bug 1144977 - Part 1: Don't include FontFace objects in more than one loadingdone/loadingerror event. r=jdaggett (4d10b3269)
- Bug 1072101 - Part 2: Implement FontFaceSet.{entries,values}. r=peterv (1c636f4f1)
- Bug 1072101 - Part 3: Implement FontFaceSet.forEach. r=peterv (842a5cdbe)
- Bug 1072101 - Part 4: Implement FontFaceSet.{keys,@@iterator}. r=peterv (4dfb3afe9)
- Bug 1072101 - Part 5: Remove indexed property access on FontFaceSet. r=peterv (edef47d70)
- Bug 1072101 - Unified build fix; no review. (7c1538f6c)
- Bug 861449 - Incremental css::Rule destroyer. r=dbaron (5e60f4394)
- Bug 1175800 - Remove typedefs from nsComputedDOMStyle.cpp as they interfere with others under unified compilation. r=bzbarsky (2bd45e7ed)
- Bug 1147766 - Part 1: Add a mozilla::RangedArray class, for fixed length arrays with a non-zero base index. r=waldo (42be428bc)
- Bug 1147766 - Part 2: Replace FixedStyleStructArray with mozilla::RangedArray. r=dbaron (4d28a0a5e)
- Bug 1171282 - Avoid some unnecessary |operator new| null-checks in layout/. r=dholbert. (60e1690c1)
- Bug 1168664 - Stop mistakenly using the transform reference box's width to calculate the Z component in ProcessMatrix3D. r=mattwoodrow (18f9021b1)
- Bug 1171842 - Use jump table instead of nested if statements for peeking compute function of style struct. r=dbaron (a5160b962)
- Bug 1170173 - Parse CSS 'contain' property. r=dholbert (3d8a37dee)
- Bug 1144607 part 1 - Remove CounterStyleManager::BuildCounterStyle for anonymous counter styles. r=dbaron (331397d01)
- Bug 1144607 part 2 - Support string value for list-style-tyle. r=dbaron (0b4bca0c7)
- Bug 1144607 part 3 - Reftests for string value on list-style-type. r=dbaron (2a483f621)
- Bug 1144607 followup - Fix submitted reftest for string value of list-style-type. DONTBUILD (ad23ac443)
- Bug 1151220 - [css-grid] Fix a couple of typos in InitializeTrackSize. r=dholbert (840f3b8a4)
- Bug 1151201 - [css-grid] Update parsing of 'auto' in track-sizing functions to latest version of the spec. r=simon.sapin (abdb0c0ea)
76 lines
1.8 KiB
C++
76 lines
1.8 KiB
C++
/* -*- 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/. */
|
|
|
|
#include "mozilla/dom/FontFaceSetIterator.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
FontFaceSetIterator::FontFaceSetIterator(FontFaceSet* aFontFaceSet,
|
|
bool aIsKeyAndValue)
|
|
: mFontFaceSet(aFontFaceSet)
|
|
, mNextIndex(0)
|
|
, mIsKeyAndValue(aIsKeyAndValue)
|
|
{
|
|
MOZ_COUNT_CTOR(FontFaceSetIterator);
|
|
}
|
|
|
|
FontFaceSetIterator::~FontFaceSetIterator()
|
|
{
|
|
MOZ_COUNT_DTOR(FontFaceSetIterator);
|
|
}
|
|
|
|
bool
|
|
FontFaceSetIterator::WrapObject(JSContext* aCx,
|
|
JS::Handle<JSObject*> aGivenProto,
|
|
JS::MutableHandle<JSObject*> aReflector)
|
|
{
|
|
return FontFaceSetIteratorBinding::Wrap(aCx, this, aGivenProto, aReflector);
|
|
}
|
|
|
|
void
|
|
FontFaceSetIterator::Next(JSContext* aCx, FontFaceSetIteratorResult& aResult,
|
|
ErrorResult& aRv)
|
|
{
|
|
if (!mFontFaceSet) {
|
|
aResult.mDone = true;
|
|
return;
|
|
}
|
|
|
|
FontFace* face = mFontFaceSet->GetFontFaceAt(mNextIndex++);
|
|
|
|
if (!face) {
|
|
aResult.mValue.setUndefined();
|
|
aResult.mDone = true;
|
|
mFontFaceSet = nullptr;
|
|
return;
|
|
}
|
|
|
|
JS::Rooted<JS::Value> value(aCx);
|
|
if (!ToJSValue(aCx, face, &value)) {
|
|
aRv.Throw(NS_ERROR_FAILURE);
|
|
return;
|
|
}
|
|
|
|
if (mIsKeyAndValue) {
|
|
JS::AutoValueArray<2> values(aCx);
|
|
values[0].set(value);
|
|
values[1].set(value);
|
|
|
|
JS::Rooted<JSObject*> array(aCx);
|
|
array = JS_NewArrayObject(aCx, values);
|
|
if (array) {
|
|
aResult.mValue.setObject(*array);
|
|
}
|
|
} else {
|
|
aResult.mValue = value;
|
|
}
|
|
|
|
aResult.mDone = false;
|
|
}
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|