This function does not perform as expected, if the stayWithin renderer has a nextSibling. The function when called repeatedly shall traverse till the end of the tree. This may not have many visible consequences (except for CSS counters which are broken anyway until 32884 is fixed), but it should have a definite impact on performance.
After 32884 is fixed this w3 test still does not pass as a result of this bug: http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/counters-scope-implied-001.htm
We should fix this bug right away! Seems pretty straightforward. Presumably the code should match Node::traverseNextSibling which is doing the same sort of thing.
I shall submit a patch within the next hour. With no LayoutTest attached if this is OK.
(In reply to comment #3) > I shall submit a patch within the next hour. With no LayoutTest attached if > this is OK. We can accept the patch with no regression test on the basis that the counters test case will cover it in the near future. Normally we go out of our way to avoid this sort of thing, and find a creative way to demonstrate the bug, but I assume you have not found way to test this before adding the new counters code.
I made a fix, but apparently it crashes all editing/deleting LayoutTests. I'll have to look into this so the fix will take longer than expected.
Created attachment 46482 [details] Proposed patch To the best of my knowledge the code I changed here conforms to the WebKit style specification, but the file itself has many style problems which I did not undertake to fix.
(In reply to comment #5) > I made a fix, but apparently it crashes all editing/deleting LayoutTests. I'll > have to look into this so the fix will take longer than expected. The problems I noticed with the editing/deleting LayoutTests were due to a typo in my code which I fixed and verified before I have submitted the patch. Sorry for taking so long for such a trivial issue.
Comment on attachment 46482 [details] Proposed patch Clearing flags on attachment: 46482 Committed r53196: <http://trac.webkit.org/changeset/53196>
All reviewed patches have been landed. Closing bug.