Bug 1172408 - When checking if a marker details element has an action on click, pass in the marker details container so that we don't ascend up to the document, throwing an error. r=vp
authorJordan Santell <jsantell@mozilla.com>
Thu, 16 Jul 2015 15:40:23 -0700
changeset 287391 88ecc638d778ef1a1e147fb025a0df03c48d31da
parent 287390 3f242232b264cf85a1dd5d467b1afa1a9e2e4398
child 287392 20081c51fb3fbaaad25b6b50da738a0efb0f1eeb
child 287502 34e2362a1730fc91edc0be3c349d0f7e9bce24c0
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvp
bugs1172408
milestone42.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 1172408 - When checking if a marker details element has an action on click, pass in the marker details container so that we don't ascend up to the document, throwing an error. r=vp
browser/devtools/performance/modules/widgets/marker-details.js
--- a/browser/devtools/performance/modules/widgets/marker-details.js
+++ b/browser/devtools/performance/modules/widgets/marker-details.js
@@ -97,17 +97,17 @@ MarkerDetails.prototype = {
   },
 
   /**
    * Handles click in the marker details view. Based on the target,
    * can handle different actions -- only supporting view source links
    * for the moment.
    */
   _onClick: function (e) {
-    let data = findActionFromEvent(e.target);
+    let data = findActionFromEvent(e.target, this._parent);
     if (!data) {
       return;
     }
 
     if (data.action === "view-source") {
       this.emit("view-source", data.url, data.line);
     }
   },
@@ -116,17 +116,17 @@ MarkerDetails.prototype = {
    * Handles the "mouseup" event on the marker details view splitter.
    */
   _onSplitterMouseUp: function() {
     this.emit("resize");
   }
 };
 
 /**
- * Take an element from an event `target`, and asend through
+ * Take an element from an event `target`, and ascend through
  * the DOM, looking for an element with a `data-action` attribute. Return
  * the parsed `data-action` value found, or null if none found before
  * reaching the parent `container`.
  *
  * @param {Element} target
  * @param {Element} container
  * @return {?object}
  */