Closed Bug 1255538 Opened 8 years ago Closed 8 years ago

Fix trailing \whitespace and \tabs in tasksOverlay.js

Categories

(SeaMonkey :: General, defect)

defect
Not set
minor

Tracking

(seamonkey2.46 fixed)

RESOLVED FIXED
seamonkey2.45
Tracking Status
seamonkey2.46 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

Details

Attachments

(1 file)

While working on mumble mumble Bug 1255354 I noticed some litteral \t tabs and trailing whitespace in tasksOverlay.js. This bug is to fix that.
Summary: Fix \whitespace and \tabs in tasksOverlay.js → Fix trailing \whitespace and \tabs in tasksOverlay.js
> -function OpenTaskURL( inURL )
> -function ShowUpdateFromResource( node )
Nothing ever calls ShowUpdateFromResource() and only ShowUpdateFromResource() calls OpenTaskURL() - which just calls window.open(). And anyway that URL doesn't exist any more, plus we have the auto update service.
Attachment #8729125 - Flags: review?(neil)
Attachment #8729125 - Flags: review?(neil) → review?(iann_bugzilla)
Comment on attachment 8729125 [details] [diff] [review]
Patch v1 remove tabs and trailing whitespace.

> function ShowWindowFromResource( node )
> {
>+  var desiredWindow = null;
>+  var url = node.getAttribute('id');
>+  desiredWindow = Services.windowManagerDS.getWindowForResource(url);
>+  if (desiredWindow)
>+    toOpenWindow(desiredWindow);
> }
Any reason why it is not just:
var desiredWindow = Services.windowManagerDS.getWindowForResource(url);
or even:
var win = Services.windowManagerDS.getWindowForResource(url);


> function checkFocusedWindow()
> {
>   var sep = document.getElementById("sep-window-list");
>   // Using double parens to avoid warning
>   while ((sep = sep.nextSibling)) {
>     var url = sep.getAttribute('id');
>+    var win = Services.windowManagerDS.getWindowForResource(url);
>     if (win == window) {
>       sep.setAttribute("checked", "true");
>       break;
>     }
>   }
> }
Would it be better to declare url and win before the while or use let or doesn't it matter these days?
Is the comment about the double parens still correct?


As most other arguments use " rather than ', can this be changed for the getAttribute('id') whilst we are here?

r=me with those addressed
Attachment #8729125 - Flags: review?(iann_bugzilla) → review+
> Any reason why it is not just:
> var desiredWindow = Services.windowManagerDS.getWindowForResource(url);
> or even:
> var win = Services.windowManagerDS.getWindowForResource(url);
RDF data sources are "magic" I don't want to change the logic in case I break anything.

> Would it be better to declare url and win before the while or use let or
Yes it's better but I keep telling frg to put whitespace changes in a separate patch. And I need to set a good example :P

> Is the comment about the double parens still correct?
Yes.

> As most other arguments use " rather than ', can this be changed for the
> getAttribute('id') whilst we are here?
I guess I can do that.
http://hg.mozilla.org/comm-central/rev/c418220f682f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.45
Followup bustage fix as XPCOMUtils isn't in every context that tasksOverlay.js is in
http://hg.mozilla.org/comm-central/rev/06cd9a025d9d
> Followup bustage fix as XPCOMUtils isn't in every context that tasksOverlay.js is in
> http://hg.mozilla.org/comm-central/rev/06cd9a025d9d

Followup bustage fix as Services isn't in every context that tasksOverlay.js is in
http://hg.mozilla.org/comm-central/rev/23d2205feabf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: