[webkit-changes] cvs commit: WebCore/khtml/html html_miscimpl.cpp
Eric
eseidel at opensource.apple.com
Thu Dec 29 20:11:50 PST 2005
eseidel 05/12/29 20:11:50
Modified: . ChangeLog
khtml/ecma kjs_html.cpp
khtml/html html_miscimpl.cpp
Log:
Bug #: 6230
Submitted by: eseidel
Reviewed by: build fix only.
File accidentally omitted from previous commit.
Remove QDict from khtml/html
http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
* khtml/ecma/kjs_html.cpp:
(KJS::KJS::HTMLCollection::getNamedItems):
Revision Changes Path
1.59 +10 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- ChangeLog 30 Dec 2005 03:33:54 -0000 1.58
+++ ChangeLog 30 Dec 2005 04:11:47 -0000 1.59
@@ -1,5 +1,15 @@
2005-12-29 Eric Seidel <eseidel at apple.com>
+ File accidentally omitted from previous commit.
+
+ Remove QDict from khtml/html
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::KJS::HTMLCollection::getNamedItems):
+
+2005-12-29 Eric Seidel <eseidel at apple.com>
+
Reviewed by mjs.
Remove QDict from khtml/html
1.162 +8 -83 WebCore/khtml/ecma/kjs_html.cpp
Index: kjs_html.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_html.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -r1.161 -r1.162
--- kjs_html.cpp 29 Dec 2005 08:20:37 -0000 1.161
+++ kjs_html.cpp 30 Dec 2005 04:11:48 -0000 1.162
@@ -24,6 +24,7 @@
#include "misc/loader.h"
#include "dom/dom_exception.h"
+#include "xml/dom_atomicstring.h"
#include "xml/dom2_eventsimpl.h"
#include "xml/dom_textimpl.h"
@@ -64,76 +65,9 @@
#include <ApplicationServices/ApplicationServices.h>
+using namespace DOM;
using namespace DOM::HTMLNames;
using namespace DOM::EventNames;
-
-using DOM::DOMString;
-using DOM::DocumentImpl;
-using DOM::ElementImpl;
-using DOM::EventImpl;
-using DOM::HTMLAnchorElementImpl;
-using DOM::HTMLAppletElementImpl;
-using DOM::HTMLAreaElementImpl;
-using DOM::HTMLBRElementImpl;
-using DOM::HTMLBaseElementImpl;
-using DOM::HTMLBaseFontElementImpl;
-using DOM::HTMLBlockquoteElementImpl;
-using DOM::HTMLBodyElementImpl;
-using DOM::HTMLButtonElementImpl;
-using DOM::HTMLCanvasElementImpl;
-using DOM::HTMLCollectionImpl;
-using DOM::HTMLDListElementImpl;
-using DOM::HTMLDirectoryElementImpl;
-using DOM::HTMLDivElementImpl;
-using DOM::HTMLDocumentImpl;
-using DOM::HTMLElementImpl;
-using DOM::HTMLFieldSetElementImpl;
-using DOM::HTMLFontElementImpl;
-using DOM::HTMLFormElementImpl;
-using DOM::HTMLFrameElementImpl;
-using DOM::HTMLFrameSetElementImpl;
-using DOM::HTMLGenericFormElementImpl;
-using DOM::HTMLHRElementImpl;
-using DOM::HTMLHeadElementImpl;
-using DOM::HTMLHeadingElementImpl;
-using DOM::HTMLHtmlElementImpl;
-using DOM::HTMLIFrameElementImpl;
-using DOM::HTMLIFrameElementImpl;
-using DOM::HTMLImageElementImpl;
-using DOM::HTMLInputElementImpl;
-using DOM::HTMLIsIndexElementImpl;
-using DOM::HTMLLIElementImpl;
-using DOM::HTMLLabelElementImpl;
-using DOM::HTMLLegendElementImpl;
-using DOM::HTMLLinkElementImpl;
-using DOM::HTMLMapElementImpl;
-using DOM::HTMLMenuElementImpl;
-using DOM::HTMLMetaElementImpl;
-using DOM::HTMLModElementImpl;
-using DOM::HTMLOListElementImpl;
-using DOM::HTMLObjectElementImpl;
-using DOM::HTMLOptGroupElementImpl;
-using DOM::HTMLOptionElementImpl;
-using DOM::HTMLParagraphElementImpl;
-using DOM::HTMLParamElementImpl;
-using DOM::HTMLPreElementImpl;
-using DOM::HTMLQuoteElementImpl;
-using DOM::HTMLScriptElementImpl;
-using DOM::HTMLSelectElementImpl;
-using DOM::HTMLStyleElementImpl;
-using DOM::HTMLTableCaptionElementImpl;
-using DOM::HTMLTableCellElementImpl;
-using DOM::HTMLTableColElementImpl;
-using DOM::HTMLTableElementImpl;
-using DOM::HTMLTableRowElementImpl;
-using DOM::HTMLTableSectionElementImpl;
-using DOM::HTMLTextAreaElementImpl;
-using DOM::HTMLTitleElementImpl;
-using DOM::HTMLUListElementImpl;
-using DOM::NodeImpl;
-using DOM::NodeListImpl;
-using DOM::TextImpl;
-
using khtml::RenderCanvasImage;
#include "kjs_html.lut.h"
@@ -3386,24 +3320,15 @@
JSValue *KJS::HTMLCollection::getNamedItems(ExecState *exec, const Identifier &propertyName) const
{
-#ifdef KJS_VERBOSE
- kdDebug(6070) << "KJS::HTMLCollection::getNamedItems " << propertyName.ascii() << endl;
-#endif
- DOM::DOMString pstr = propertyName.domString();
+ QValueList< RefPtr<NodeImpl> > namedItems = m_impl->namedItems(AtomicString(propertyName.domString()));
- QValueList< RefPtr<NodeImpl> > namedItems = m_impl->namedItems(pstr);
+ if (namedItems.isEmpty())
+ return jsUndefined();
- if (namedItems.isEmpty()) {
-#ifdef KJS_VERBOSE
- kdDebug(6070) << "not found" << endl;
-#endif
- return jsUndefined();
- }
+ if (namedItems.count() == 1)
+ return getDOMNode(exec, namedItems[0].get());
- if (namedItems.count() == 1)
- return getDOMNode(exec, namedItems[0].get());
-
- return new DOMNamedNodesCollection(exec, namedItems);
+ return new DOMNamedNodesCollection(exec, namedItems);
}
JSValue *KJS::HTMLCollectionProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
1.42 +1 -0 WebCore/khtml/html/html_miscimpl.cpp
Index: html_miscimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_miscimpl.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- html_miscimpl.cpp 30 Dec 2005 03:33:54 -0000 1.41
+++ html_miscimpl.cpp 30 Dec 2005 04:11:49 -0000 1.42
@@ -32,6 +32,7 @@
#include "dom/dom_node.h"
#include <kdebug.h>
+#include <kxmlcore/HashSet.h>
namespace DOM {
More information about the webkit-changes
mailing list