Closed Bug 59005 Opened 24 years ago Closed 23 years ago

Saving html with selects saves unneeded state.

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
mozilla0.8.1

People

(Reporter: rods, Assigned: anthonyd)

Details

(Whiteboard: FIX IN HAND [nsbeta1+])

Attachments

(2 files)

Opening a file with this content:
<form>
<select>
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>
<form>

Saves it out like this:
<html>
<head>
</head>
<body>
<form> <select><option 
-moz-option-selected="">One</option><option>Two</option><option>
Three</option></select></form>
<form></form>
</body>
</html>

The -moz-option-selected="" part should be written out.
reassign to anthonyd for mozilla .9 release.
Akkana thinks this is probably pretty easy (typo using "-moz" rather than "_moz").
Assignee: beppe → anthonyd
Target Milestone: --- → mozilla0.9
nsHTMLContentSerializer filters out any attribute beginning with _moz.
We need to find out why the select code is using -moz instead of _moz.  (-moz is
the de-facto standard for CSS, but _moz is the de-facto standard for attributes,
if you do an lxr search; Simon and I checked that a while back when I was
wondering whether we should convert all the editor's uses of _moz to -moz in
attributes to be consistent with our CSS.)
investigating.

anthonyd
Status: NEW → ASSIGNED
adding keywords and whiteboard data
Keywords: correctness, nsbeta1
Whiteboard: [nsbeta1+]
fix is as easy as everyone said it would be.  adding kin to the list.  need a= 
from akkana and sr= from kin for mozilla 0.9 check in.

anthonyd
Whiteboard: [nsbeta1+] → FIX IN HAND [nsbeta1+]
I'm fine with the fix, but have you run an lxr search to make sure no one else
was depending on the old name?  I'd recommend getting an r or sr from a layout
person to make sure it's okay with them. 
That fix isn't right ... it will change the usage in the CSS files too. -moz is
a standard they use in layout for moz specific CSS properties.
kin and i talked with rods and he is using -moz-option-selected as an attribute, 
so renaming it to _moz-option-selected in the atom list and the appropos css 
files SHOULD be ok.  will attach new diff with css changes.

anthonyd
This looks OK to me, [s]r=attinasi Has Rod reviewed it?
adding rods to cc list.

rod, can i get a r= please?

thanks,
anthonyd
setting to 0.8.1.  i would like to check this in, i have an sr=, but i need an 
r=.  kin has reviewd it ans said its ok, but i guess i need a r= from layout.

anthonyd
Target Milestone: mozilla0.9 → mozilla0.8.1
r=rods
checked in
anthonyd
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Rod, is this working for you now ? thanks...
Tony is gonna verify this one...thanks!
re-opening bug, when jst split layout he didnt pick up my changes to fix this 
bug.  some of my changes are still in the tree:
/webshell/tests/viewer/samples/aform.css
/webshell/tests/viewer/samples/bform.css
/webshell/tests/viewer/samples/demoform.css
/webshell/tests/viewer/samples/mozform.css

but my changes to nsLayoutAtomlist.h and forms.css are gone.

adding jst to the cc list.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
ok, when the tree opens back up, i will re land the fix for this.

anthonyd
rechecked in fix.

i also re-verified it in my build, but i will do it again with actual opt bits
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Tony, if you can verify with opt bits...thanks!

also go ahead and mark this puppy VERIFIED-FIXED after doing so..

thanks dude.
marking verified...Tony checked it out in debug build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: