Closed Bug 803027 Opened 9 years ago Closed 9 years ago

Re-implement `selection` module

Categories

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

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zer0, Assigned: zer0)

References

Details

Attachments

(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 https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/27536356d91aff8adfdeea6174632d2731a296a1
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)

https://github.com/mozilla/addon-sdk/commit/d419d868503fd1ed9851db163a7d7bb027aebe24
Merge remote-tracking branch 'upstream/master' into selection/bug803027

Conflicts:
	lib/sdk/window/utils.js

https://github.com/mozilla/addon-sdk/commit/d8a9203a010e8a7247e0f75c8383b56bab25ceeb
Merge pull request #623 from ZER0/selection/bug803027

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