Bug 1253330 - Fix heap-tree-item-field heap-tree-item-name inline style (margin-left) in RTL. r=ntim draft
authorSteve Chung <schung@mozilla.com>
Wed, 03 Aug 2016 14:24:19 +0800
changeset 395936 2cbf2945a1f014ec561569d45fe02ac95ba83194
parent 394995 ffac2798999c5b84f1b4605a1280994bb665a406
child 396559 1c6aea8ca50bfd0afff1c38d11f784b1668637a3
child 396659 dcf16664ee7be69f139c880e85b58ae0262de360
push id24885
push userschung@mozilla.com
push dateWed, 03 Aug 2016 06:24:59 +0000
reviewersntim
bugs1253330
milestone51.0a1
Bug 1253330 - Fix heap-tree-item-field heap-tree-item-name inline style (margin-left) in RTL. r=ntim MozReview-Commit-ID: Irz2x4P7hx4
devtools/client/memory/components/census-tree-item.js
devtools/client/memory/components/dominator-tree-item.js
devtools/client/memory/components/dominator-tree.js
devtools/client/memory/test/browser/browser_memory_no_auto_expand.js
--- a/devtools/client/memory/components/census-tree-item.js
+++ b/devtools/client/memory/components/census-tree-item.js
@@ -93,17 +93,17 @@ const CensusTreeItem = module.exports = 
                dom.span({ className: "heap-tree-percent" }, percentTotalBytes)),
       dom.span({ className: "heap-tree-item-field heap-tree-item-total-count" },
                dom.span({ className: "heap-tree-number" }, totalCount),
                dom.span({ className: "heap-tree-percent" }, percentTotalCount)),
       individualsCell,
       dom.span(
         {
           className: "heap-tree-item-field heap-tree-item-name",
-          style: { marginLeft: depth * TREE_ROW_HEIGHT }
+          style: { marginInlineStart: depth * TREE_ROW_HEIGHT }
         },
         arrow,
         pointer,
         this.toLabel(item.name, onViewSourceInDebugger)
       )
     );
   },
 
--- a/devtools/client/memory/components/dominator-tree-item.js
+++ b/devtools/client/memory/components/dominator-tree-item.js
@@ -125,17 +125,17 @@ const DominatorTreeItem = module.exports
           shallowSize
         ),
         dom.span({ className: "heap-tree-percent" }, percentShallowSize)
       ),
 
       dom.span(
         {
           className: "heap-tree-item-field heap-tree-item-name",
-          style: { marginLeft: depth * TREE_ROW_HEIGHT }
+          style: { marginInlineStart: depth * TREE_ROW_HEIGHT }
         },
         arrow,
         label,
         dom.span({ className: "heap-tree-item-address" },
                  `@ 0x${item.nodeId.toString(16)}`)
       )
     );
   },
--- a/devtools/client/memory/components/dominator-tree.js
+++ b/devtools/client/memory/components/dominator-tree.js
@@ -40,17 +40,17 @@ const DominatorTreeSubtreeFetching = cre
     return dom.div(
       {
         className: `heap-tree-item subtree-fetching ${focused ? "focused" : ""}`
       },
       dom.span({ className: "heap-tree-item-field heap-tree-item-bytes" }),
       dom.span({ className: "heap-tree-item-field heap-tree-item-bytes" }),
       dom.span({
         className: "heap-tree-item-field heap-tree-item-name devtools-throbber",
-        style: { marginLeft: depth * TREE_ROW_HEIGHT }
+        style: { marginInlineStart: depth * TREE_ROW_HEIGHT }
       })
     );
   }
 }));
 
 /**
  * A link to fetch and load more siblings in the dominator tree, when there are
  * already many loaded above.
@@ -82,17 +82,17 @@ const DominatorTreeSiblingLink = createF
       {
         className: `heap-tree-item more-children ${focused ? "focused" : ""}`
       },
       dom.span({ className: "heap-tree-item-field heap-tree-item-bytes" }),
       dom.span({ className: "heap-tree-item-field heap-tree-item-bytes" }),
       dom.span(
         {
           className: "heap-tree-item-field heap-tree-item-name",
-          style: { marginLeft: depth * TREE_ROW_HEIGHT }
+          style: { marginInlineStart: depth * TREE_ROW_HEIGHT }
         },
         dom.a(
           {
             onClick: () => onLoadMoreSiblings(item)
           },
           L10N.getStr("tree-item.load-more")
         )
       )
--- a/devtools/client/memory/test/browser/browser_memory_no_auto_expand.js
+++ b/devtools/client/memory/test/browser/browser_memory_no_auto_expand.js
@@ -26,12 +26,12 @@ this.test = makeMemoryTest(TEST_URL, fun
   const recordingCheckbox = doc.getElementById("record-allocation-stacks-checkbox");
   EventUtils.synthesizeMouseAtCenter(recordingCheckbox, {}, panel.panelWin);
   is(getState().allocations.recording, true);
 
   const nameElems = [...doc.querySelectorAll(".heap-tree-item-field.heap-tree-item-name")];
 
   for (let el of nameElems) {
     dumpn(`Found ${el.textContent.trim()}`);
-    is(el.style.marginLeft, "0px",
+    is(el.style.marginInlineStart, "0px",
        "None of the elements should be an indented/expanded child");
   }
 });