caretPositionFromPoint does not work correctly cross-document

NEW
Unassigned

Status

()

Core
Layout
5 years ago
5 years ago

People

(Reporter: jwir3, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
Bug 825499 added caretPositionFromPoint to nsDocument. It's possible that nsLayoutUtils::GetFrameForPoint (used in the implementation of this function) can return a frame from a child document, but GetOffsetTo (also used) does not work cross-document.

We need to determine if supporting cross-document caret positions is what we actually want to do, given that it might have the potential to retrieve information from a sub document in a non-secure way. If we decide to proceed with this, we need to change GetOffsetTo to call GetOffsetToCrossDoc instead.
You need to log in before you can comment on or make changes to this bug.