Closed Bug 294987 Opened 20 years ago Closed 17 years ago

In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color|

Categories

(SeaMonkey :: Composer, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED
seamonkey2.0a1

People

(Reporter: sgautherie, Assigned: sgautherie)

References

Details

(Whiteboard: [Current error is comment 7(+)])

Attachments

(1 file, 2 obsolete files)

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050519] (nightly) (W98SE)

{{
Error: Error in parsing value for property 'background-color'.  Declaration dropped.
Source File: chrome://messenger/content/pref-viewing_messages.xul
Line: 0
}}

1. Diplays '(MailNews) > Preferences... > Mail & Newsgroups > Message Display' panel
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.11) Gecko/20050728] (release) (W98SE)

No bug.

[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050217] (<-- 1.8b1 !)
(W98SE)

Bug already there.
Flags: blocking-seamonkey1.0a?
Keywords: regression
Be serious - why should a CSS error block a release?
Furthermore, 1.7.11 is - as the version implies - a 1.7 branch build and as such
doesn't really help in getting a regression window...
Flags: blocking-seamonkey1.0a?
This is actually caused by an uninitialised colour picker.
(We don't have a default citation colour, it just uses the body colour).
However the lack of a colour only became a notification recently.
I can't see us blocking 1.0a for this but obviously we'd appreciated it should
someone step up and patch colorpicker.xml to do the right thing for no colour.
Keywords: regressionhelpwanted
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8) Gecko/20051213 SeaMonkey/1.0b] (release) (W98SE)

Bug confirmed on SMv1.0 branch.
(In reply to comment #4)
> [Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8) Gecko/20051213 SeaMonkey/1.0b]
> (release) (W98SE)

(For the record, that build was a nightly :->)
I can confirm the bug for Linux, 1.8.0 branch: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060127 SeaMonkey/1.0. Suggest changing "OS" to "ALL".
OS: Windows 98 → All
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20060319 SeaMonkey/1.5a] (nightly) (W98SE)

The initial <pref-viewing_messages.xul> error seems WFM now.

