Bug 1527309 - Log CSS rule ancestors in reverse order. r=gl
authorRazvan Caliman <rcaliman@mozilla.com>
Tue, 12 Feb 2019 14:45:38 +0000
changeset 458753 0f1f38a6dd4d
parent 458752 7f9e50bfaad1
child 458754 99c2a6b3e3bd
push id35548
push useropoprus@mozilla.com
push dateWed, 13 Feb 2019 09:48:26 +0000
treeherdermozilla-central@93e37c529818 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1527309
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527309 - Log CSS rule ancestors in reverse order. r=gl Differential Revision: https://phabricator.services.mozilla.com/D19495
devtools/server/actors/styles.js
--- a/devtools/server/actors/styles.js
+++ b/devtools/server/actors/styles.js
@@ -1059,17 +1059,17 @@ var StyleRuleActor = protocol.ActorClass
    *
    * @return {Array}
    */
   get ancestorRules() {
     const ancestors = [];
     let rule = this.rawRule;
 
     while (rule.parentRule) {
-      ancestors.push(this.pageStyle._styleRef(rule.parentRule));
+      ancestors.unshift(this.pageStyle._styleRef(rule.parentRule));
       rule = rule.parentRule;
     }
 
     return ancestors;
   },
 
   /**
    * Return an object with information about this rule used for tracking changes.