[webkit-reviews] review requested: [Bug 52512] REGRESSION(r73818): range.cloneContents() ignores end offset : [Attachment 79068] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 15 11:27:42 PST 2011


David Kilzer (ddkilzer) <ddkilzer at webkit.org> has asked  for review:
Bug 52512: REGRESSION(r73818): range.cloneContents() ignores end offset
https://bugs.webkit.org/show_bug.cgi?id=52512

Attachment 79068: Patch
https://bugs.webkit.org/attachment.cgi?id=79068&action=review

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
Reviewed by NOBODY (OOPS!).

WebCore:

The fix for Bug 50710 in r73799 introduced an off-by-one error
when copying nodes to a local NodeVector for processing.  A fix
was attempted for Bug 50854 in r73818, but instead of stopping
at the end offset, it iterates through all the sibling nodes
because the loop variable (i) is never incremented.  To clean
this up, revert back to the code in r73799 and fix the
off-by-one error.

Test: fast/dom/Range/range-clone-contents.html

* dom/Range.cpp:
(WebCore::Range::processContents): Fix the loop that copies
nodes to a local NodeVector by restoring the code from r73799
and fixing the off-by-one error.

LayoutTests:

* fast/dom/Range/range-clone-contents-expected.txt: Added.
* fast/dom/Range/range-clone-contents.html: Added.
---
 5 files changed, 124 insertions(+), 6 deletions(-)


More information about the webkit-reviews mailing list