зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1395322 Part 1: Enforce consistent use of nsIDOMCSSRule enums for Servo rule types. r=xidorn
MozReview-Commit-ID: DmfaYCe9QAY --HG-- extra : rebase_source : 6a89bd910de053c4535bdfbdf7df551bf9c83472
This commit is contained in:
Родитель
57b3cbb9f2
Коммит
486088166d
|
@ -223,7 +223,7 @@ ServoCSSRuleList::DeleteRule(uint32_t aIndex)
|
|||
}
|
||||
|
||||
uint16_t
|
||||
ServoCSSRuleList::GetRuleType(uint32_t aIndex) const
|
||||
ServoCSSRuleList::GetDOMCSSRuleType(uint32_t aIndex) const
|
||||
{
|
||||
uintptr_t rule = mRules[aIndex];
|
||||
if (rule <= kMaxRuleType) {
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
nsresult InsertRule(const nsAString& aRule, uint32_t aIndex);
|
||||
nsresult DeleteRule(uint32_t aIndex);
|
||||
|
||||
uint16_t GetRuleType(uint32_t aIndex) const;
|
||||
uint16_t GetDOMCSSRuleType(uint32_t aIndex) const;
|
||||
|
||||
private:
|
||||
virtual ~ServoCSSRuleList();
|
||||
|
|
|
@ -412,7 +412,7 @@ ServoStyleSheet::InsertRuleInternal(const nsAString& aRule,
|
|||
return 0;
|
||||
}
|
||||
if (mDocument) {
|
||||
if (mRuleList->GetRuleType(aIndex) != css::Rule::IMPORT_RULE ||
|
||||
if (mRuleList->GetDOMCSSRuleType(aIndex) != nsIDOMCSSRule::IMPORT_RULE ||
|
||||
!RuleHasPendingChildSheet(mRuleList->GetRule(aIndex))) {
|
||||
// XXX We may not want to get the rule when stylesheet change event
|
||||
// is not enabled.
|
||||
|
|
Загрузка…
Ссылка в новой задаче