Closed Bug 674820 Opened 13 years ago Closed 13 years ago

input/textarea.selectionStart/selectionEnd/selectionDirection should not require the presence of a frame

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

()

Details

(Keywords: html5)

Attachments

(1 file)

"All elements to which this API applies have either a selection or a text entry cursor position at all times (even for elements that are not being rendered). User agents should follow platform conventions to determine their initial state."

We currently rely on frames to get these values.  We should start caching them on the content node instead.
Bug 674484?
Seems indeed to be a dup of bug 674484.
OS: Mac OS X → All
Hardware: x86 → All
No, not at all.  The selection is still retrieved from layout, and in order not to depend on the layout, we need to cache the offsets when we don't have a frame (I have a patch for that).

Bug 674484 is about moving the code around.  That would make things cleaner, but shouldn't have any behavioral effects.
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #549475 - Flags: review?(bzbarsky)
Comment on attachment 549475 [details] [diff] [review]
Patch (v1)

r=me, but maybe we should look into a common superclass for input and textarea?  They're duplicating more and more logic....
Attachment #549475 - Flags: review?(bzbarsky) → review+
(In reply to comment #5)
> Comment on attachment 549475 [details] [diff] [review] [diff] [details] [review]
> Patch (v1)
> 
> r=me, but maybe we should look into a common superclass for input and
> textarea?  They're duplicating more and more logic....

The thing which kind of disgusts me about nsHTMLInputElement is that it has to deal with both text and non-text input types, but yes, I think we should do that.  Filed bug 676519.
http://hg.mozilla.org/mozilla-central/rev/2112b458c8c7
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: