[Webkit-unassigned] [Bug 42010] TreeWalker::previousNode does not handle FILTER_REJECT when processing lastChild
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 12 15:57:08 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=42010
--- Comment #3 from Craig Topper <craig.topper at gmail.com> 2010-07-12 15:57:09 PST ---
I have a test case, but I'm at work right now and don't have access to it. But I can attempt to better explain the problem
In the following code, a FILTER_REJECT response should terminate the loop instead of going back around. If you go back around you're asking for the lastChild of a node that was just rejected.
222 while (Node* lastChild = node->lastChild()) {
223 node = lastChild;
224 acceptNodeResult = acceptNode(state, node.get());
225 if (state && state->hadException())
226 return 0;
227 if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
228 continue;
229 }
Also the "if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)" part of the loop is pointless as it just does a continue which is exactly what would happen if it weren't there at all.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list