Open Bug 748298 Opened 13 years ago Updated 4 years ago

Remove conflicting markup more aggressively so the result is nicer

Categories

(Core :: DOM: Editor, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: ayg, Unassigned)

References

(Blocks 1 open bug)

Details

RTE2-C_FN:c_FONTf:a-2_SL has this input: foo[bar<font face="arial">baz]qoz</font> It changes fontName to "courier" and expects foo<font face="courier">[barbaz]</font><font face="arial">qoz</font> which is what WebKit produces. Gecko produces foo[<font face="courier">bar</font><font face="arial"><font face="courier">baz]</font>qoz</font> I think this actually matches the spec, but it's significantly more verbose than necessary. I should update the spec to make this case work better, then fix Gecko to match. (I'm filing a bug for this right now because I want every richtext2 failure to be filed either as a bug against them or us.)
This makes perfect sense.
The thing is, WebKit also turns <font face="arial">foo[bar]baz</font> into <font face="arial">foo</font><font face="courier">[bar]</font><font face="arial">baz</font> while Gecko and the spec produce <font face="arial">foo<font face="courier">[bar]</font>baz</font> which is significantly shorter but also more nested. WebKit tries to never have inner styles override outer ones if it can help it. Do you think we should go with this behavior? Or try to get shorter (but generally more deeply nested) markup by making things more complicated? It would simplify the spec somewhat to do what WebKit does.
No, I don't think that we would want to go WebKit's direction here. There is nothing wrong with nesting, and in fact, that's the natural way you would do things if you were authoring HTML (as a human, that is.) WebKit goes a bit too far in that direction here, I'd definitely prefer if we would not push that into the spec. :-)

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.