Closed Bug 803027 Opened 9 years ago Closed 9 years ago

Re-implement `selection` module


(Add-on SDK Graveyard :: General, defect, P1)



(Not tracked)



(Reporter: zer0, Assigned: zer0)




(2 files)

The selection module is one of the oldest module we have, and despite some bit changes in the years the main was kept pretty much the same. The module uses a lot of old coding styles, deprecated module and approaches. Unit Test also should be rewritten entirely and cover more cases than it actually does. We also faced some regression.
In order to solve these problems we should re-implemented it, with same API.
Assignee: nobody → zer0
Blocks: 661884
Blocks: 803031
No longer blocks: 803031
Blocks: 803031
No longer blocks: 803031
Removed dependencies from bug 803031 because, even if the re-implementation of selection module makes it working on Fennec mostly "as is", due the issue with `tabs` is not possible test it properly. If a fix is not provided soon, I believe it's better landing this bug without waiting for Fennec implementation.
Attachment #672905 - Flags: review?(evold)
Blocks P1 bugs so this should be a P1 bug
Priority: P2 → P1
Attachment #672905 - Flags: review?(evold) → review+
Commits pushed to master at
Bug 803027 - Re-implement `selection` module

In addition to the bugs listed in Bug 803027, this patch:
- Removed the additional `span` created in the document every time selection's text is modified
- Added `iterator` method in order to iterate with `for...of`
- Removed usage of deprecated modules like observers and more important Tab Tracker
- Removed mention to WONTFIX bug 560716 from code and unit test
- Update the Unit Test to commonJS ones
- Update the Unit Test with new tests for the bug fixed, plus the test for selection listeners that were missing since the start
- Refactoring the code to supports Fennec (still not supported in this commit)
Merge remote-tracking branch 'upstream/master' into selection/bug803027

Merge pull request #623 from ZER0/selection/bug803027

Fix Bug 803027 - Re-implement `selection` module r=@erikvold
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.