зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1350175 - Part 2: FFI changes to get line and column. r=xidorn
MozReview-Commit-ID: 87pVnoLmjPl --HG-- extra : rebase_source : 1decaf9bc3aa75d64254aea8fdb08679c2557ca2
This commit is contained in:
Родитель
50301fae54
Коммит
9e66b37474
|
@ -102,7 +102,8 @@ SERVO_BINDING_FUNC(Servo_CssRules_DeleteRule, nsresult,
|
|||
#define BASIC_RULE_FUNCS(type_) \
|
||||
SERVO_BINDING_FUNC(Servo_CssRules_Get##type_##RuleAt, \
|
||||
RawServo##type_##RuleStrong, \
|
||||
ServoCssRulesBorrowed rules, uint32_t index) \
|
||||
ServoCssRulesBorrowed rules, uint32_t index, \
|
||||
uint32_t* line, uint32_t* column) \
|
||||
SERVO_BINDING_FUNC(Servo_##type_##Rule_Debug, void, \
|
||||
RawServo##type_##RuleBorrowed rule, nsACString* result) \
|
||||
SERVO_BINDING_FUNC(Servo_##type_##Rule_GetCssText, void, \
|
||||
|
|
|
@ -84,8 +84,12 @@ ServoCSSRuleList::GetRule(uint32_t aIndex)
|
|||
switch (rule) {
|
||||
#define CASE_RULE(const_, name_) \
|
||||
case nsIDOMCSSRule::const_##_RULE: { \
|
||||
ruleObj = new Servo##name_##Rule( \
|
||||
Servo_CssRules_Get##name_##RuleAt(mRawRules, aIndex).Consume()); \
|
||||
uint32_t line = 0, column = 0; \
|
||||
RefPtr<RawServo##name_##Rule> rule = \
|
||||
Servo_CssRules_Get##name_##RuleAt( \
|
||||
mRawRules, aIndex, &line, &column \
|
||||
).Consume(); \
|
||||
ruleObj = new Servo##name_##Rule(rule.forget(), line, column); \
|
||||
break; \
|
||||
}
|
||||
CASE_RULE(STYLE, Style)
|
||||
|
|
|
@ -13,7 +13,8 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
ServoDocumentRule::ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule)
|
||||
ServoDocumentRule::ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn)
|
||||
: CSSMozDocumentRule(Servo_DocumentRule_GetRules(aRawRule).Consume())
|
||||
, mRawRule(Move(aRawRule))
|
||||
{
|
||||
|
|
|
@ -17,7 +17,8 @@ namespace mozilla {
|
|||
class ServoDocumentRule final : public dom::CSSMozDocumentRule
|
||||
{
|
||||
public:
|
||||
explicit ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule);
|
||||
ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
ServoMediaRule::ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule)
|
||||
ServoMediaRule::ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn)
|
||||
: CSSMediaRule(Servo_MediaRule_GetRules(aRawRule).Consume())
|
||||
, mRawRule(Move(aRawRule))
|
||||
{
|
||||
|
|
|
@ -19,7 +19,8 @@ class ServoMediaList;
|
|||
class ServoMediaRule final : public dom::CSSMediaRule
|
||||
{
|
||||
public:
|
||||
explicit ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule);
|
||||
ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoMediaRule, dom::CSSMediaRule)
|
||||
|
|
|
@ -15,8 +15,9 @@ namespace mozilla {
|
|||
class ServoNamespaceRule : public dom::CSSNamespaceRule
|
||||
{
|
||||
public:
|
||||
explicit ServoNamespaceRule(already_AddRefed<RawServoNamespaceRule> aRule)
|
||||
: CSSNamespaceRule(0, 0)
|
||||
ServoNamespaceRule(already_AddRefed<RawServoNamespaceRule> aRule,
|
||||
uint32_t aLine, uint32_t aColumn)
|
||||
: CSSNamespaceRule(aLine, aColumn)
|
||||
, mRawRule(Move(aRule))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -104,8 +104,9 @@ ServoPageRuleDeclaration::GetServoCSSParsingEnvironment() const
|
|||
|
||||
// -- ServoPageRule --------------------------------------------------
|
||||
|
||||
ServoPageRule::ServoPageRule(RefPtr<RawServoPageRule> aRawRule)
|
||||
: CSSPageRule(0, 0)
|
||||
ServoPageRule::ServoPageRule(RefPtr<RawServoPageRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn)
|
||||
: CSSPageRule(aLine, aColumn)
|
||||
, mRawRule(Move(aRawRule))
|
||||
, mDecls(Servo_PageRule_GetStyle(mRawRule).Consume())
|
||||
{
|
||||
|
|
|
@ -51,7 +51,8 @@ private:
|
|||
class ServoPageRule final : public dom::CSSPageRule
|
||||
{
|
||||
public:
|
||||
explicit ServoPageRule(RefPtr<RawServoPageRule> aRawRule);
|
||||
ServoPageRule(RefPtr<RawServoPageRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
|
||||
|
|
|
@ -109,8 +109,9 @@ ServoStyleRuleDeclaration::GetServoCSSParsingEnvironment() const
|
|||
|
||||
// -- ServoStyleRule --------------------------------------------------
|
||||
|
||||
ServoStyleRule::ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule)
|
||||
: BindingStyleRule(0, 0)
|
||||
ServoStyleRule::ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn)
|
||||
: BindingStyleRule(aLine, aColumn)
|
||||
, mRawRule(aRawRule)
|
||||
, mDecls(Servo_StyleRule_GetStyle(mRawRule).Consume())
|
||||
{
|
||||
|
|
|
@ -53,7 +53,8 @@ class ServoStyleRule final : public BindingStyleRule
|
|||
, public nsIDOMCSSStyleRule
|
||||
{
|
||||
public:
|
||||
explicit ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule);
|
||||
ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ServoStyleRule,
|
||||
|
|
|
@ -14,7 +14,8 @@ using namespace mozilla::dom;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
ServoSupportsRule::ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule)
|
||||
ServoSupportsRule::ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn)
|
||||
: CSSSupportsRule(Servo_SupportsRule_GetRules(aRawRule).Consume())
|
||||
, mRawRule(Move(aRawRule))
|
||||
{
|
||||
|
|
|
@ -17,7 +17,8 @@ namespace mozilla {
|
|||
class ServoSupportsRule final : public dom::CSSSupportsRule
|
||||
{
|
||||
public:
|
||||
explicit ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule);
|
||||
ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
|
||||
uint32_t aLine, uint32_t aColumn);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче