Title: [175968] trunk/Source/WebCore
- Revision
- 175968
- Author
- [email protected]
- Date
- 2014-11-11 12:41:50 -0800 (Tue, 11 Nov 2014)
Log Message
Regression(r175947): Caused assertions in debug builds
https://bugs.webkit.org/show_bug.cgi?id=138620
Reviewed by Benjamin Poulain.
In HTMLCollection::traverseForward(), traversedCount was incremented 1
time too many when hitting the end of the collection (i.e. element
becomes null). Doing a partial revert.
No new tests, already covered by existing tests.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::traverseForward):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (175967 => 175968)
--- trunk/Source/WebCore/ChangeLog 2014-11-11 20:36:11 UTC (rev 175967)
+++ trunk/Source/WebCore/ChangeLog 2014-11-11 20:41:50 UTC (rev 175968)
@@ -1,3 +1,19 @@
+2014-11-11 Chris Dumez <[email protected]>
+
+ Regression(r175947): Caused assertions in debug builds
+ https://bugs.webkit.org/show_bug.cgi?id=138620
+
+ Reviewed by Benjamin Poulain.
+
+ In HTMLCollection::traverseForward(), traversedCount was incremented 1
+ time too many when hitting the end of the collection (i.e. element
+ becomes null). Doing a partial revert.
+
+ No new tests, already covered by existing tests.
+
+ * html/HTMLCollection.cpp:
+ (WebCore::HTMLCollection::traverseForward):
+
2014-11-11 Tim Horton <[email protected]>
DataDetectors' menu items aren't presented in the telephone number menu
Modified: trunk/Source/WebCore/html/HTMLCollection.cpp (175967 => 175968)
--- trunk/Source/WebCore/html/HTMLCollection.cpp 2014-11-11 20:36:11 UTC (rev 175967)
+++ trunk/Source/WebCore/html/HTMLCollection.cpp 2014-11-11 20:41:50 UTC (rev 175968)
@@ -329,14 +329,23 @@
{
Element* element = ¤t;
if (usesCustomForwardOnlyTraversal()) {
- for (traversedCount = 0; element && traversedCount < count; ++traversedCount)
+ for (traversedCount = 0; traversedCount < count; ++traversedCount) {
element = customElementAfter(element);
+ if (!element)
+ return nullptr;
+ }
} else if (m_shouldOnlyIncludeDirectChildren) {
- for (traversedCount = 0; element && traversedCount < count; ++traversedCount)
+ for (traversedCount = 0; traversedCount < count; ++traversedCount) {
element = nextMatchingSiblingElement(*this, *element);
+ if (!element)
+ return nullptr;
+ }
} else {
- for (traversedCount = 0; element && traversedCount < count; ++traversedCount)
+ for (traversedCount = 0; traversedCount < count; ++traversedCount) {
element = nextMatchingElement(*this, *element, root);
+ if (!element)
+ return nullptr;
+ }
}
return element;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes