2016-08-19 11:44:43 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
/* a list of all Servo binding functions */
|
|
|
|
|
|
|
|
/* This file contains the list of all Servo binding functions. Each
|
|
|
|
* entry is defined as a SERVO_BINDING_FUNC macro with the following
|
|
|
|
* parameters:
|
|
|
|
* - 'name_' the name of the binding function
|
|
|
|
* - 'return_' the return type of the binding function
|
|
|
|
* and the parameter list of the function.
|
|
|
|
*
|
|
|
|
* Users of this list should define a macro
|
|
|
|
* SERVO_BINDING_FUNC(name_, return_, ...)
|
|
|
|
* before including this file.
|
|
|
|
*/
|
|
|
|
|
2016-11-02 06:11:24 +00:00
|
|
|
// Element data
|
|
|
|
SERVO_BINDING_FUNC(Servo_Element_ClearData, void, RawGeckoElementBorrowed node)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
|
|
|
// Styleset and Stylesheet management
|
2017-06-29 01:07:06 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSheet_FromUTF8Bytes, RawServoStyleSheetContentsStrong,
|
2016-12-17 09:58:56 +00:00
|
|
|
mozilla::css::Loader* loader,
|
|
|
|
mozilla::ServoStyleSheet* gecko_stylesheet,
|
2016-10-24 23:19:45 +00:00
|
|
|
const nsACString* data,
|
2016-08-19 11:44:43 +00:00
|
|
|
mozilla::css::SheetParsingMode parsing_mode,
|
2017-04-25 19:01:45 +00:00
|
|
|
RawGeckoURLExtraData* extra_data,
|
2017-05-14 15:11:18 +00:00
|
|
|
uint32_t line_number_offset,
|
|
|
|
nsCompatibility quirks_mode)
|
2017-06-29 01:07:06 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSheet_Empty, RawServoStyleSheetContentsStrong,
|
|
|
|
mozilla::css::SheetParsingMode parsing_mode)
|
2016-08-23 03:14:27 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSheet_HasRules, bool,
|
2017-06-29 01:07:06 +00:00
|
|
|
RawServoStyleSheetContentsBorrowed sheet)
|
2016-11-22 23:26:20 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSheet_GetRules, ServoCssRulesStrong,
|
2017-06-29 01:07:06 +00:00
|
|
|
RawServoStyleSheetContentsBorrowed sheet)
|
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSheet_Clone, RawServoStyleSheetContentsStrong,
|
2017-06-29 17:09:56 +00:00
|
|
|
RawServoStyleSheetContentsBorrowed sheet,
|
|
|
|
const mozilla::ServoStyleSheet* reference_sheet);
|
2017-05-30 01:03:51 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSheet_SizeOfIncludingThis, size_t,
|
2017-06-29 01:07:06 +00:00
|
|
|
mozilla::MallocSizeOf malloc_size_of,
|
|
|
|
RawServoStyleSheetContentsBorrowed sheet)
|
2017-01-14 22:34:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_Init, RawServoStyleSetOwned, RawGeckoPresContextOwned pres_context)
|
2017-05-15 16:02:59 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_Clear, void,
|
|
|
|
RawServoStyleSetBorrowed set)
|
2017-01-14 22:34:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_RebuildData, void,
|
2017-05-24 00:31:59 +00:00
|
|
|
RawServoStyleSetBorrowed set)
|
2017-06-02 15:55:55 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_MediumFeaturesChanged, bool,
|
|
|
|
RawServoStyleSetBorrowed set)
|
2016-08-23 13:11:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_Drop, void, RawServoStyleSetOwned set)
|
2017-06-10 14:22:23 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_CompatModeChanged, void,
|
|
|
|
RawServoStyleSetBorrowed raw_data)
|
2016-08-23 03:10:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_AppendStyleSheet, void,
|
2017-05-01 23:46:41 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-06-29 01:07:06 +00:00
|
|
|
const mozilla::ServoStyleSheet* gecko_sheet)
|
2016-08-23 03:10:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_PrependStyleSheet, void,
|
2017-05-01 23:46:41 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-06-29 01:07:06 +00:00
|
|
|
const mozilla::ServoStyleSheet* gecko_sheet)
|
2016-08-23 03:10:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_RemoveStyleSheet, void,
|
2017-05-01 23:46:41 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-06-29 01:07:06 +00:00
|
|
|
const mozilla::ServoStyleSheet* gecko_sheet)
|
2016-08-23 03:10:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_InsertStyleSheetBefore, void,
|
2017-05-01 23:46:41 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-06-29 01:07:06 +00:00
|
|
|
const mozilla::ServoStyleSheet* gecko_sheet,
|
|
|
|
const mozilla::ServoStyleSheet* before)
|
2017-05-25 17:50:03 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_FlushStyleSheets, void, RawServoStyleSetBorrowed set,
|
|
|
|
RawGeckoElementBorrowedOrNull doc_elem)
|
2016-12-19 06:30:14 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_NoteStyleSheetsChanged, void,
|
2017-04-11 07:59:44 +00:00
|
|
|
RawServoStyleSetBorrowed set, bool author_style_disabled)
|
2017-05-13 07:34:38 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_GetKeyframesForName, bool,
|
2017-01-29 03:58:28 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
|
|
|
const nsACString* property,
|
2017-03-21 06:29:43 +00:00
|
|
|
nsTimingFunctionBorrowed timing_function,
|
2017-01-29 03:58:28 +00:00
|
|
|
RawGeckoKeyframeListBorrowedMut keyframe_list)
|
2017-03-27 06:53:27 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_GetFontFaceRules, void,
|
|
|
|
RawServoStyleSetBorrowed set,
|
|
|
|
RawGeckoFontFaceRuleListBorrowedMut list)
|
2017-05-11 04:47:24 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_GetCounterStyleRule, nsCSSCounterStyleRule*,
|
|
|
|
RawServoStyleSetBorrowed set, nsIAtom* name)
|
2017-04-14 22:37:35 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_ResolveForDeclarations,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextStrong,
|
2017-04-14 22:37:35 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextBorrowedOrNull parent_style,
|
2017-07-06 21:56:06 +00:00
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
2017-07-18 06:02:13 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleContext_AddRef, void, mozilla::ServoStyleContext* ctx);
|
|
|
|
SERVO_BINDING_FUNC(Servo_StyleContext_Release, void, mozilla::ServoStyleContext* ctx);
|
|
|
|
|
2017-05-08 08:04:31 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_MightHaveAttributeDependency, bool,
|
|
|
|
RawServoStyleSetBorrowed set,
|
2017-06-28 05:18:02 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
2017-05-08 08:04:31 +00:00
|
|
|
nsIAtom* local_name)
|
2017-05-09 10:13:45 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_HasStateDependency, bool,
|
|
|
|
RawServoStyleSetBorrowed set,
|
2017-06-28 05:18:02 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
2017-05-09 10:13:45 +00:00
|
|
|
uint64_t state)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
2016-11-22 23:26:20 +00:00
|
|
|
// CSSRuleList
|
|
|
|
SERVO_BINDING_FUNC(Servo_CssRules_ListTypes, void,
|
|
|
|
ServoCssRulesBorrowed rules,
|
|
|
|
nsTArrayBorrowed_uintptr_t result)
|
2016-11-29 11:59:55 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_CssRules_InsertRule, nsresult,
|
|
|
|
ServoCssRulesBorrowed rules,
|
2017-06-29 01:07:06 +00:00
|
|
|
RawServoStyleSheetContentsBorrowed sheet,
|
|
|
|
const nsACString* rule,
|
|
|
|
uint32_t index,
|
|
|
|
bool nested,
|
|
|
|
mozilla::css::Loader* loader,
|
2017-04-03 10:04:32 +00:00
|
|
|
mozilla::ServoStyleSheet* gecko_stylesheet,
|
|
|
|
uint16_t* rule_type)
|
2016-11-29 11:59:55 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_CssRules_DeleteRule, nsresult,
|
|
|
|
ServoCssRulesBorrowed rules, uint32_t index)
|
2016-11-22 23:26:20 +00:00
|
|
|
|
2016-11-22 23:26:20 +00:00
|
|
|
// CSS Rules
|
2017-05-19 06:12:34 +00:00
|
|
|
#define BASIC_RULE_FUNCS_WITHOUT_GETTER(type_) \
|
|
|
|
SERVO_BINDING_FUNC(Servo_##type_##_Debug, void, \
|
|
|
|
RawServo##type_##Borrowed rule, nsACString* result) \
|
|
|
|
SERVO_BINDING_FUNC(Servo_##type_##_GetCssText, void, \
|
|
|
|
RawServo##type_##Borrowed rule, nsAString* result)
|
2017-03-14 06:52:37 +00:00
|
|
|
#define BASIC_RULE_FUNCS(type_) \
|
|
|
|
SERVO_BINDING_FUNC(Servo_CssRules_Get##type_##RuleAt, \
|
|
|
|
RawServo##type_##RuleStrong, \
|
2017-04-25 14:24:39 +00:00
|
|
|
ServoCssRulesBorrowed rules, uint32_t index, \
|
|
|
|
uint32_t* line, uint32_t* column) \
|
2017-05-19 06:12:34 +00:00
|
|
|
BASIC_RULE_FUNCS_WITHOUT_GETTER(type_##Rule)
|
2017-04-26 07:57:57 +00:00
|
|
|
#define GROUP_RULE_FUNCS(type_) \
|
|
|
|
BASIC_RULE_FUNCS(type_) \
|
|
|
|
SERVO_BINDING_FUNC(Servo_##type_##Rule_GetRules, ServoCssRulesStrong, \
|
|
|
|
RawServo##type_##RuleBorrowed rule)
|
2017-03-14 06:52:37 +00:00
|
|
|
BASIC_RULE_FUNCS(Style)
|
2017-05-30 01:10:25 +00:00
|
|
|
BASIC_RULE_FUNCS(Import)
|
2017-05-19 06:12:34 +00:00
|
|
|
BASIC_RULE_FUNCS_WITHOUT_GETTER(Keyframe)
|
|
|
|
BASIC_RULE_FUNCS(Keyframes)
|
2017-04-26 07:57:57 +00:00
|
|
|
GROUP_RULE_FUNCS(Media)
|
2017-03-14 04:44:37 +00:00
|
|
|
BASIC_RULE_FUNCS(Namespace)
|
2017-03-31 02:25:22 +00:00
|
|
|
BASIC_RULE_FUNCS(Page)
|
2017-04-26 07:59:29 +00:00
|
|
|
GROUP_RULE_FUNCS(Supports)
|
2017-05-11 12:11:16 +00:00
|
|
|
GROUP_RULE_FUNCS(Document)
|
2017-04-26 07:57:57 +00:00
|
|
|
#undef GROUP_RULE_FUNCS
|
2017-03-14 06:52:37 +00:00
|
|
|
#undef BASIC_RULE_FUNCS
|
2017-05-19 06:12:34 +00:00
|
|
|
#undef BASIC_RULE_FUNCS_WITHOUT_GETTER
|
2017-03-27 03:49:26 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_CssRules_GetFontFaceRuleAt, nsCSSFontFaceRule*,
|
|
|
|
ServoCssRulesBorrowed rules, uint32_t index)
|
2017-05-15 04:18:44 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_CssRules_GetCounterStyleRuleAt, nsCSSCounterStyleRule*,
|
|
|
|
ServoCssRulesBorrowed rules, uint32_t index)
|
2016-11-22 23:26:20 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_GetStyle, RawServoDeclarationBlockStrong,
|
|
|
|
RawServoStyleRuleBorrowed rule)
|
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_SetStyle, void,
|
|
|
|
RawServoStyleRuleBorrowed rule,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
2016-11-22 23:26:20 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorText, void,
|
|
|
|
RawServoStyleRuleBorrowed rule, nsAString* result)
|
2017-06-12 12:54:39 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorTextAtIndex, void,
|
2017-06-07 15:48:49 +00:00
|
|
|
RawServoStyleRuleBorrowed rule, uint32_t index,
|
|
|
|
nsAString* result)
|
2017-06-12 12:54:44 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_GetSpecificityAtIndex, void,
|
|
|
|
RawServoStyleRuleBorrowed rule, uint32_t index,
|
|
|
|
uint64_t* specificity)
|
2017-06-07 15:48:49 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorCount, void,
|
|
|
|
RawServoStyleRuleBorrowed rule, uint32_t* count)
|
2017-07-04 13:37:34 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleRule_SelectorMatchesElement, bool,
|
|
|
|
RawServoStyleRuleBorrowed, RawGeckoElementBorrowed,
|
|
|
|
uint32_t index, mozilla::CSSPseudoElementType pseudo_type)
|
2017-05-30 01:10:25 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ImportRule_GetHref, void,
|
|
|
|
RawServoImportRuleBorrowed rule, nsAString* result)
|
2017-06-29 01:07:06 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ImportRule_GetSheet,
|
|
|
|
const mozilla::ServoStyleSheet*,
|
2017-05-30 01:10:25 +00:00
|
|
|
RawServoImportRuleBorrowed rule)
|
2017-05-19 06:12:34 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_Keyframe_GetKeyText, void,
|
|
|
|
RawServoKeyframeBorrowed keyframe, nsAString* result)
|
|
|
|
// Returns whether it successfully changes the key text.
|
|
|
|
SERVO_BINDING_FUNC(Servo_Keyframe_SetKeyText, bool,
|
|
|
|
RawServoKeyframeBorrowed keyframe, const nsACString* text)
|
|
|
|
SERVO_BINDING_FUNC(Servo_Keyframe_GetStyle, RawServoDeclarationBlockStrong,
|
|
|
|
RawServoKeyframeBorrowed keyframe)
|
|
|
|
SERVO_BINDING_FUNC(Servo_Keyframe_SetStyle, void,
|
|
|
|
RawServoKeyframeBorrowed keyframe,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_GetName, nsIAtom*,
|
|
|
|
RawServoKeyframesRuleBorrowed rule)
|
2017-05-21 19:55:08 +00:00
|
|
|
// This method takes an addrefed nsIAtom.
|
2017-05-19 06:12:34 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_SetName, void,
|
2017-05-21 19:55:08 +00:00
|
|
|
RawServoKeyframesRuleBorrowed rule, nsIAtom* name)
|
2017-05-19 06:12:34 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_GetCount, uint32_t,
|
|
|
|
RawServoKeyframesRuleBorrowed rule)
|
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_GetKeyframe, RawServoKeyframeStrong,
|
|
|
|
RawServoKeyframesRuleBorrowed rule, uint32_t index)
|
|
|
|
// Returns the index of the rule, max value of uint32_t if nothing found.
|
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_FindRule, uint32_t,
|
|
|
|
RawServoKeyframesRuleBorrowed rule, const nsACString* key)
|
|
|
|
// Returns whether it successfully appends the rule.
|
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_AppendRule, bool,
|
|
|
|
RawServoKeyframesRuleBorrowed rule,
|
2017-06-29 01:07:06 +00:00
|
|
|
RawServoStyleSheetContentsBorrowed sheet,
|
|
|
|
const nsACString* css)
|
2017-05-19 06:12:34 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_KeyframesRule_DeleteRule, void,
|
|
|
|
RawServoKeyframesRuleBorrowed rule, uint32_t index)
|
2017-03-09 04:10:11 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_MediaRule_GetMedia, RawServoMediaListStrong,
|
|
|
|
RawServoMediaRuleBorrowed rule)
|
2017-03-14 04:44:37 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_NamespaceRule_GetPrefix, nsIAtom*,
|
|
|
|
RawServoNamespaceRuleBorrowed rule)
|
|
|
|
SERVO_BINDING_FUNC(Servo_NamespaceRule_GetURI, nsIAtom*,
|
|
|
|
RawServoNamespaceRuleBorrowed rule)
|
2017-03-31 02:25:22 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_PageRule_GetStyle, RawServoDeclarationBlockStrong,
|
|
|
|
RawServoPageRuleBorrowed rule)
|
|
|
|
SERVO_BINDING_FUNC(Servo_PageRule_SetStyle, void,
|
|
|
|
RawServoPageRuleBorrowed rule,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
2017-04-26 07:59:29 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_SupportsRule_GetConditionText, void,
|
|
|
|
RawServoSupportsRuleBorrowed rule, nsAString* result)
|
2017-05-11 12:11:16 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DocumentRule_GetConditionText, void,
|
|
|
|
RawServoDocumentRuleBorrowed rule, nsAString* result)
|
2016-11-22 23:26:20 +00:00
|
|
|
|
2016-09-16 01:24:05 +00:00
|
|
|
// Animations API
|
|
|
|
SERVO_BINDING_FUNC(Servo_ParseProperty,
|
2016-10-18 04:29:03 +00:00
|
|
|
RawServoDeclarationBlockStrong,
|
2017-04-14 22:37:34 +00:00
|
|
|
nsCSSPropertyID property, const nsACString* value,
|
2017-05-10 23:29:36 +00:00
|
|
|
RawGeckoURLExtraData* data,
|
2017-05-14 15:11:18 +00:00
|
|
|
mozilla::ParsingMode parsing_mode,
|
2017-07-10 21:52:00 +00:00
|
|
|
nsCompatibility quirks_mode,
|
|
|
|
mozilla::css::Loader* loader)
|
2017-03-21 06:27:46 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ParseEasing, bool,
|
|
|
|
const nsAString* easing,
|
2017-03-30 07:54:48 +00:00
|
|
|
RawGeckoURLExtraData* data,
|
2017-03-21 06:27:46 +00:00
|
|
|
nsTimingFunctionBorrowedMut output)
|
2017-02-23 00:52:43 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetComputedKeyframeValues, void,
|
|
|
|
RawGeckoKeyframeListBorrowed keyframes,
|
2017-06-02 00:38:22 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
2017-02-23 00:52:43 +00:00
|
|
|
ServoComputedValuesBorrowed style,
|
2017-03-11 01:40:47 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-02-23 00:52:43 +00:00
|
|
|
RawGeckoComputedKeyframeValuesListBorrowedMut result)
|
2017-04-06 01:34:50 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_ExtractAnimationValue,
|
|
|
|
RawServoAnimationValueStrong,
|
|
|
|
ServoComputedValuesBorrowed computed_values,
|
|
|
|
nsCSSPropertyID property)
|
2017-06-26 05:16:18 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_SpecifiesAnimationsOrTransitions, bool,
|
|
|
|
ServoComputedValuesBorrowed computed_values)
|
2017-04-12 08:37:09 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_Property_IsAnimatable, bool,
|
|
|
|
nsCSSPropertyID property)
|
2017-06-15 00:54:06 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_Property_IsTransitionable, bool,
|
|
|
|
nsCSSPropertyID property)
|
2017-04-12 08:31:12 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_Property_IsDiscreteAnimatable, bool,
|
|
|
|
nsCSSPropertyID property)
|
2017-05-19 07:58:47 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetProperties_Overriding_Animation, void,
|
|
|
|
RawGeckoElementBorrowed,
|
|
|
|
RawGeckoCSSPropertyIDListBorrowed,
|
|
|
|
nsCSSPropertyIDSetBorrowedMut)
|
2017-06-07 03:25:14 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_MatrixTransform_Operate, void,
|
|
|
|
nsStyleTransformMatrix::MatrixTransformOperator
|
|
|
|
matrix_operator,
|
|
|
|
const RawGeckoGfxMatrix4x4* from,
|
|
|
|
const RawGeckoGfxMatrix4x4* to,
|
|
|
|
double progress,
|
|
|
|
RawGeckoGfxMatrix4x4* result)
|
2017-06-08 21:19:37 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetAnimationValues, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
RawGeckoElementBorrowed element,
|
|
|
|
ServoComputedValuesBorrowed style,
|
|
|
|
RawServoStyleSetBorrowed style_set,
|
|
|
|
RawGeckoServoAnimationValueListBorrowedMut animation_values)
|
2016-09-16 01:24:05 +00:00
|
|
|
|
2016-12-01 01:34:54 +00:00
|
|
|
// AnimationValues handling
|
2017-01-24 07:21:52 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValues_Interpolate,
|
|
|
|
RawServoAnimationValueStrong,
|
|
|
|
RawServoAnimationValueBorrowed from,
|
|
|
|
RawServoAnimationValueBorrowed to,
|
|
|
|
double progress)
|
2017-04-12 08:26:59 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValues_IsInterpolable, bool,
|
|
|
|
RawServoAnimationValueBorrowed from,
|
|
|
|
RawServoAnimationValueBorrowed to)
|
2017-06-05 01:36:27 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValues_Add,
|
|
|
|
RawServoAnimationValueStrong,
|
|
|
|
RawServoAnimationValueBorrowed a,
|
|
|
|
RawServoAnimationValueBorrowed b)
|
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValues_Accumulate,
|
|
|
|
RawServoAnimationValueStrong,
|
|
|
|
RawServoAnimationValueBorrowed a,
|
|
|
|
RawServoAnimationValueBorrowed b,
|
|
|
|
uint64_t count)
|
2017-06-05 01:28:17 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValues_GetZeroValue,
|
|
|
|
RawServoAnimationValueStrong,
|
|
|
|
RawServoAnimationValueBorrowed value_to_match)
|
2017-04-21 03:31:41 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValues_ComputeDistance, double,
|
|
|
|
RawServoAnimationValueBorrowed from,
|
|
|
|
RawServoAnimationValueBorrowed to)
|
2017-02-09 03:33:17 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValue_Serialize, void,
|
|
|
|
RawServoAnimationValueBorrowed value,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
nsAString* buffer)
|
2017-06-08 21:19:38 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_Shorthand_AnimationValues_Serialize, void,
|
|
|
|
nsCSSPropertyID shorthand_property,
|
|
|
|
RawGeckoServoAnimationValueListBorrowed values,
|
|
|
|
nsAString* buffer)
|
2017-02-10 04:03:08 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValue_GetOpacity, float,
|
2017-02-08 03:31:15 +00:00
|
|
|
RawServoAnimationValueBorrowed value)
|
2017-02-10 04:03:08 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValue_GetTransform, void,
|
2017-02-08 03:36:41 +00:00
|
|
|
RawServoAnimationValueBorrowed value,
|
|
|
|
RefPtr<nsCSSValueSharedList>* list)
|
2017-02-24 07:05:23 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValue_DeepEqual, bool,
|
|
|
|
RawServoAnimationValueBorrowed,
|
|
|
|
RawServoAnimationValueBorrowed)
|
2017-04-12 07:51:55 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValue_Uncompute,
|
|
|
|
RawServoDeclarationBlockStrong,
|
|
|
|
RawServoAnimationValueBorrowed value)
|
2017-05-03 03:15:27 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationValue_Compute,
|
|
|
|
RawServoAnimationValueStrong,
|
2017-06-02 00:38:22 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
2017-05-03 03:15:27 +00:00
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
ServoComputedValuesBorrowed style,
|
|
|
|
RawServoStyleSetBorrowed raw_data)
|
2016-12-01 01:34:54 +00:00
|
|
|
|
2016-08-19 11:44:43 +00:00
|
|
|
// Style attribute
|
2016-10-18 04:29:03 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ParseStyleAttribute, RawServoDeclarationBlockStrong,
|
2017-03-11 02:28:02 +00:00
|
|
|
const nsACString* data,
|
2017-05-05 22:12:03 +00:00
|
|
|
RawGeckoURLExtraData* extra_data,
|
2017-07-10 21:52:00 +00:00
|
|
|
nsCompatibility quirks_mode,
|
|
|
|
mozilla::css::Loader* loader)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_CreateEmpty,
|
|
|
|
RawServoDeclarationBlockStrong)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_Clone, RawServoDeclarationBlockStrong,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
2016-09-15 07:26:07 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_Equals, bool,
|
2016-10-18 04:29:03 +00:00
|
|
|
RawServoDeclarationBlockBorrowed a,
|
|
|
|
RawServoDeclarationBlockBorrowed b)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetCssText, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsAString* result)
|
2016-09-16 00:26:48 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SerializeOneValue, void,
|
2016-10-18 04:29:03 +00:00
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
2016-12-15 23:02:48 +00:00
|
|
|
nsCSSPropertyID property, nsAString* buffer)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_Count, uint32_t,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetNthProperty, bool,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
uint32_t index, nsAString* result)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetPropertyValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
2016-12-15 23:02:48 +00:00
|
|
|
const nsACString* property, nsAString* value)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetPropertyValueById, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property, nsAString* value)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_GetPropertyIsImportant, bool,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
2016-12-15 23:02:48 +00:00
|
|
|
const nsACString* property)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetProperty, bool,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
2016-12-15 23:02:48 +00:00
|
|
|
const nsACString* property,
|
2017-02-23 01:19:04 +00:00
|
|
|
const nsACString* value, bool is_important,
|
2017-04-14 03:55:44 +00:00
|
|
|
RawGeckoURLExtraData* data,
|
2017-05-14 15:11:18 +00:00
|
|
|
mozilla::ParsingMode parsing_mode,
|
2017-07-10 21:52:00 +00:00
|
|
|
nsCompatibility quirks_mode,
|
|
|
|
mozilla::css::Loader* loader)
|
2016-12-15 23:02:48 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetPropertyById, bool,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
2017-02-23 01:19:04 +00:00
|
|
|
const nsACString* value, bool is_important,
|
2017-04-14 03:55:44 +00:00
|
|
|
RawGeckoURLExtraData* data,
|
2017-05-14 15:11:18 +00:00
|
|
|
mozilla::ParsingMode parsing_mode,
|
2017-07-10 21:52:00 +00:00
|
|
|
nsCompatibility quirks_mode,
|
|
|
|
mozilla::css::Loader* loader)
|
2016-11-03 03:41:02 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_RemoveProperty, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
2016-12-15 23:02:48 +00:00
|
|
|
const nsACString* property)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_RemovePropertyById, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property)
|
2017-04-14 22:37:34 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_HasCSSWideKeyword, bool,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property)
|
2017-04-06 01:34:51 +00:00
|
|
|
// Compose animation value for a given property.
|
|
|
|
// |base_values| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>.
|
|
|
|
// We use void* to avoid exposing nsRefPtrHashtable in FFI.
|
2017-04-06 01:34:51 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_AnimationCompose, void,
|
2017-05-01 09:45:41 +00:00
|
|
|
RawServoAnimationValueMapBorrowedMut animation_values,
|
2017-04-06 01:34:51 +00:00
|
|
|
void* base_values,
|
2017-04-06 01:34:51 +00:00
|
|
|
nsCSSPropertyID property,
|
2017-04-06 01:34:51 +00:00
|
|
|
RawGeckoAnimationPropertySegmentBorrowed animation_segment,
|
2017-05-24 02:14:35 +00:00
|
|
|
RawGeckoAnimationPropertySegmentBorrowed last_segment,
|
|
|
|
RawGeckoComputedTimingBorrowed computed_timing,
|
|
|
|
mozilla::dom::IterationCompositeOperation iteration_composite)
|
2017-02-13 00:02:29 +00:00
|
|
|
|
|
|
|
// presentation attributes
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_PropertyIsSet, bool,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetIdentStringValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
2017-02-13 00:02:29 +00:00
|
|
|
nsIAtom* value)
|
2017-02-13 00:02:29 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetKeywordValue, void,
|
2017-01-19 23:56:53 +00:00
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
2017-02-13 00:02:29 +00:00
|
|
|
int32_t value)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetIntValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
int32_t value)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetPixelValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
float value)
|
2017-04-10 07:28:48 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetLengthValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
float value,
|
|
|
|
nsCSSUnit unit)
|
2017-04-10 07:28:48 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetNumberValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
float value)
|
2017-02-13 00:02:29 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetPercentValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
float value)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetAutoValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetCurrentColor, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetColorValue, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsCSSPropertyID property,
|
|
|
|
nscolor value)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetFontFamily, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
const nsAString& value)
|
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetTextDecorationColorOverride, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations)
|
2017-04-10 07:28:48 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_DeclarationBlock_SetBackgroundImage, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
const nsAString& value,
|
|
|
|
RawGeckoURLExtraData* extra_data)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
2017-03-09 06:56:31 +00:00
|
|
|
// MediaList
|
2017-04-10 00:01:38 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_Create, RawServoMediaListStrong)
|
2017-04-10 06:36:45 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_DeepClone, RawServoMediaListStrong,
|
|
|
|
RawServoMediaListBorrowed list)
|
2017-04-10 02:25:33 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_Matches, bool,
|
|
|
|
RawServoMediaListBorrowed list,
|
|
|
|
RawServoStyleSetBorrowed set)
|
2017-03-09 06:56:31 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_GetText, void,
|
|
|
|
RawServoMediaListBorrowed list, nsAString* result)
|
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_SetText, void,
|
|
|
|
RawServoMediaListBorrowed list, const nsACString* text)
|
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_GetLength, uint32_t,
|
|
|
|
RawServoMediaListBorrowed list)
|
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_GetMediumAt, bool,
|
|
|
|
RawServoMediaListBorrowed list, uint32_t index,
|
|
|
|
nsAString* result)
|
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_AppendMedium, void,
|
|
|
|
RawServoMediaListBorrowed list, const nsACString* new_medium)
|
|
|
|
SERVO_BINDING_FUNC(Servo_MediaList_DeleteMedium, bool,
|
|
|
|
RawServoMediaListBorrowed list, const nsACString* old_medium)
|
|
|
|
|
2016-08-19 11:44:43 +00:00
|
|
|
// CSS supports()
|
2017-01-16 07:09:42 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_CSSSupports2, bool,
|
2016-10-24 23:19:45 +00:00
|
|
|
const nsACString* name, const nsACString* value)
|
2017-01-16 07:09:42 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_CSSSupports, bool,
|
|
|
|
const nsACString* cond)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
|
|
|
// Computed style data
|
2016-08-23 03:14:27 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_GetForAnonymousBox,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextStrong,
|
|
|
|
ServoStyleContextBorrowedOrNull parent_style_or_null,
|
|
|
|
mozilla::CSSPseudoElementType pseudo_type,
|
2017-07-05 06:21:10 +00:00
|
|
|
nsIAtom* pseudo_tag,
|
2017-03-13 16:53:45 +00:00
|
|
|
RawServoStyleSetBorrowed set)
|
2017-07-17 18:42:00 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_Inherit, ServoStyleContextStrong,
|
2017-01-04 19:52:27 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
2017-07-17 18:42:00 +00:00
|
|
|
mozilla::CSSPseudoElementType pseudo_type,
|
|
|
|
nsIAtom* pseudo_tag,
|
|
|
|
ServoStyleContextBorrowedOrNull parent_style,
|
2017-04-28 11:10:00 +00:00
|
|
|
mozilla::InheritTarget target)
|
2017-07-04 06:49:50 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_GetStyleBits, uint64_t,
|
|
|
|
ServoComputedValuesBorrowed values)
|
2017-07-13 08:49:14 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_EqualCustomProperties, bool,
|
|
|
|
ServoComputedValuesBorrowed first,
|
|
|
|
ServoComputedValuesBorrowed second)
|
2017-07-09 23:38:58 +00:00
|
|
|
// Gets the source style rules for the computed values. This returns
|
|
|
|
// the result via rules, which would include a list of unowned pointers
|
|
|
|
// to RawServoStyleRule.
|
|
|
|
SERVO_BINDING_FUNC(Servo_ComputedValues_GetStyleRuleList, void,
|
|
|
|
ServoComputedValuesBorrowed values,
|
|
|
|
RawGeckoServoStyleRuleListBorrowedMut rules)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
2017-07-17 18:42:00 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_StyleContext_NewContext,
|
|
|
|
ServoStyleContextStrong,
|
|
|
|
ServoComputedValuesBorrowed values,
|
|
|
|
ServoStyleContextBorrowedOrNull parent,
|
|
|
|
RawGeckoPresContextBorrowed pres_context,
|
|
|
|
mozilla::CSSPseudoElementType pseudo_type,
|
|
|
|
nsIAtom* pseudo_tag)
|
|
|
|
|
|
|
|
|
2016-08-19 11:44:43 +00:00
|
|
|
// Initialize Servo components. Should be called exactly once at startup.
|
2017-04-04 03:21:16 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_Initialize, void,
|
|
|
|
RawGeckoURLExtraData* dummy_url_data)
|
2016-08-19 11:44:43 +00:00
|
|
|
// Shut down Servo components. Should be called exactly once at shutdown.
|
|
|
|
SERVO_BINDING_FUNC(Servo_Shutdown, void)
|
|
|
|
|
2016-11-02 06:11:24 +00:00
|
|
|
// Restyle and change hints.
|
|
|
|
SERVO_BINDING_FUNC(Servo_NoteExplicitHints, void, RawGeckoElementBorrowed element,
|
|
|
|
nsRestyleHint restyle_hint, nsChangeHint change_hint)
|
2017-07-15 04:09:35 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_TakeChangeHint,
|
|
|
|
nsChangeHint,
|
|
|
|
RawGeckoElementBorrowed element,
|
2017-07-15 04:16:11 +00:00
|
|
|
mozilla::TraversalRestyleBehavior restyle_behavior,
|
|
|
|
bool* was_restyled)
|
2017-07-17 18:42:00 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ResolveStyle, ServoStyleContextStrong,
|
2017-01-04 19:52:27 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
2017-07-10 22:51:34 +00:00
|
|
|
RawServoStyleSetBorrowed set)
|
2017-07-17 18:42:00 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ResolvePseudoStyle, ServoStyleContextStrong,
|
2017-05-14 16:39:22 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
|
|
|
mozilla::CSSPseudoElementType pseudo_type,
|
2017-07-17 18:42:00 +00:00
|
|
|
nsIAtom* pseudo_tag,
|
2017-06-27 06:35:09 +00:00
|
|
|
bool is_probe,
|
|
|
|
ServoComputedValuesBorrowedOrNull inherited_style,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextBorrowedOrNull parent_style_context,
|
2017-06-27 06:35:09 +00:00
|
|
|
RawServoStyleSetBorrowed set)
|
2017-06-26 05:16:18 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_SetExplicitStyle, void,
|
|
|
|
RawGeckoElementBorrowed element,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextBorrowed primary_style)
|
2017-05-10 20:11:36 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_HasAuthorSpecifiedRules, bool,
|
|
|
|
RawGeckoElementBorrowed element,
|
|
|
|
uint32_t rule_type_mask,
|
|
|
|
bool author_colors_allowed)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
2016-12-28 07:49:12 +00:00
|
|
|
// Resolves style for an element or pseudo-element without processing pending
|
|
|
|
// restyles first. The Element and its ancestors may be unstyled, have pending
|
|
|
|
// restyles, or be in a display:none subtree. Styles are cached when possible,
|
|
|
|
// though caching is not possible within display:none subtrees, and the styles
|
|
|
|
// may be invalidated by already-scheduled restyles.
|
|
|
|
//
|
|
|
|
// The tree must be in a consistent state such that a normal traversal could be
|
|
|
|
// performed, and this function maintains that invariant.
|
2017-07-17 18:42:00 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_ResolveStyleLazily, ServoStyleContextStrong,
|
2017-05-07 14:36:47 +00:00
|
|
|
RawGeckoElementBorrowed element,
|
2017-05-14 16:39:22 +00:00
|
|
|
mozilla::CSSPseudoElementType pseudo_type,
|
2017-07-17 18:42:00 +00:00
|
|
|
nsIAtom* pseudo_tag,
|
|
|
|
ServoStyleContextBorrowedOrNull parent_style_context,
|
2017-05-24 06:37:47 +00:00
|
|
|
mozilla::StyleRuleInclusion rule_inclusion,
|
2017-05-07 14:36:47 +00:00
|
|
|
const mozilla::ServoElementSnapshotTable* snapshots,
|
2016-12-28 07:49:12 +00:00
|
|
|
RawServoStyleSetBorrowed set)
|
|
|
|
|
2017-01-19 23:56:53 +00:00
|
|
|
// Use ServoStyleSet::PrepareAndTraverseSubtree instead of calling this
|
|
|
|
// directly
|
2017-05-07 14:36:47 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_TraverseSubtree,
|
|
|
|
bool,
|
|
|
|
RawGeckoElementBorrowed root,
|
|
|
|
RawServoStyleSetBorrowed set,
|
|
|
|
const mozilla::ServoElementSnapshotTable* snapshots,
|
2017-04-08 14:57:08 +00:00
|
|
|
mozilla::TraversalRootBehavior root_behavior,
|
|
|
|
mozilla::TraversalRestyleBehavior restyle_behavior)
|
2016-11-02 06:11:24 +00:00
|
|
|
|
|
|
|
// Assert that the tree has no pending or unconsumed restyles.
|
|
|
|
SERVO_BINDING_FUNC(Servo_AssertTreeIsClean, void, RawGeckoElementBorrowed root)
|
2016-08-19 11:44:43 +00:00
|
|
|
|
2017-06-16 17:20:25 +00:00
|
|
|
// Checks whether the rule tree has crossed its threshold for unused rule nodes,
|
|
|
|
// and if so, frees them.
|
|
|
|
SERVO_BINDING_FUNC(Servo_MaybeGCRuleTree, void, RawServoStyleSetBorrowed set)
|
|
|
|
|
2017-04-06 01:34:50 +00:00
|
|
|
// Returns computed values for the given element without any animations rules.
|
|
|
|
SERVO_BINDING_FUNC(Servo_StyleSet_GetBaseComputedValuesForElement,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextStrong,
|
2017-04-06 01:34:50 +00:00
|
|
|
RawServoStyleSetBorrowed set,
|
|
|
|
RawGeckoElementBorrowed element,
|
2017-07-17 18:42:00 +00:00
|
|
|
ServoStyleContextBorrowed existing_style,
|
2017-05-07 14:36:47 +00:00
|
|
|
const mozilla::ServoElementSnapshotTable* snapshots,
|
2017-05-14 16:39:22 +00:00
|
|
|
mozilla::CSSPseudoElementType pseudo_type)
|
2017-04-06 01:34:50 +00:00
|
|
|
|
2017-05-19 22:38:26 +00:00
|
|
|
// For canvas font.
|
|
|
|
SERVO_BINDING_FUNC(Servo_SerializeFontValueForCanvas, void,
|
|
|
|
RawServoDeclarationBlockBorrowed declarations,
|
|
|
|
nsAString* buffer)
|
|
|
|
|
2017-06-22 18:06:57 +00:00
|
|
|
// Get custom property value.
|
2017-06-29 02:25:10 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetCustomPropertyValue, bool,
|
2017-06-22 18:06:57 +00:00
|
|
|
ServoComputedValuesBorrowed computed_values,
|
|
|
|
const nsAString* name, nsAString* value)
|
|
|
|
|
2017-06-29 02:25:10 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetCustomPropertiesCount, uint32_t,
|
|
|
|
ServoComputedValuesBorrowed computed_values)
|
|
|
|
|
2017-06-29 02:25:10 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetCustomPropertyNameAt, bool,
|
|
|
|
ServoComputedValuesBorrowed, uint32_t index,
|
|
|
|
nsAString* name)
|
|
|
|
|
2017-07-17 18:42:12 +00:00
|
|
|
SERVO_BINDING_FUNC(Servo_GetEmptyVariables, const nsStyleVariables*)
|
2016-11-23 00:35:55 +00:00
|
|
|
|
2017-07-18 06:02:13 +00:00
|
|
|
|
2016-11-23 00:35:55 +00:00
|
|
|
// AddRef / Release functions
|
|
|
|
#define SERVO_ARC_TYPE(name_, type_) \
|
|
|
|
SERVO_BINDING_FUNC(Servo_##name_##_AddRef, void, type_##Borrowed) \
|
|
|
|
SERVO_BINDING_FUNC(Servo_##name_##_Release, void, type_##Borrowed)
|
|
|
|
#include "mozilla/ServoArcTypeList.h"
|
|
|
|
#undef SERVO_ARC_TYPE
|