Changeset 22035 in webkit


Ignore:
Timestamp:
Jun 6, 2007 5:54:18 PM (17 years ago)
Author:
weinig
Message:

LayoutTests:

Reviewed by Hyatt.

Update results for http://bugs.webkit.org/show_bug.cgi?id=13947
Finish autogenerating the JS DOM traversal code

  • fast/dom/Window/window-properties-expected.txt:

WebCore:

Reviewed by Hyatt.

Patch for http://bugs.webkit.org/show_bug.cgi?id=13947
Finish autogenerating the JS DOM traversal code

  • Completely generate JSNodeFilter.
  • Move JSNodeFilterCondition into its own file
  • DerivedSources.make:
  • WebCore.pro:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSNodeFilterCondition.cpp: Copied from WebCore/bindings/js/kjs_traversal.cpp. (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): (WebCore::JSNodeFilterCondition::mark): (WebCore::JSNodeFilterCondition::acceptNode):
  • bindings/js/JSNodeFilterCondition.h: Copied from WebCore/bindings/js/kjs_traversal.h.
  • bindings/js/JSNodeFilterCustom.cpp: Added. (WebCore::JSNodeFilter::mark): (WebCore::toNodeFilter):
  • bindings/js/kjs_dom.cpp:
  • bindings/js/kjs_traversal.cpp: Removed.
  • bindings/js/kjs_traversal.h: Removed.
  • bindings/js/kjs_window.cpp:
  • bindings/objc/DOM.mm: (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
  • bindings/scripts/CodeGeneratorJS.pm:
  • dom/Document.cpp: (WebCore::Document::createNodeIterator): (WebCore::Document::createTreeWalker):
  • dom/Document.h:
  • dom/NodeFilter.idl:
Location:
trunk
Files:
1 added
13 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21981 r22035  
     12007-06-06  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Hyatt.
     4
     5        Update results for http://bugs.webkit.org/show_bug.cgi?id=13947
     6        Finish autogenerating the JS DOM traversal code
     7
     8        * fast/dom/Window/window-properties-expected.txt:
     9
    1102007-06-05  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r21911 r22035  
    753753window.NodeFilter.prototype.SHOW_PROCESSING_INSTRUCTION [number]
    754754window.NodeFilter.prototype.SHOW_TEXT [number]
     755window.NodeFilter.prototype.acceptNode [function]
    755756window.Notation [object NotationConstructor]
    756757window.Notation.prototype [printed above as window.Node.prototype]
  • trunk/WebCore/ChangeLog

    r22030 r22035  
     12007-06-06  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Hyatt.
     4
     5        Patch for http://bugs.webkit.org/show_bug.cgi?id=13947
     6        Finish autogenerating the JS DOM traversal code
     7
     8        - Completely generate JSNodeFilter.
     9        - Move JSNodeFilterCondition into its own file
     10
     11        * DerivedSources.make:
     12        * WebCore.pro:
     13        * WebCore.xcodeproj/project.pbxproj:
     14        * bindings/js/JSNodeFilterCondition.cpp: Copied from WebCore/bindings/js/kjs_traversal.cpp.
     15        (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
     16        (WebCore::JSNodeFilterCondition::mark):
     17        (WebCore::JSNodeFilterCondition::acceptNode):
     18        * bindings/js/JSNodeFilterCondition.h: Copied from WebCore/bindings/js/kjs_traversal.h.
     19        * bindings/js/JSNodeFilterCustom.cpp: Added.
     20        (WebCore::JSNodeFilter::mark):
     21        (WebCore::toNodeFilter):
     22        * bindings/js/kjs_dom.cpp:
     23        * bindings/js/kjs_traversal.cpp: Removed.
     24        * bindings/js/kjs_traversal.h: Removed.
     25        * bindings/js/kjs_window.cpp:
     26        * bindings/objc/DOM.mm:
     27        (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
     28        (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
     29        * bindings/scripts/CodeGeneratorJS.pm:
     30        * dom/Document.cpp:
     31        (WebCore::Document::createNodeIterator):
     32        (WebCore::Document::createTreeWalker):
     33        * dom/Document.h:
     34        * dom/NodeFilter.idl:
     35
    1362007-06-06  Alp Toker  <alp.toker@collabora.co.uk>
    237
  • trunk/WebCore/DerivedSources.make

    r21911 r22035  
    550550    kjs_html.lut.h \
    551551    kjs_navigator.lut.h \
    552     kjs_traversal.lut.h \
    553552    kjs_window.lut.h \
    554553    ksvgcssproperties.h \
  • trunk/WebCore/WebCore.pro

    r22027 r22035  
    144144    bindings/js/kjs_html.cpp \
    145145    bindings/js/kjs_navigator.cpp \
    146     bindings/js/kjs_traversal.cpp \
    147146    bindings/js/kjs_window.cpp
    148147
     
    283282    bindings/js/JSHTMLOptionsCollectionCustom.cpp \
    284283    bindings/js/JSHTMLSelectElementCustom.cpp \
     284    bindings/js/JSNodeFilterCondition.cpp \
     285    bindings/js/JSNodeFilterCustom.cpp \
    285286    bindings/js/JSNodeIteratorCustom.cpp \
    286287    bindings/js/JSStyleSheetCustom.cpp \
     
    295296    bindings/js/kjs_navigator.cpp \
    296297    bindings/js/kjs_proxy.cpp \
    297     bindings/js/kjs_traversal.cpp \
    298298    bindings/js/kjs_window.cpp \
    299299    css/CSSBorderImageValue.cpp \
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r22013 r22035  
    15401540                93B70D6F09EB0C7C009D8468 /* kjs_proxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D5309EB0C7C009D8468 /* kjs_proxy.cpp */; };
    15411541                93B70D7009EB0C7C009D8468 /* kjs_proxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5409EB0C7C009D8468 /* kjs_proxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1542                 93B70D7109EB0C7C009D8468 /* kjs_traversal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D5509EB0C7C009D8468 /* kjs_traversal.cpp */; };
    1543                 93B70D7209EB0C7C009D8468 /* kjs_traversal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5609EB0C7C009D8468 /* kjs_traversal.h */; };
    15441542                93B70D7509EB0C7C009D8468 /* kjs_window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93B70D5909EB0C7C009D8468 /* kjs_window.cpp */; };
    15451543                93B70D7609EB0C7C009D8468 /* kjs_window.h in Headers */ = {isa = PBXBuildFile; fileRef = 93B70D5A09EB0C7C009D8468 /* kjs_window.h */; };
     
    28472845                BCB16C2E0979C3BD00467741 /* Request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C150979C3BD00467741 /* Request.cpp */; };
    28482846                BCB16C2F0979C3BD00467741 /* Request.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C160979C3BD00467741 /* Request.h */; };
     2847                BCB773610C17853D00132BA4 /* JSNodeFilterCondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */; };
     2848                BCB773620C17853D00132BA4 /* JSNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */; };
     2849                BCB773630C17853D00132BA4 /* JSNodeFilterCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */; };
    28492850                BCC088860A1BD78D006189A6 /* FontDataMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCC088850A1BD78D006189A6 /* FontDataMac.mm */; };
    28502851                BCC0891A0A1C4652006189A6 /* FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC089190A1C4652006189A6 /* FontData.cpp */; };
     
    47074708                93B70D5309EB0C7C009D8468 /* kjs_proxy.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = kjs_proxy.cpp; sourceTree = "<group>"; };
    47084709                93B70D5409EB0C7C009D8468 /* kjs_proxy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_proxy.h; sourceTree = "<group>"; };
    4709                 93B70D5509EB0C7C009D8468 /* kjs_traversal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = kjs_traversal.cpp; sourceTree = "<group>"; };
    4710                 93B70D5609EB0C7C009D8468 /* kjs_traversal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_traversal.h; sourceTree = "<group>"; };
    47114710                93B70D5909EB0C7C009D8468 /* kjs_window.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = kjs_window.cpp; sourceTree = "<group>"; };
    47124711                93B70D5A09EB0C7C009D8468 /* kjs_window.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kjs_window.h; sourceTree = "<group>"; };
     
    61226121                BCB16C150979C3BD00467741 /* Request.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Request.cpp; sourceTree = "<group>"; };
    61236122                BCB16C160979C3BD00467741 /* Request.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Request.h; sourceTree = "<group>"; };
     6123                BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCondition.cpp; sourceTree = "<group>"; };
     6124                BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilterCondition.h; sourceTree = "<group>"; };
     6125                BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
    61246126                BCC088850A1BD78D006189A6 /* FontDataMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontDataMac.mm; sourceTree = "<group>"; };
    61256127                BCC089190A1C4652006189A6 /* FontData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontData.cpp; sourceTree = "<group>"; };
     
    91899191                                93B70D5309EB0C7C009D8468 /* kjs_proxy.cpp */,
    91909192                                93B70D5409EB0C7C009D8468 /* kjs_proxy.h */,
    9191                                 93B70D5509EB0C7C009D8468 /* kjs_traversal.cpp */,
    9192                                 93B70D5609EB0C7C009D8468 /* kjs_traversal.h */,
    91939193                                93B70D5909EB0C7C009D8468 /* kjs_window.cpp */,
    91949194                                93B70D5A09EB0C7C009D8468 /* kjs_window.h */,
     
    92579257                                BC17F9650B64EBB8004A65CB /* JSHTMLSelectElementCustom.cpp */,
    92589258                                AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */,
     9259                                BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */,
     9260                                BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */,
     9261                                BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */,
    92599262                                1A750DD30A90E729000FF215 /* JSNodeIteratorCustom.cpp */,
    92609263                                BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */,
     
    1040410407                                93B70D6E09EB0C7C009D8468 /* kjs_navigator.h in Headers */,
    1040510408                                93B70D7009EB0C7C009D8468 /* kjs_proxy.h in Headers */,
    10406                                 93B70D7209EB0C7C009D8468 /* kjs_traversal.h in Headers */,
    1040710409                                93B70D7609EB0C7C009D8468 /* kjs_window.h in Headers */,
    1040810410                                1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */,
     
    1149711499                                BC46C2070C0DDCA10020CFC3 /* JSCSSStyleRule.h in Headers */,
    1149811500                                BCC5BE010C0E93110011C2DB /* JSCSSStyleSheet.h in Headers */,
     11501                                BCB773620C17853D00132BA4 /* JSNodeFilterCondition.h in Headers */,
    1149911502                        );
    1150011503                        runOnlyForDeploymentPostprocessing = 0;
     
    1153411537                        isa = PBXProject;
    1153511538                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
    11536                         compatibilityVersion = "Xcode 2.4";
    1153711539                        hasScannedForEncodings = 1;
    1153811540                        knownRegions = (
     
    1154911551                        projectDirPath = "";
    1155011552                        projectRoot = "";
    11551                         shouldCheckCompatibility = 1;
    1155211553                        targets = (
    1155311554                                93F198A508245E59001E9ABC /* WebCore */,
     
    1202712028                                93B70D6D09EB0C7C009D8468 /* kjs_navigator.cpp in Sources */,
    1202812029                                93B70D6F09EB0C7C009D8468 /* kjs_proxy.cpp in Sources */,
    12029                                 93B70D7109EB0C7C009D8468 /* kjs_traversal.cpp in Sources */,
    1203012030                                93B70D7509EB0C7C009D8468 /* kjs_window.cpp in Sources */,
    1203112031                                1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */,
     
    1291012910                                BC20FB7F0C0E8E6C00D1447F /* JSCSSValueCustom.cpp in Sources */,
    1291112911                                BCC5BE000C0E93110011C2DB /* JSCSSStyleSheet.cpp in Sources */,
     12912                                BCB773610C17853D00132BA4 /* JSNodeFilterCondition.cpp in Sources */,
     12913                                BCB773630C17853D00132BA4 /* JSNodeFilterCustom.cpp in Sources */,
    1291212914                        );
    1291312915                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/js/JSNodeFilterCondition.cpp

    r22029 r22035  
    11/*
    2  *  This file is part of the KDE libraries
    32 *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
     3 *  Copyright (C) 2007 Apple Inc. All rights reserved.
    44 *
    55 *  This library is free software; you can redistribute it and/or
     
    1919
    2020#include "config.h"
    21 #include "kjs_traversal.h"
     21#include "JSNodeFilterCondition.h"
    2222
    2323#include "Document.h"
    2424#include "Frame.h"
    2525#include "JSNodeFilter.h"
     26#include "NodeFilter.h"
    2627#include "kjs_proxy.h"
    2728
    28 #include "kjs_traversal.lut.h"
     29namespace WebCore {
    2930
    30 using namespace WebCore;
    31 
    32 namespace KJS {
    33 
    34 // -------------------------------------------------------------------------
    35 
    36 const ClassInfo DOMNodeFilter::info = { "NodeFilter", 0, 0, 0 };
    37 /*
    38 @begin DOMNodeFilterPrototypeTable 1
    39   acceptNode    DOMNodeFilter::AcceptNode       DontDelete|Function 0
    40 @end
    41 */
    42 KJS_DEFINE_PROTOTYPE(DOMNodeFilterPrototype)
    43 KJS_IMPLEMENT_PROTOTYPE_FUNCTION(DOMNodeFilterPrototypeFunction)
    44 KJS_IMPLEMENT_PROTOTYPE("DOMNodeFilter",DOMNodeFilterPrototype,DOMNodeFilterPrototypeFunction)
    45 
    46 DOMNodeFilter::DOMNodeFilter(ExecState *exec, NodeFilter *nf)
    47   : m_impl(nf)
    48 {
    49   setPrototype(DOMNodeFilterPrototype::self(exec));
    50 }
    51 
    52 DOMNodeFilter::~DOMNodeFilter()
    53 {
    54   ScriptInterpreter::forgetDOMObject(m_impl.get());
    55 }
    56 
    57 void DOMNodeFilter::mark()
    58 {
    59     m_impl->mark();
    60     DOMObject::mark();
    61 }
    62 
    63 JSValue *DOMNodeFilterPrototypeFunction::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
    64 {
    65   if (!thisObj->inherits(&KJS::DOMNodeFilter::info))
    66     return throwError(exec, TypeError);
    67   NodeFilter &nodeFilter = *static_cast<DOMNodeFilter *>(thisObj)->impl();
    68   switch (id) {
    69     case DOMNodeFilter::AcceptNode:
    70       return jsNumber(nodeFilter.acceptNode(toNode(args[0])));
    71   }
    72   return jsUndefined();
    73 }
    74 
    75 JSValue *toJS(ExecState* exec, NodeFilter* nf)
    76 {
    77     return cacheDOMObject<NodeFilter, JSNodeFilter>(exec, nf);
    78 }
    79 
    80 PassRefPtr<NodeFilter> toNodeFilter(JSValue* val)
    81 {
    82     if (!val)
    83         return 0;
    84     if (!val->isObject())
    85         return 0;
    86 
    87     if (val->isObject(&DOMNodeFilter::info))
    88         return static_cast<DOMNodeFilter *>(val)->impl();
    89 
    90     JSObject* o = static_cast<JSObject*>(val);
    91     if (o->implementsCall())
    92         return new NodeFilter(new JSNodeFilterCondition(o));
    93 
    94     return 0;
    95 }
    96 
    97 // -------------------------------------------------------------------------
    98 
    99 JSNodeFilterCondition::JSNodeFilterCondition(JSObject * _filter)
    100     : filter( _filter )
     31JSNodeFilterCondition::JSNodeFilterCondition(KJS::JSObject* filter)
     32    : m_filter(filter)
    10133{
    10234}
     
    10436void JSNodeFilterCondition::mark()
    10537{
    106     filter->mark();
     38    m_filter->mark();
    10739}
    10840
    109 short JSNodeFilterCondition::acceptNode(WebCore::Node* filterNode) const
     41short JSNodeFilterCondition::acceptNode(Node* filterNode) const
    11042{
    111     WebCore::Node *node = filterNode;
    112     Frame *frame = node->document()->frame();
    113     KJSProxy *proxy = frame->scriptProxy();
    114     if (proxy && filter->implementsCall()) {
    115         JSLock lock;
    116         ExecState *exec = proxy->interpreter()->globalExec();
    117         List args;
    118         args.append(toJS(exec, node));
    119         JSObject *obj = filter;
    120         JSValue *result = obj->call(exec, obj, args);
     43    Node* node = filterNode;
     44    Frame* frame = node->document()->frame();
     45    KJSProxy* proxy = frame->scriptProxy();
     46    if (proxy && m_filter->implementsCall()) {
     47        KJS::JSLock lock;
     48        KJS::ExecState* exec = proxy->interpreter()->globalExec();
     49        KJS::List args;
     50        args.append(KJS::toJS(exec, node));
     51        KJS::JSObject* obj = m_filter;
     52        KJS::JSValue* result = obj->call(exec, obj, args);
    12153        return result->toInt32(exec);
    12254    }
     
    12557}
    12658
    127 } // namespace
     59} // namespace WebCore
  • trunk/WebCore/bindings/js/JSNodeFilterCondition.h

    r22029 r22035  
    1 // -*- c-basic-offset: 2 -*-
    21/*
    3  *  This file is part of the KDE libraries
    42 *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
     3 *  Copyright (C) 2007 Apple Inc. All rights reserved.
    54 *
    65 *  This library is free software; you can redistribute it and/or
     
    1918 */
    2019
    21 #ifndef kjs_traversal_h
    22 #define kjs_traversal_h
     20#ifndef JSNodeFilterCondition_h
     21#define JSNodeFilterCondition_h
    2322
    24 #include "NodeFilter.h"
    2523#include "NodeFilterCondition.h"
    2624#include "kjs_dom.h"
    2725
    2826namespace WebCore {
    29     class NodeFilter;
    30 }
    3127
    32 namespace KJS {
     28    class Node;
    3329
    34   class DOMNodeFilter : public DOMObject {
    35   public:
    36     DOMNodeFilter(ExecState*, WebCore::NodeFilter*);
    37     ~DOMNodeFilter();
    38     virtual void mark();
    39     // no put - all read-only
    40     virtual const ClassInfo* classInfo() const { return &info; }
    41     static const ClassInfo info;
    42     WebCore::NodeFilter* impl() const { return m_impl.get(); }
    43     enum { AcceptNode };
    44   private:
    45     RefPtr<WebCore::NodeFilter> m_impl;
    46   };
     30    class JSNodeFilterCondition : public NodeFilterCondition {
     31    public:
     32        JSNodeFilterCondition(KJS::JSObject* filter);
     33        virtual short acceptNode(Node*) const;
     34        virtual void mark();
    4735
    48   JSValue* toJS(ExecState*, WebCore::NodeFilter*);
     36    protected:
     37        KJS::JSObject* m_filter;
     38    };
    4939
    50   PassRefPtr<WebCore::NodeFilter> toNodeFilter(JSValue*); // returns 0 if value is not a DOMNodeFilter or JS function
     40} // namespace WebCore
    5141
    52   class JSNodeFilterCondition : public WebCore::NodeFilterCondition {
    53   public:
    54     JSNodeFilterCondition(JSObject* filter);
    55     virtual short acceptNode(WebCore::Node*) const;
    56     virtual void mark();
    57   protected:
    58     JSObject *filter;
    59   };
    60 
    61 } // namespace
    62 
    63 #endif
     42#endif // JSNodeFilterCondition_h
  • trunk/WebCore/bindings/js/kjs_dom.cpp

    r21927 r22035  
    6161#include "kjs_css.h"
    6262#include "kjs_events.h"
    63 #include "kjs_traversal.h"
    6463#include "kjs_window.h"
    6564#include "xmlhttprequest.h"
  • trunk/WebCore/bindings/js/kjs_window.cpp

    r21927 r22035  
    6262#include "kjs_navigator.h"
    6363#include "kjs_proxy.h"
    64 #include "kjs_traversal.h"
    6564#include <wtf/MathExtras.h>
    6665
  • trunk/WebCore/bindings/objc/DOM.mm

    r22020 r22035  
    701701- (DOMNodeIterator *)createNodeIterator:(DOMNode *)root whatToShow:(unsigned)whatToShow filter:(id <DOMNodeFilter>)filter expandEntityReferences:(BOOL)expandEntityReferences
    702702{
    703     RefPtr<WebCore::NodeFilter> cppFilter;
     703    WebCore::NodeFilter* cppFilter;
    704704    if (filter)
    705705        cppFilter = new WebCore::NodeFilter(new ObjCNodeFilterCondition(filter));
     
    712712- (DOMTreeWalker *)createTreeWalker:(DOMNode *)root whatToShow:(unsigned)whatToShow filter:(id <DOMNodeFilter>)filter expandEntityReferences:(BOOL)expandEntityReferences
    713713{
    714     RefPtr<WebCore::NodeFilter> cppFilter;
     714    WebCore::NodeFilter* cppFilter;
    715715    if (filter)
    716716        cppFilter = new WebCore::NodeFilter(new ObjCNodeFilterCondition(filter));
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r21979 r22035  
    145145    return "#include \"kjs_css.h\"\n\n" if $module eq "css";
    146146    return "#include \"kjs_html.h\"\n\n" if $module eq "html";
    147     return "#include \"kjs_traversal.h\"\n\n" if $module eq "traversal";
    148147
    149148    die "Don't know what headers to include for module $module";
     
    11681167    }
    11691168
    1170     if (!$hasParent || $dataNode->extendedAttributes->{"GenerateNativeConverter"}) {
     1169    if ((!$hasParent or $dataNode->extendedAttributes->{"GenerateNativeConverter"}) and !$dataNode->extendedAttributes->{"CustomNativeConverter"}) {
    11711170        if ($podType) {
    11721171            push(@implContent, "$podType to${interfaceName}(KJS::JSValue* val)\n");
     
    12461245    return "int" if $type eq "long";
    12471246    return "String" if $type eq "DOMString";
    1248     return "PassRefPtr<${type}>" if $type eq "NodeFilter";
    12491247    return "Range::CompareHow" if $type eq "CompareHow";
    12501248    return "EventTargetNode*" if $type eq "EventTarget";
     
    13541352        $implIncludes{"kjs_dom.h"} = 1;
    13551353        return "toElement($value)";
    1356     }
    1357 
    1358     if ($type eq "NodeFilter") {
    1359         $implIncludes{"kjs_traversal.h"} = 1;
    1360         return "toNodeFilter($value)";
    13611354    }
    13621355
  • trunk/WebCore/dom/Document.cpp

    r21749 r22035  
    918918
    919919PassRefPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned whatToShow,
    920     PassRefPtr<NodeFilter> filter, bool expandEntityReferences, ExceptionCode& ec)
     920    NodeFilter* filter, bool expandEntityReferences, ExceptionCode& ec)
    921921{
    922922    if (!root) {
     
    928928
    929929PassRefPtr<TreeWalker> Document::createTreeWalker(Node *root, unsigned whatToShow,
    930     PassRefPtr<NodeFilter> filter, bool expandEntityReferences, ExceptionCode& ec)
     930    NodeFilter* filter, bool expandEntityReferences, ExceptionCode& ec)
    931931{
    932932    if (!root) {
  • trunk/WebCore/dom/Document.h

    r21749 r22035  
    309309
    310310    PassRefPtr<NodeIterator> createNodeIterator(Node* root, unsigned whatToShow,
    311         PassRefPtr<NodeFilter>, bool expandEntityReferences, ExceptionCode&);
     311        NodeFilter*, bool expandEntityReferences, ExceptionCode&);
    312312
    313313    PassRefPtr<TreeWalker> createTreeWalker(Node* root, unsigned whatToShow,
    314         PassRefPtr<NodeFilter>, bool expandEntityReferences, ExceptionCode&);
     314        NodeFilter*, bool expandEntityReferences, ExceptionCode&);
    315315
    316316    // Special support for editing
  • trunk/WebCore/dom/NodeFilter.idl

    r16299 r22035  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.
     2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
    44 *
     
    2222
    2323    // Introduced in DOM Level 2:
    24     interface [LegacyParent=KJS::DOMNodeFilter, GenerateConstructor, ObjCProtocol] NodeFilter {
     24    interface [GenerateConstructor, CustomMarkFunction, CustomNativeConverter, ObjCProtocol] NodeFilter {
    2525
    2626        // Constants returned by acceptNode
     
    4444        const unsigned long       SHOW_NOTATION                  = 0x00000800;
    4545
    46 #if !defined(LANGUAGE_JAVASCRIPT)
    4746        short acceptNode(in Node n);
    48 #endif
    4947
    5048    };
Note: See TracChangeset for help on using the changeset viewer.