From kde-commits Mon Mar 10 17:09:30 2008 From: Maks Orlovich Date: Mon, 10 Mar 2008 17:09:30 +0000 To: kde-commits Subject: branches/KDE/4.0/kdelibs/khtml/ecma Message-Id: <1205168970.904750.18807.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120516986517740 SVN commit 784105 by orlovich: Use the new KJS hook to better hide hidden collections BUG: 130376 M +4 -0 kjs_html.cpp M +1 -0 kjs_html.h --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_html.cpp #784104:784105 @@ -2945,6 +2945,10 @@ ScriptInterpreter::forgetDOMObject(m_impl.get()); } +bool KJS::HTMLCollection::masqueradeAsUndefined() const { + return hidden; +} + bool KJS::HTMLCollection::toBoolean(ExecState *) const { return !hidden; } --- branches/KDE/4.0/kdelibs/khtml/ecma/kjs_html.h #784104:784105 @@ -216,6 +216,7 @@ virtual JSValue* callAsFunction(ExecState *exec, JSObject* thisObj, const List& args); virtual bool implementsCall() const { return true; } + virtual bool masqueradeAsUndefined() const; virtual bool toBoolean(ExecState *) const; virtual void getPropertyNames(ExecState*, PropertyNameArray&); enum { Item, NamedItem, Tags };