Closed
Bug 1185307
Opened 9 years ago
Closed 8 years ago
Need to add nsISelection::AsSelection() or something
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla50
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(2 files)
Currently, there is only one concrete class implementing nsISelection, that is mozilla::dom::Selection. Therefore, a lot of code casts nsISelection to Selection. http://mxr.mozilla.org/mozilla-central/search?string=static_cast%3CSelection*%3E This is safe at least for now, but not so in strictly speaking. I think that nsISelection should have |Selection* AsSelection()| as noxpcom and noscript method.
Comment 1•9 years ago
|
||
makes sense to me. nsISelection is marked as builtinclass, so at least there aren't other JS implementations.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=309839011fd4
Assignee | ||
Comment 3•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=35805966d962
Assignee | ||
Comment 4•8 years ago
|
||
This patch adds nsISelection::AsSelection() for safer "upcast". Review commit: https://reviewboard.mozilla.org/r/59498/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/59498/
Attachment #8763247 -
Flags: review?(bugs)
Attachment #8763248 -
Flags: review?(bugs)
Assignee | ||
Comment 5•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/59500/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/59500/
Updated•8 years ago
|
Attachment #8763247 -
Flags: review?(bugs) → review+
Comment 6•8 years ago
|
||
Comment on attachment 8763247 [details] Bug 1185307 part.1 Add nsISelection::AsSelection() https://reviewboard.mozilla.org/r/59498/#review56650
Updated•8 years ago
|
Attachment #8763248 -
Flags: review?(bugs) → review+
Comment 7•8 years ago
|
||
Comment on attachment 8763248 [details] Bug 1185307 part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() https://reviewboard.mozilla.org/r/59500/#review56652
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8763247 [details] Bug 1185307 part.1 Add nsISelection::AsSelection() Review request updated; see interdiff: https://reviewboard.mozilla.org/r/59498/diff/1-2/
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8763248 [details] Bug 1185307 part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() Review request updated; see interdiff: https://reviewboard.mozilla.org/r/59500/diff/1-2/
Comment 10•8 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/fd0960e65810 part.1 Add nsISelection::AsSelection() r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/fa1be718504b part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() r=smaug
Comment 11•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fd0960e65810 https://hg.mozilla.org/mozilla-central/rev/fa1be718504b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•