Bug 1349873 - Fix old MXR links in highlighters docs; r=me draft
authorPatrick Brosset <pbrosset@mozilla.com>
Tue, 21 Mar 2017 18:12:47 +0100
changeset 503544 bf5ec3a1cfca47a9fab37fd6f1a52eeb20b869eb
parent 503543 43ef28c2b51b4b6a9d2781a870e62ba8cf335adc
child 503545 e6461696c535d15b5ae3d58538318fe223cc317e
push id50612
push userbmo:pbrosset@mozilla.com
push dateThu, 23 Mar 2017 09:13:28 +0000
reviewersme
bugs1349873
milestone55.0a1
Bug 1349873 - Fix old MXR links in highlighters docs; r=me MozReview-Commit-ID: E596NIol9Pn
devtools/docs/tools/highlighters.md
--- a/devtools/docs/tools/highlighters.md
+++ b/devtools/docs/tools/highlighters.md
@@ -105,17 +105,17 @@ Consider the following simple example:
  el.textContent = "My test element";
  let insertedEl = document.insertAnonymousContent(el);
 ```
 
 In this example, the test DIV will be inserted in the page, and will be displayed on top of everything else, in a way that doesn't impact the current layout.
 
 ### The AnonymousContent API
 
-In the previous example, the returned `insertedEl` object isn't a DOM node, and it certainly is not `el`. It is a new object, whose type is `AnonymousContent` ([see the WebIDL here](http://mxr.mozilla.org/mozilla-central/source/dom/webidl/AnonymousContent.webidl?force=1)).
+In the previous example, the returned `insertedEl` object isn't a DOM node, and it certainly is not `el`. It is a new object, whose type is `AnonymousContent` ([see the WebIDL here](https://dxr.mozilla.org/mozilla-central/source/dom/webidl/AnonymousContent.webidl)).
 
 Because of the way content is inserted into the page, it isn't wanted to give consumers a direct reference to the inserted DOM node. This is why `document.insertAnonymousContent(el)` actually **clones** `el` and returns a new object whose API lets consumers make changes to the inserted element in a way that never gives back a reference to the inserted DOM node.
 
 ### CanvasFrameAnonymousContentHelper
 
 In order to help with the API described in the previous section, the `CanvasFrameAnonymousContentHelper` class was introduced.
 
 Its goal is to provide a simple way for highlighters to insert their content into the page and modify it dynamically later. One of its goal is also to re-insert the highlighters' content on page navigation. Indeed, the frame tree is destroyed when the page is navigated away from since it represents the document element.
@@ -137,17 +137,17 @@ The returned object provides the followi
 | `setAttributeForElement(id, name, value)` | Set an attribute value of an element given its ID.         |
 | `getAttributeForElement(id, name)`        | Get an attribute value of an element given its ID.         |
 | `removeAttributeForElement(id, name)`     | Remove an attribute of an element given its ID.            |
 | `content`                                 | This property returns the wrapped AnonymousContent object. |
 | `destroy()`                               | Destroy the helper instance.                               |
 
   ### Creating a new highlighter class
 
-A good way to get started is by taking a look at [existing highlighters here](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/highlighter.js).
+A good way to get started is by taking a look at [existing highlighters here](https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/highlighters.js#697-727).
 
 Here is some boilerplate code for a new highlighter class:
 
 ```js
  function MyNewHighlighter(tabActor) {
    this.doc = tabActor.window.document;
    this.markup = new CanvasFrameAnonymousContentHelper(tabActor, this._buildMarkup.bind(this));
  }