Bug 1250788 - Part 1: Add interface to create and parse Servo style sheets. r=bholley

This commit is contained in:
Cameron McCormack 2016-02-26 12:51:01 +11:00
parent 4ef83a5f6f
commit 59c55b2932

View File

@ -26,6 +26,7 @@ typedef mozilla::dom::Element RawGeckoElement;
class nsIDocument;
typedef nsIDocument RawGeckoDocument;
struct ServoNodeData;
struct RawServoStyleSheet;
#else
struct RawGeckoNode;
typedef struct RawGeckoNode RawGeckoNode;
@ -35,6 +36,8 @@ struct RawGeckoDocument;
typedef struct RawGeckoDocument RawGeckoDocument;
struct ServoNodeData;
typedef struct ServoNodeData ServoNodeData;
struct RawServoStyleSheet;
typedef struct RawServoStyleSheet RawServoStyleSheet;
#endif
#ifdef __cplusplus
@ -70,6 +73,11 @@ ServoNodeData* Gecko_GetNodeData(RawGeckoNode* node);
void Gecko_SetNodeData(RawGeckoNode* node, ServoNodeData* data);
void Servo_DropNodeData(ServoNodeData* data);
// Stylesheet management.
// XXXheycam: Make this return an already_AddRefed<RawServoStyleSheet>.
RawServoStyleSheet* Servo_StylesheetFromUTF8Bytes(const uint8_t* bytes, uint32_t length);
void Servo_ReleaseStylesheet(RawServoStyleSheet* sheet);
// Servo API.
void Servo_RestyleDocument(RawGeckoDocument* aDoc);