[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:08:19 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d0fa8bedaf5d18d26875d1f3196c98d6e8ca43d7
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 26 01:08:45 2002 +0000
Rewrite the img/form document property lookup strategy. This
should be faster and actually work (gasp!). Fixes the dhtml
on hrweb to at least show up.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::nextItem):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index c0293c7..2460fe3 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,16 @@
2002-11-25 David Hyatt <hyatt at apple.com>
+ Rewrite the img/form document property lookup strategy. This
+ should be faster and actually work (gasp!). Fixes the dhtml
+ on hrweb to at least show up.
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLDocument::tryGet):
+ * khtml/html/html_miscimpl.cpp:
+ (HTMLCollectionImpl::nextItem):
+
+2002-11-25 David Hyatt <hyatt at apple.com>
+
Add support to QFont for multiple families. NOw all that's left
is getting the multiple families out of the font and down into
WebKit.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index c0293c7..2460fe3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,16 @@
2002-11-25 David Hyatt <hyatt at apple.com>
+ Rewrite the img/form document property lookup strategy. This
+ should be faster and actually work (gasp!). Fixes the dhtml
+ on hrweb to at least show up.
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLDocument::tryGet):
+ * khtml/html/html_miscimpl.cpp:
+ (HTMLCollectionImpl::nextItem):
+
+2002-11-25 David Hyatt <hyatt at apple.com>
+
Add support to QFont for multiple families. NOw all that's left
is getting the multiple families out of the font and down into
WebKit.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c0293c7..2460fe3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,16 @@
2002-11-25 David Hyatt <hyatt at apple.com>
+ Rewrite the img/form document property lookup strategy. This
+ should be faster and actually work (gasp!). Fixes the dhtml
+ on hrweb to at least show up.
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLDocument::tryGet):
+ * khtml/html/html_miscimpl.cpp:
+ (HTMLCollectionImpl::nextItem):
+
+2002-11-25 David Hyatt <hyatt at apple.com>
+
Add support to QFont for multiple families. NOw all that's left
is getting the multiple families out of the font and down into
WebKit.
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 1c4f642..de7b47e 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -155,16 +155,6 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();
- // image and form elements with the name p will be looked up first
- DOM::HTMLCollection coll = doc.all();
- DOM::HTMLElement element = coll.namedItem(propertyName.string());
- if (!element.isNull() &&
- (element.elementId() == ID_IMG || element.elementId() == ID_FORM))
- {
- KJS::HTMLCollection htmlcoll(exec,coll);
- return htmlcoll.getNamedItems(exec, propertyName); // Get all the items with the same name
- }
-
const HashEntry* entry = Lookup::findEntry(&HTMLDocumentTable, propertyName);
if (entry) {
switch (entry->value) {
@@ -256,10 +246,43 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
return DOMDocument::tryGet(exec, propertyName);
//kdDebug(6070) << "KJS::HTMLDocument::tryGet " << propertyName.qstring() << " not found, returning element" << endl;
+ // image and form elements with the name p will be looked up last
+ DOM::HTMLCollection coll = doc.images();
+ DOM::HTMLCollection coll2 = doc.forms();
+ DOM::HTMLElement element = coll.namedItem(propertyName.string());
+ DOM::HTMLElement element2;
+ if (element.isNull()) {
+ element = coll2.namedItem(propertyName.string());
+ element2 = coll2.nextNamedItem(propertyName.string());
+ }
+ else {
+ element2 = coll.nextNamedItem(propertyName.string());
+ if (element2.isNull())
+ element2 = coll2.namedItem(propertyName.string());
+ }
+
+ if (!element.isNull() && (element.elementId() == ID_IMG || element.elementId() == ID_FORM))
+ {
+ if (element2.isNull())
+ return getDOMNode(exec, element);
+ else {
+ DOM::HTMLCollection collAll = doc.all();
+ KJS::HTMLCollection htmlcoll(exec,collAll);
+ return htmlcoll.getNamedItems(exec, propertyName); // Get all the items with the same name
+ }
+ }
+
+ DOM::HTMLCollection collAll = doc.all();
+ element = collAll.namedItem(propertyName.string());
+ element2 = collAll.nextNamedItem(propertyName.string());
if(!element.isNull())
{
- KJS::HTMLCollection htmlcoll(exec,coll);
- return htmlcoll.getNamedItems(exec, propertyName); // Get all the items with the same name
+ if (element2.isNull())
+ return getDOMNode(exec, element);
+ else {
+ KJS::HTMLCollection htmlcoll(exec,coll);
+ return htmlcoll.getNamedItems(exec, propertyName); // Get all the items with the same name
+ }
}
return Undefined();
}
diff --git a/WebCore/khtml/html/html_miscimpl.cpp b/WebCore/khtml/html/html_miscimpl.cpp
index 5a7b776..d8bb9e4 100644
--- a/WebCore/khtml/html/html_miscimpl.cpp
+++ b/WebCore/khtml/html/html_miscimpl.cpp
@@ -255,7 +255,7 @@ NodeImpl *HTMLCollectionImpl::nextItem() const
return retval;
}
// retval was 0, means we have to go up
- while( !retval && currentItem->parentNode()
+ while( !retval && currentItem && currentItem->parentNode()
&& currentItem->parentNode() != base )
{
currentItem = currentItem->parentNode();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list