Bug 55886
Summary: | RenderBox::localCaretRect should support before/after positions | ||
---|---|---|---|
Product: | WebKit | Reporter: | Levi Weintraub <leviw> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 49744 |
Levi Weintraub
The current signature of localCaretRect doesn't cover all the types of Positions that can be tied to a container. Namely, receiving only an offset doesn't allow differentiation between the position before a container and the first one inside. Likewise for the last position inside/after. See comment here: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L3016
I propose adding a boolean value such as "caretIsInsideContainer" which is used to determine whether to include border/padding.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
(In reply to comment #0)
> The current signature of localCaretRect doesn't cover all the types of Positions that can be tied to a container. Namely, receiving only an offset doesn't allow differentiation between the position before a container and the first one inside. Likewise for the last position inside/after. See comment here: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L3016
Can't we always use the parent anchored equivalent?
Levi Weintraub
(In reply to comment #1)
> Can't we always use the parent anchored equivalent?
Currently, we actually go out of our way to avoid using the parent anchored equivalent. Notice comment here: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L3015
While possible, doing this would involve pushing much more caret logic down into the renderers, which I believe we want to avoid.