layout/inspector/inIDeepTreeWalker.idl
author Jean-Yves Avenard <jyavenard@mozilla.com>
Wed, 31 Jan 2018 19:08:51 +0100
changeset 463332 4e8af01f19c29b43c1f0606d1fac0d262c777b40
parent 454620 bffbab07fdc4c9a92b7a6ff5d68459961cc786ab
child 474607 4eb337cfade1b2e4247c08bc66aab488a9ccfe3d
permissions -rw-r--r--
Bug 1432779 - P4. Remove the concept of preferred layout. r=padenot,r=kamidphish Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between. So we remove it. MozReview-Commit-ID: CSCAInNmzMS

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface nsIDOMNode;

// Note: the iterator does not handle DOM mutations gracefully. So if
// the underlying DOM we are iterating over is changed, the behavior
// of the walker is undefined. (With the current implementation we
// cache the siblings of the current node and this list is not updated
// when a mutation occurs).

[scriptable, uuid(6657e8eb-b646-48e7-993e-cfa6e96415b4)]
interface inIDeepTreeWalker : nsISupports
{
  attribute boolean showAnonymousContent;
  attribute boolean showSubDocuments;

  // By default the walker skips document nodes from the iteration,
  // by setting this flag to true this behavior can be altered.
  attribute boolean showDocumentsAsNodes;

  void init(in nsIDOMNode aRoot, in unsigned long aWhatToShow);

  // Methods and attributes that look like TreeWalker.
  // Note: normally parentNode cannot go further up on the tree once it reached
  // the root, but setting currentNode does not have this limitation. If currentNode
  // is set to a node that does not have the root as its ancestor the walk can be
  // continued from there, and once we reach a node that is 'under' the root, the
  // limitation for the parentNode will work again.
  readonly attribute nsIDOMNode       root;
  readonly attribute unsigned long    whatToShow;
           attribute nsIDOMNode       currentNode;

  nsIDOMNode         parentNode();
  nsIDOMNode         firstChild();
  nsIDOMNode         lastChild();
  nsIDOMNode         previousSibling();
  nsIDOMNode         nextSibling();
  nsIDOMNode         previousNode();
  nsIDOMNode         nextNode();
};