[Bug 15533] New: Index check in selection.extend() should be done before node type test.


           Summary: Index check in selection.extend() should be done
                    before node type test.
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Editing APIs
        AssignedTo: ayg@aryeh.name
        ReportedBy: stighal@opera.com
         QAContact: sideshowbarker+html-editing-api@gmail.com
                CC: mike@w3.org, public-webapps@w3.org

Created attachment 1066
  --> https://www.w3.org/Bugs/Public/attachment.cgi?id=1066
Test patch, index

According to the Selection spec for extend [1], the checking of offset compared
to parentNode's length should be done before setting the new boundary points
for the range [2] which would trigger the node type exception for doctype.

In the selecttest/extend.html tests there are a few tests that expect the
browser to throw an INVALID_NODE_TYPE_ERR, where in fact the INDEX_SIZE_ERR
exception should be checked and thrown first.

Patch attached.



Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Thursday, 12 January 2012 12:51:37 UTC