зеркало из 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_) \
|
#define BASIC_RULE_FUNCS(type_) \
|
||||||
SERVO_BINDING_FUNC(Servo_CssRules_Get##type_##RuleAt, \
|
SERVO_BINDING_FUNC(Servo_CssRules_Get##type_##RuleAt, \
|
||||||
RawServo##type_##RuleStrong, \
|
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, \
|
SERVO_BINDING_FUNC(Servo_##type_##Rule_Debug, void, \
|
||||||
RawServo##type_##RuleBorrowed rule, nsACString* result) \
|
RawServo##type_##RuleBorrowed rule, nsACString* result) \
|
||||||
SERVO_BINDING_FUNC(Servo_##type_##Rule_GetCssText, void, \
|
SERVO_BINDING_FUNC(Servo_##type_##Rule_GetCssText, void, \
|
||||||
|
|
|
@ -84,8 +84,12 @@ ServoCSSRuleList::GetRule(uint32_t aIndex)
|
||||||
switch (rule) {
|
switch (rule) {
|
||||||
#define CASE_RULE(const_, name_) \
|
#define CASE_RULE(const_, name_) \
|
||||||
case nsIDOMCSSRule::const_##_RULE: { \
|
case nsIDOMCSSRule::const_##_RULE: { \
|
||||||
ruleObj = new Servo##name_##Rule( \
|
uint32_t line = 0, column = 0; \
|
||||||
Servo_CssRules_Get##name_##RuleAt(mRawRules, aIndex).Consume()); \
|
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; \
|
break; \
|
||||||
}
|
}
|
||||||
CASE_RULE(STYLE, Style)
|
CASE_RULE(STYLE, Style)
|
||||||
|
|
|
@ -13,7 +13,8 @@ using namespace mozilla::dom;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
ServoDocumentRule::ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule)
|
ServoDocumentRule::ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn)
|
||||||
: CSSMozDocumentRule(Servo_DocumentRule_GetRules(aRawRule).Consume())
|
: CSSMozDocumentRule(Servo_DocumentRule_GetRules(aRawRule).Consume())
|
||||||
, mRawRule(Move(aRawRule))
|
, mRawRule(Move(aRawRule))
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,8 @@ namespace mozilla {
|
||||||
class ServoDocumentRule final : public dom::CSSMozDocumentRule
|
class ServoDocumentRule final : public dom::CSSMozDocumentRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule);
|
ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@ using namespace mozilla::dom;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
ServoMediaRule::ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule)
|
ServoMediaRule::ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn)
|
||||||
: CSSMediaRule(Servo_MediaRule_GetRules(aRawRule).Consume())
|
: CSSMediaRule(Servo_MediaRule_GetRules(aRawRule).Consume())
|
||||||
, mRawRule(Move(aRawRule))
|
, mRawRule(Move(aRawRule))
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,8 @@ class ServoMediaList;
|
||||||
class ServoMediaRule final : public dom::CSSMediaRule
|
class ServoMediaRule final : public dom::CSSMediaRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule);
|
ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoMediaRule, dom::CSSMediaRule)
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoMediaRule, dom::CSSMediaRule)
|
||||||
|
|
|
@ -15,8 +15,9 @@ namespace mozilla {
|
||||||
class ServoNamespaceRule : public dom::CSSNamespaceRule
|
class ServoNamespaceRule : public dom::CSSNamespaceRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ServoNamespaceRule(already_AddRefed<RawServoNamespaceRule> aRule)
|
ServoNamespaceRule(already_AddRefed<RawServoNamespaceRule> aRule,
|
||||||
: CSSNamespaceRule(0, 0)
|
uint32_t aLine, uint32_t aColumn)
|
||||||
|
: CSSNamespaceRule(aLine, aColumn)
|
||||||
, mRawRule(Move(aRule))
|
, mRawRule(Move(aRule))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,8 +104,9 @@ ServoPageRuleDeclaration::GetServoCSSParsingEnvironment() const
|
||||||
|
|
||||||
// -- ServoPageRule --------------------------------------------------
|
// -- ServoPageRule --------------------------------------------------
|
||||||
|
|
||||||
ServoPageRule::ServoPageRule(RefPtr<RawServoPageRule> aRawRule)
|
ServoPageRule::ServoPageRule(RefPtr<RawServoPageRule> aRawRule,
|
||||||
: CSSPageRule(0, 0)
|
uint32_t aLine, uint32_t aColumn)
|
||||||
|
: CSSPageRule(aLine, aColumn)
|
||||||
, mRawRule(Move(aRawRule))
|
, mRawRule(Move(aRawRule))
|
||||||
, mDecls(Servo_PageRule_GetStyle(mRawRule).Consume())
|
, mDecls(Servo_PageRule_GetStyle(mRawRule).Consume())
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,8 @@ private:
|
||||||
class ServoPageRule final : public dom::CSSPageRule
|
class ServoPageRule final : public dom::CSSPageRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ServoPageRule(RefPtr<RawServoPageRule> aRawRule);
|
ServoPageRule(RefPtr<RawServoPageRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
|
||||||
|
|
|
@ -109,8 +109,9 @@ ServoStyleRuleDeclaration::GetServoCSSParsingEnvironment() const
|
||||||
|
|
||||||
// -- ServoStyleRule --------------------------------------------------
|
// -- ServoStyleRule --------------------------------------------------
|
||||||
|
|
||||||
ServoStyleRule::ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule)
|
ServoStyleRule::ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule,
|
||||||
: BindingStyleRule(0, 0)
|
uint32_t aLine, uint32_t aColumn)
|
||||||
|
: BindingStyleRule(aLine, aColumn)
|
||||||
, mRawRule(aRawRule)
|
, mRawRule(aRawRule)
|
||||||
, mDecls(Servo_StyleRule_GetStyle(mRawRule).Consume())
|
, mDecls(Servo_StyleRule_GetStyle(mRawRule).Consume())
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,7 +53,8 @@ class ServoStyleRule final : public BindingStyleRule
|
||||||
, public nsIDOMCSSStyleRule
|
, public nsIDOMCSSStyleRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule);
|
ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ServoStyleRule,
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ServoStyleRule,
|
||||||
|
|
|
@ -14,7 +14,8 @@ using namespace mozilla::dom;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
ServoSupportsRule::ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule)
|
ServoSupportsRule::ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn)
|
||||||
: CSSSupportsRule(Servo_SupportsRule_GetRules(aRawRule).Consume())
|
: CSSSupportsRule(Servo_SupportsRule_GetRules(aRawRule).Consume())
|
||||||
, mRawRule(Move(aRawRule))
|
, mRawRule(Move(aRawRule))
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,8 @@ namespace mozilla {
|
||||||
class ServoSupportsRule final : public dom::CSSSupportsRule
|
class ServoSupportsRule final : public dom::CSSSupportsRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule);
|
ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
|
||||||
|
uint32_t aLine, uint32_t aColumn);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче