Closed Bug 350319 Opened 18 years ago Closed 17 years ago

Strict warning: function getStyleSheet does not always return a value

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Lightning 0.5

People

(Reporter: ssitter, Assigned: ssitter)

Details

Attachments

(1 file, 1 obsolete file)

Warning: function getStyleSheet does not always return a value
Source File: chrome://calendar/content/calendar-views.js
Line: 235
Source Code:
}
Attached patch fix strict warnings (obsolete) — — Splinter Review
Fix the warning mentioned in summary. But I could not resist and also fixed

Warning: Expected color but found 'null'.  Error in parsing value for property 'background-color'.  Declaration dropped.
Source File: chrome://calendar/content/preferences/editCategory.xul Line: 0
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #235588 - Flags: second-review?(jminta)
Attachment #235588 - Flags: first-review?(mattwillis)
Comment on attachment 235588 [details] [diff] [review]
fix strict warnings

r1=lilmatt
Attachment #235588 - Flags: first-review?(mattwillis) → first-review+
Blocks: 349987
Comment on attachment 235588 [details] [diff] [review]
fix strict warnings

    function toggleColor()
    {
       if(document.getElementById("useColor").checked)
          document.getElementById("categoryColor").color = oldColor;
       else {
          oldColor = document.getElementById("categoryColor").color;
-         document.getElementById("categoryColor").color=null;
+         document.getElementById("categoryColor").removeAttribute("color");
       }
The strict warning here seems to be unavoidable.    For me, on the 1.8.1 branch, a color will stay chosen if i uncheck the color checkbox with this patch.
(In reply to comment #3)
> The strict warning here seems to be unavoidable. For me, on the 
> 1.8.1 branch, a color will stay chosen if i uncheck the color 
> checkbox with this patch

This works fine for me in win32 Sunbird build from MOZILLA_1_8_BRANCH (with this patch). Not testable in Lightning at the moment because there is no UI to select or edit categories.
Attached patch fix strict warning — — Splinter Review
Now that we have 1.8.1 branch builds I'll try to reproduce the issue mentioned in Comment #3 in the original bug.
Attachment #235588 - Attachment is obsolete: true
Attachment #255385 - Flags: first-review?(lilmatt)
Attachment #235588 - Flags: second-review?(jminta)
Comment on attachment 255385 [details] [diff] [review]
fix strict warning

r=lilmatt
Attachment #255385 - Flags: first-review?(lilmatt) → first-review+
Patch checked in on MOZILLA_1_8_BRANCH and trunk.

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → Lightning 0.5
No longer blocks: 349987
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: