Bug 1269936 - Introduce and call a runtime-wide servo initialization hook. r=heycam

This commit is contained in:
Bobby Holley 2016-05-04 15:34:21 -07:00
Родитель 4d99b7209e
Коммит a8015a6b72
3 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -129,6 +129,7 @@ using namespace mozilla::system;
#include "MediaDecoder.h"
#include "mozilla/layers/CompositorLRU.h"
#include "mozilla/dom/devicestorage/DeviceStorageStatics.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StaticPresData.h"
#ifdef MOZ_B2G_BT
@ -317,6 +318,10 @@ nsLayoutStatics::Initialize()
mozilla::dom::WebCryptoThreadPool::Initialize();
#ifdef MOZ_STYLO
Servo_Initialize();
#endif
return NS_OK;
}

Просмотреть файл

@ -296,6 +296,13 @@ Servo_ReleaseComputedValues(ServoComputedValues*)
"non-MOZ_STYLO build");
}
void
Servo_Initialize()
{
MOZ_CRASH("stylo: shouldn't be calling Servo_Initialize in a "
"non-MOZ_STYLO build");
}
void
Servo_RestyleDocument(RawGeckoDocument* doc, RawServoStyleSet* set)
{

Просмотреть файл

@ -93,7 +93,10 @@ ServoComputedValues* Servo_GetComputedValuesForPseudoElement(ServoComputedValues
void Servo_AddRefComputedValues(ServoComputedValues*);
void Servo_ReleaseComputedValues(ServoComputedValues*);
// Servo API.
// Initialize Servo components. Should be called exactly once at startup.
void Servo_Initialize();
// Restyle the given document.
void Servo_RestyleDocument(RawGeckoDocument* doc, RawServoStyleSet* set);
// Style-struct management.