This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15532 - Collapsing or extending to a ProcessingInstruction should be OK
Summary: Collapsing or extending to a ProcessingInstruction should be OK
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
Depends on:
Reported: 2012-01-12 12:47 UTC by Stig Halvorsen
Modified: 2012-01-12 15:24 UTC (History)
2 users (show)

See Also:

Test patch, PI (1.98 KB, patch)
2012-01-12 12:47 UTC, Stig Halvorsen

Description Stig Halvorsen 2012-01-12 12:47:00 UTC
Created attachment 1065 [details]
Test patch, PI

In the selecttest/collapse.html and selecttest/extend.html tests there are a few tests that expect the browser to throw an INVALID_NODE_TYPE_ERR when trying to collapse or extend to a PI.
According to the Selection [1] and Range [2] specs, it is not illegal to do that, so I think the tests are wrong.

Patch attached.


Comment 1 Aryeh Gregor 2012-01-12 15:24:17 UTC
Thanks!  Accepted:

These checks date back from before DOM4 declared ProcessingInstructions to be CharacterData.  They weren't allowed as Range endpoints because they were an annoying special case.  Now they're allowed just like Text and Comment, with no extra spec effort, but the tests weren't updated.