Closed Bug 693933 Opened 14 years ago Closed 13 years ago

nsFrameSelection::GetSelection() should return nsTypedSelection

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: surkov, Assigned: tbsaunde)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

spun off bug 688126 comment #5: > 2) Can nsTypedSelection be exposed rather than nsISelection (for example, > change existing nsFrameSelection::GetSelection or add new method)? > nsTypedSelection allows to deal with nsIRange directly.
Attached patch patchSplinter Review
smaug this is about the simplest patch I can write for this I just cut / pasted nsTypedSelection from nsSelection.cpp into a new header of its own and hit things with a hammer a little to make it build. If you'd like some or a lot of stuff to be cleaned up while working on this I might be able to try although I may not have time for a week or two.
Attachment #619487 - Flags: review?(bugs)
Comment on attachment 619487 [details] [diff] [review] patch Review of attachment 619487 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/generic/nsTypedSelection.h @@ +3,5 @@ > +/* This Source Code Form is subject to the terms of the Mozilla Public > + * License, v. 2.0. If a copy of the MPL was not distributed with this file, > + * You can obtain one at http://mozilla.org/MPL/2.0/. */ > + > +#ifndef NSTYPEDSELECTION_H_ nsTypedSelection_h
(In reply to Ms2ger from comment #2) > Comment on attachment 619487 [details] [diff] [review] > patch > > Review of attachment 619487 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: layout/generic/nsTypedSelection.h > @@ +3,5 @@ > > +/* This Source Code Form is subject to the terms of the Mozilla Public > > + * License, v. 2.0. If a copy of the MPL was not distributed with this file, > > + * You can obtain one at http://mozilla.org/MPL/2.0/. */ > > + > > +#ifndef NSTYPEDSELECTION_H_ > > nsTypedSelection_h assuming that's the pattern in layout land fixed locally.
Attachment #619487 - Flags: review?(bugs) → review+
Should nsTypedSelection.h include nsRange.h? When I try to include it elsewhere, I get a compile error until I include nsRange.h too.
btw, Trevor, are going to land it?
Blocks: 590640
so, I was about to finally land this, but you'll see in this try run https://tbpl.mozilla.org/?tree=Try&rev=70a2a9aa8088 I somehow managed to break a ref test on osx 10.5 only, any ideas? I'll probably push this to try again and hope its the fault of something else that got backed out or fixed if nobody has a good idea.
Are you sure that's related to this bug? I've done a bunch of try runs with your patch, and that test passed on them, e.g.: https://tbpl.mozilla.org/?tree=Try&rev=5b058bd6f2ef
Assignee: nobody → trev.saunders
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: