Closed Bug 57686 Opened 20 years ago Closed 20 years ago

Invisible table borders don't render in composer unless you specify border=0

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: kinmoz, Assigned: glazou)

References

Details

Attachments

(2 files)

In composer, it looks like we only display invisible table borders if the table
has a border=0 attribute.

We should also handle the case where border is not specified in the table tag at
all.

Assigning to brade as per beppe, since cmanske is on sabbatical.
Attached file Test case.
accepting bug
Status: NEW → ASSIGNED
setting to mozilla0.9
Target Milestone: --- → mozilla0.9
This is probably a bug in EditorContent.css; reassign to cmanske
Assignee: brade → cmanske
Status: ASSIGNED → NEW
This is not trivial to do. We can't set a CSS rule to show a border when an
attribute is missing. We would have to add special attributes just for Composer
during tag parsing. E.g.: if there's no "border" attribute, set border="0" and
some flag (such as a "_moz_no_border" attribute) to tell output system to not
write out the "0" so we can preserve the original HTML.
Status: NEW → ASSIGNED
The effect you want to achieve is *exactly* the purpose of the new pseudo-class
:not() in the currently standardized CSS 3 Selectors module. This pseudo
notation takes a simple selector - e.g. an attribute selector - as argument, and
is matched when the argument is not matched by the element.

So what we want to write is table:not([border]) { border : 1px red dotted }

This effect cannot be done only through CSS 2 cascade mechanism.
Depends on: selectors3
maybe hwaara@chello.se can help with this bug (thanks to Daniel's tip)?
No one can fix this before :not is implemented. At least not from CSS.
I hope to have a working implementation of :not() by the end of today or at the
beginning of next week (I'll be traveling over the week-end and unable to
work on this bug)
Changing dependency from trk bug 65133 to bug 71647.
Depends on: 71647
No longer depends on: selectors3
Attached patch patch for 57686Splinter Review
Proposing a patch for 57686. This patch can only work with the fix for bug 71647
integrated. Patch for 71647 has been added to Bugzilla a few minutes ago, and
57686 is now fixed in my own build.

r= ?
sr=kin@netscape.com

I'm sure cmanske would love to give his r= on this one!
You're right, I would, though I'm definitely am not qualified to review CSS code!
I would love to just trust Daniel, but would feel better if another CSS guru
gave it a look.
hixie could probably r= this code.

you can have an r=timeless if you value it, however this code can't be checked 
in until a patch is accepted for the other bug. I expect that by the time that 
happens, I will value the r= I put in this bug.
Reassigning to myself
Assignee: cmanske → glazman
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
r=brade
checked in :-) Yay !!!!
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
verified with optimized linux mozilla build from 8am today.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.