Closed Bug 523693 Opened 10 years ago Closed 10 years ago

Inline spell checker should be a module

Categories

(Toolkit :: XUL Widgets, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file)

Currently each spellchecked textbox (which in a stock build is very few, I only know of two in suite) loads its own copy of inlineSpellCheckUI.js; my suggestion is to convert this file into a module so that it is only loaded once.
Attached patch Proposed patchSplinter Review
Plus adding a stub to toolkit/obsolete until other consumers get fixed.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #407601 - Flags: review?(gavin.sharp)
Attachment #407601 - Flags: review?(gavin.sharp) → review+
Comment on attachment 407601 [details] [diff] [review]
Proposed patch

>diff --git a/toolkit/content/widgets/textbox.xml b/toolkit/content/widgets/textbox.xml

>+              Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm", this);
>+              this.InlineSpellCheckerUI = new this.InlineSpellChecker(textbox.editor);

Doesn't matter much, but I'd use a non-this scope object here.
(In reply to comment #2)
> Doesn't matter much, but I'd use a non-this scope object here.

Nevermind this, doesn't really make any sense.
Pushed changeset 1ad687761819 to mozilla-central.

Pushed changeset 9ed3e755663a to mozilla-central, because I suck :-(
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.