зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1285235 - Add EnsureLengthAtLeast function to nsStyleImageLayers for Stylo; r=bholley
This commit is contained in:
Родитель
4d3c9798eb
Коммит
53070c2807
|
@ -567,6 +567,15 @@ Gecko_EnsureTArrayCapacity(void* aArray, size_t aCapacity, size_t aElemSize) {
|
|||
base->EnsureCapacity<nsTArrayInfallibleAllocator>(aCapacity, aElemSize);
|
||||
}
|
||||
|
||||
void Gecko_EnsureImageLayersLength(nsStyleImageLayers* aLayers, size_t aLen) {
|
||||
aLayers->mLayers.EnsureLengthAtLeast(aLen);
|
||||
}
|
||||
|
||||
void Gecko_InitializeImageLayer(nsStyleImageLayers_Layer* aLayer, uint8_t aLayerType) {
|
||||
auto layer = reinterpret_cast<nsStyleImageLayers::Layer*>(aLayer);
|
||||
layer->Initialize(static_cast<nsStyleImageLayers::LayerType>(aLayerType));
|
||||
}
|
||||
|
||||
#define STYLE_STRUCT(name, checkdata_cb) \
|
||||
\
|
||||
void \
|
||||
|
|
|
@ -44,6 +44,8 @@ struct RawServoStyleSet;
|
|||
class nsHTMLCSSStyleSheet;
|
||||
struct nsStyleList;
|
||||
struct nsStyleImage;
|
||||
struct nsStyleImageLayers;
|
||||
struct nsStyleImageLayers_Layer;
|
||||
struct nsStyleGradientStop;
|
||||
class nsStyleGradient;
|
||||
class nsStyleCoord;
|
||||
|
@ -186,6 +188,11 @@ void Gecko_UnsetNodeFlags(RawGeckoNode* node, uint32_t flags);
|
|||
// friend function declaration in nsTArray.h
|
||||
void Gecko_EnsureTArrayCapacity(void* array, size_t capacity, size_t elem_size);
|
||||
|
||||
|
||||
void Gecko_EnsureImageLayersLength(nsStyleImageLayers* layers, size_t len);
|
||||
|
||||
// fill_type is a nsStyleImageLayers::LayerType
|
||||
void Gecko_InitializeImageLayer(nsStyleImageLayers_Layer* layer, uint8_t layer_type);
|
||||
// Styleset and Stylesheet management.
|
||||
//
|
||||
// TODO: Make these return already_AddRefed and UniquePtr when the binding
|
||||
|
|
Загрузка…
Ссылка в новой задаче