But after fixing bug 331024, I get another very similar warning
{{
Warning: Error in parsing value for property 'background-color'.  Declaration dropped.
Source File: chrome://editor/content/EdColorPicker.xul
Line: 0
}}
Severity: normal → minor
Depends on: 331024
Summary: In <pref-viewing_messages.xul>, "Error: Error in parsing value for property 'background-color'. Declaration dropped." → In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped."
I think this is a limitation of the colour picker, it doesn't validate the colour that you type in, except as a consequence of trying to set it as the style of the colour well, which results in the CSS error as shown. I don't actually know any other way of validating a colour style.
(In reply to comment #3)
> (We don't have a default citation colour, it just uses the body colour).
> patch colorpicker.xml to do the right thing for no colour.

(In reply to comment #7)
> [Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20060319
> SeaMonkey/1.5a] (nightly) (W98SE)
> 
> The initial <pref-viewing_messages.xul> error seems WFM now.

(Maybe I didn't test that build with a new profile ?)

This has been fixed (later, on 2007-03-15) by bug 374101:
<http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/mailnews.js&rev=3.310&mark=178#175>

Verified by backing out the patch, and using a new profile, with
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008033000 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)
Depends on: 374101
(In reply to comment #7)
> But after fixing bug 331024, I get another very similar warning
> {{
> Warning: Error in parsing value for property 'background-color'.  Declaration
> dropped.
> Source File: chrome://editor/content/EdColorPicker.xul
> Line: 0
> }}

This appeared in
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060321 SeaMonkey/1.5a] (nightly) (W2Ksp4)
and is still there in
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008033000 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

Full steps are:
1. Create a new profile.
2. Start Browser.
3. > Edit > [Legacy] Preferences... > Composer > New Page Settings > Use custom colors
4. Click on one of the 5 color buttons, so the color picker dialog opens.
4r. Get the error, each time.
Whiteboard: [Current error is comment 7(+)]
(In reply to comment #8)
> I think this is a limitation of the colour picker, it doesn't validate the
> colour that you type in, except as a consequence of trying to set it as the
> style of the colour well, which results in the CSS error as shown. I don't
> actually know any other way of validating a colour style.

I'm not sure this is the current issue, as I'm not typing in anything.

*****

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008033000 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

The issue can be seen in the Color Picker dialog,
as the "Last-picked color" button color area has "no" color.
And clicking on it gives a "Click on a color or enter a valid HTML color string" error dialog.

I used Venkman to pinpoint the involved code:

The error happens at line 170:
<http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/editor/ui/dialogs/content/EdColorPicker.js&rev=1.28&mark=45,156,168,170#150>
because |LastPickedColor| is an empty string.

The four text color buttons depend on |gColorObj.LastTextColor|;
the background color button depends on |gColorObj.LastBackgroundColor|.
See also
<http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/editor/ui/dialogs/content/EdColorPicker.xul&rev=1.30&mark=83-84#79>

(In reply to comment #3)
> patch colorpicker.xml to do the right thing for no colour.

That comment was for the initial error;
but eventually it applies to the new error too ;-)
Assignee: prefs → sgautherie.bz
Keywords: helpwanted
Hardware: PC → All
Summary: In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped." → In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color|
Target Milestone: --- → seamonkey2.0alpha
Attached patch (Av1) <EdColorPicker.js> (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008033000 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

Explicitly handle lack of value.
Attachment #312620 - Flags: superreview?(neil)
Attachment #312620 - Flags: review?(neil)
Status: NEW → ASSIGNED
Comment on attachment 312620 [details] [diff] [review]
(Av1) <EdColorPicker.js>

>+  // Is it the first time this kind of color is (about to be) modified ?
>+  if (!LastPickedColor) {
>+    // Disable useless button.
>+    gDialog.LastPickedButton.disabled = true;
I think the comments don't really explain properly. How about:
// Disable button - no last color available.
Also might it be better to hide the button instead?
Attachment #312620 - Flags: review?(neil) → review+
Attached patch (Av1a) <EdColorPicker.js> (obsolete) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008040201 SeaMonkey/2.0a1pre] (nightly) (W2Ksp4)

Av1, with comment 13 suggestion(s).
Attachment #312620 - Attachment is obsolete: true
Attachment #313207 - Flags: superreview?(neil)
Attachment #313207 - Flags: review?(neil)
Attachment #312620 - Flags: superreview?(neil)
(In reply to comment #11)
> (In reply to comment #8)
> > I think this is a limitation of the colour picker, it doesn't validate the
> > colour that you type in, except as a consequence of trying to set it as the
> > style of the colour well, which results in the CSS error as shown. I don't
> > actually know any other way of validating a colour style.
> 
> I'm not sure this is the current issue, as I'm not typing in anything.

I filed bug 426633 about that other issue ;-)
Comment on attachment 313207 [details] [diff] [review]
(Av1a) <EdColorPicker.js>

>+    // Disable button - no last color available.
>+    gDialog.LastPickedButton.hidden = true;
Um, well, now maybe the comment should say "Hide the button" ;-)
Attachment #313207 - Flags: superreview?(neil)
Attachment #313207 - Flags: superreview+
Attachment #313207 - Flags: review?(neil)
Attachment #313207 - Flags: review+
Av1a, with comment 16 suggestion(s) ++.

Forwarding r+/sr+.
Attachment #313207 - Attachment is obsolete: true
Assignee: sgautherie.bz → nobody
Status: ASSIGNED → NEW
Component: Preferences → Composer
Keywords: checkin-needed
QA Contact: composer
Whiteboard: [Current error is comment 7(+)] → [c-n: Av1b] [Current error is comment 7(+)]
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Checking in editor/ui/dialogs/content/EdColorPicker.js;
/cvsroot/mozilla/editor/ui/dialogs/content/EdColorPicker.js,v  <--  EdColorPicker.js
new revision: 1.29; previous revision: 1.28
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [c-n: Av1b] [Current error is comment 7(+)] → [Current error is comment 7(+)]
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008040415 SeaMonkey/2.0a1pre] (SEA-WIN32-TBOX-trunk) (W2Ksp4)

V.Fixed
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: