Closed Bug 336726 Opened 18 years ago Closed 18 years ago

XUL: Non-relevant controls should not be shown

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan, Assigned: surkov)

References

()

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(2 files, 1 obsolete file)

Controls bound to non-relevant nodes should not be shown per default (like for XHTML).
Attached file Testcase
Attached patch patch (obsolete) — Splinter Review
It's pretty simple patch but I don't like a lot !important flag. The problem is style for :disabled is applied before other styles. !important solves the problem but is it right?
Attachment #221041 - Flags: review?(allan)
Status: NEW → ASSIGNED
Comment on attachment 221041 [details] [diff] [review]
patch

(In reply to comment #2)
> Created an attachment (id=221041) [edit]
> patch
> 
> It's pretty simple patch but I don't like a lot !important flag. The problem is
> style for :disabled is applied before other styles. !important solves the
> problem but is it right?

No, because then it cannot be overriden by the form author.
Attachment #221041 - Flags: review?(allan) → review-
(In reply to comment #3)
> (From update of attachment 221041 [details] [diff] [review] [edit])
> (In reply to comment #2)
> > Created an attachment (id=221041) [edit]
> > patch
> > 
> > It's pretty simple patch but I don't like a lot !important flag. The problem is
> > style for :disabled is applied before other styles. !important solves the
> > problem but is it right?
> 
> No, because then it cannot be overriden by the form author.
> 

Not quite, it can override by using '!important' flag :)

How about the such approach?
Attached patch patch2Splinter Review
Attachment #221041 - Attachment is obsolete: true
Attachment #221560 - Flags: review?(allan)
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 221041 [details] [diff] [review] [edit] [edit])
> > (In reply to comment #2)
> > > Created an attachment (id=221041) [edit]
> > > patch
> > > 
> > > It's pretty simple patch but I don't like a lot !important flag. The problem is
> > > style for :disabled is applied before other styles. !important solves the
> > > problem but is it right?
> > 
> > No, because then it cannot be overriden by the form author.
> > 
> 
> Not quite, it can override by using '!important' flag :)

No, because I tbelieve that our agent style sheet is a "user stylesheet":
"Both author and user style sheets may contain "!important" declarations, and user "!important" rules override author "!important" rules."
[http://www.w3.org/TR/REC-CSS2/cascade.html#important-rules]
Comment on attachment 221560 [details] [diff] [review]
patch2

I'm not sure I like the approach, but it's css styling. Off we go :)

r=me
Attachment #221560 - Flags: review?(allan)
Attachment #221560 - Flags: review?(Olli.Pettay)
Attachment #221560 - Flags: review+
Attachment #221560 - Flags: review?(Olli.Pettay) → review+
Fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Keywords: fixed1.8.1
Keywords: fixed1.8.0.5
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: