Bug 56437
Summary: | startOfDocument(Node*) and endOfDocument(Node*) return a null VisiblePosition if the document is non-editable and contains only an editable pocket | ||
---|---|---|---|
Product: | WebKit | Reporter: | Justin Garcia <justin.garcia> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | adele, enrica |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 |
Justin Garcia
startOfDocument(Node*) and endOfDocument(Node*) return a null VisiblePosition if the document is non-editable and contains only an editable pocket. I don't think I can construct a test case for this.
VisiblePosition endOfDocument(const Node* node)
{
if (!node || !node->document() || !node->document()->documentElement())
return VisiblePosition();
Element* doc = node->document()->documentElement();
return VisiblePosition(lastPositionInNode(doc), DOWNSTREAM);
}
<rdar://problem/9139718>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Enrica Casucci
This has been fixed as part of revision 173287.