Checking in Jonas Sicking's (sicking@bigfoot.com) DOM Level 2 traversal interfaces, see bug 82625 for more details, not part of the build.

This commit is contained in:
jst%netscape.com 2001-05-26 10:04:05 +00:00
parent 700ca014e0
commit 2ca65812ef
8 changed files with 329 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Makefile
genjs
genx

View File

@ -0,0 +1,4 @@
nsIDOMDocumentTraversal.idl
nsIDOMNodeFilter.idl
nsIDOMNodeIterator.idl
nsIDOMTreeWalker.idl

View File

@ -0,0 +1,51 @@
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is this file as it was released on
# May 1 2001.
#
# The Initial Developer of the Original Code is Jonas Sicking.
# Portions created by Jonas Sicking are Copyright (C) 2001
# Jonas Sicking. All Rights Reserved.
#
# Contributor(s):
# Jonas Sicking <sicking@bigfoot.com> (Original Author)
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. If you wish to allow use of your
# version of this file only under the terms of the GPL and not to
# allow others to use your version of this file under the MPL,
# indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by
# the GPL. If you do not delete the provisions above, a recipient
# may use your version of this file under either the MPL or the
# GPL.
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = dom
XPIDL_MODULE = dom_traversal
XPIDLSRCS = \
nsIDOMDocumentTraversal.idl \
nsIDOMNodeFilter.idl \
nsIDOMNodeIterator.idl \
nsIDOMTreeWalker.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,47 @@
#!nmake
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is this file as it was released on
# May 1 2001.
#
# The Initial Developer of the Original Code is Jonas Sicking.
# Portions created by Jonas Sicking are Copyright (C) 2001
# Jonas Sicking. All Rights Reserved.
#
# Contributor(s):
# Jonas Sicking <sicking@bigfoot.com> (Original Author)
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. If you wish to allow use of your
# version of this file only under the terms of the GPL and not to
# allow others to use your version of this file under the MPL,
# indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by
# the GPL. If you do not delete the provisions above, a recipient
# may use your version of this file under either the MPL or the
# GPL.
DEPTH=..\..\..\..
MODULE=dom
XPIDL_MODULE=dom_traversal
XPIDLSRCS = \
.\nsIDOMDocumentTraversal.idl \
.\nsIDOMNodeFilter.idl \
.\nsIDOMNodeIterator.idl \
.\nsIDOMTreeWalker.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@ -0,0 +1,52 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is this file as it was released on
* May 1 2001.
*
* The Initial Developer of the Original Code is Jonas Sicking.
* Portions created by Jonas Sicking are Copyright (C) 2001
* Jonas Sicking. All Rights Reserved.
*
* Contributor(s):
* Jonas Sicking <sicking@bigfoot.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*
*/
#include "domstubs.idl"
[scriptable, uuid(13f236c0-47f8-11d5-b6a3-009027446e84)]
// Introduced in DOM Level 2:
interface nsIDOMDocumentTraversal : nsISupports {
nsIDOMNodeIterator createNodeIterator(in nsIDOMNode root,
in unsigned long whatToShow,
in nsIDOMNodeFilter filter,
in boolean entityReferenceExpansion)
raises(DOMException);
nsIDOMTreeWalker createTreeWalker(in nsIDOMNode root,
in unsigned long whatToShow,
in nsIDOMNodeFilter filter,
in boolean entityReferenceExpansion)
raises(DOMException);
};

View File

@ -0,0 +1,65 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is this file as it was released on
* May 1 2001.
*
* The Initial Developer of the Original Code is Jonas Sicking.
* Portions created by Jonas Sicking are Copyright (C) 2001
* Jonas Sicking. All Rights Reserved.
*
* Contributor(s):
* Jonas Sicking <sicking@bigfoot.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*
*/
#include "domstubs.idl"
[scriptable, uuid(e4723748-1dd1-11b2-8ee6-866a532a6237)]
// Introduced in DOM Level 2:
interface nsIDOMNodeFilter : nsISupports {
// Constants returned by acceptNode
const short FILTER_ACCEPT = 1;
const short FILTER_REJECT = 2;
const short FILTER_SKIP = 3;
// Constants for whatToShow
const unsigned long SHOW_ALL = 0xFFFFFFFF;
const unsigned long SHOW_ELEMENT = 0x00000001;
const unsigned long SHOW_ATTRIBUTE = 0x00000002;
const unsigned long SHOW_TEXT = 0x00000004;
const unsigned long SHOW_CDATA_SECTION = 0x00000008;
const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010;
const unsigned long SHOW_ENTITY = 0x00000020;
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040;
const unsigned long SHOW_COMMENT = 0x00000080;
const unsigned long SHOW_DOCUMENT = 0x00000100;
const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200;
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400;
const unsigned long SHOW_NOTATION = 0x00000800;
short acceptNode(in nsIDOMNode n);
};

View File

@ -0,0 +1,51 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is this file as it was released on
* May 1 2001.
*
* The Initial Developer of the Original Code is Jonas Sicking.
* Portions created by Jonas Sicking are Copyright (C) 2001
* Jonas Sicking. All Rights Reserved.
*
* Contributor(s):
* Jonas Sicking <sicking@bigfoot.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*
*/
#include "domstubs.idl"
[scriptable, uuid(354b5f02-1dd2-11b2-b053-b8c2997022a0)]
// Introduced in DOM Level 2:
interface nsIDOMNodeIterator : nsISupports {
readonly attribute nsIDOMNode root;
readonly attribute unsigned long whatToShow;
readonly attribute nsIDOMNodeFilter filter;
readonly attribute boolean expandEntityReferences;
nsIDOMNode nextNode()
raises(DOMException);
nsIDOMNode previousNode()
raises(DOMException);
void detach();
};

View File

@ -0,0 +1,56 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is this file as it was released on
* May 1 2001.
*
* The Initial Developer of the Original Code is Jonas Sicking.
* Portions created by Jonas Sicking are Copyright (C) 2001
* Jonas Sicking. All Rights Reserved.
*
* Contributor(s):
* Jonas Sicking <sicking@bigfoot.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*
*/
#include "domstubs.idl"
[scriptable, uuid(400af3ca-1dd2-11b2-a50a-887ecca2e63a)]
// Introduced in DOM Level 2:
interface nsIDOMTreeWalker : nsISupports {
readonly attribute nsIDOMNode root;
readonly attribute unsigned long whatToShow;
readonly attribute nsIDOMNodeFilter filter;
readonly attribute boolean expandEntityReferences;
attribute nsIDOMNode currentNode;
// raises(DOMException) on setting
nsIDOMNode parentNode();
nsIDOMNode firstChild();
nsIDOMNode lastChild();
nsIDOMNode previousSibling();
nsIDOMNode nextSibling();
nsIDOMNode previousNode();
nsIDOMNode nextNode();
};