[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
tkent at chromium.org
tkent at chromium.org
Sun Feb 20 23:56:48 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 04df567e60af9611f46f0e1ba29054c252c68618
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 27 01:45:56 2011 +0000
2011-01-26 Kent Tamura <tkent at chromium.org>
Reviewed by Dimitri Glazkov.
[Chromium] WebFrame::forms() should not return empty WebFormElements
https://bugs.webkit.org/show_bug.cgi?id=53204
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::forms):
- Should iterate by forms->length(), not the number of HTMLElements.
- Do not increment the index for "temp" if a node is not an HTMLElement.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 8e3502e..31f1c5b 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-26 Kent Tamura <tkent at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] WebFrame::forms() should not return empty WebFormElements
+ https://bugs.webkit.org/show_bug.cgi?id=53204
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::forms):
+ - Should iterate by forms->length(), not the number of HTMLElements.
+ - Do not increment the index for "temp" if a node is not an HTMLElement.
+
2011-01-26 Dan Bernstein <mitz at apple.com>
Reviewed by Dave Hyatt.
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 8651fa8..96fc455 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -685,12 +685,14 @@ void WebFrameImpl::forms(WebVector<WebFormElement>& results) const
}
WebVector<WebFormElement> temp(formCount);
- for (size_t i = 0; i < formCount; ++i) {
- Node* node = forms->item(i);
+ unsigned i = 0;
+ for (size_t sourceIndex = 0; i < forms->length(); ++sourceIndex) {
+ Node* node = forms->item(sourceIndex);
// Strange but true, sometimes item can be 0.
if (node && node->isHTMLElement())
- temp[i] = static_cast<HTMLFormElement*>(node);
+ temp[i++] = static_cast<HTMLFormElement*>(node);
}
+ ASSERT(i == formCount);
results.swap(temp);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list