shivanikhosa / browserscope

Automatically exported from code.google.com/p/browserscope
Apache License 2.0
0 stars 0 forks source link

Do not test that superscript/subscript commands produce <span style="vertical-align: ..."> #327

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In some richtext2 tests (at least RTE2-AC_SUB_TEXT-1_SI and 
RTE2-AC_SUP_TEXT-1_SI), the test expectation is that the subscript/superscript 
commands will produce spans with the 'vertical-align' property set.  However, 
the editing spec requires that sub/sup tags always be created, even if 
styleWithCSS mode is on:

"""
If command is "subscript" or "superscript" and new value is "subscript", let 
new parent be the result of calling createElement("sub") on the ownerDocument 
of node.

If command is "subscript" or "superscript" and new value is "superscript", let 
new parent be the result of calling createElement("sup") on the ownerDocument 
of node.
"""
http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#forcing-the-value-of-a-n
ode

(Contrast to the steps above that are prefaced with "If the CSS styling flag is 
false:".  For subscript/superscript, a special element is created even if the 
CSS styling flag is true.)

The spec matches the behavior of Firefox, and I've WONTFIXed a request to 
change Firefox: <https://bugzilla.mozilla.org/show_bug.cgi?id=394304>.  The 
spec also obviously matches the behavior of IE and Opera, since they don't 
support styleWithCSS at all.  The test's expectation matches WebKit, but WebKit 
considers it a bug: <https://bugs.webkit.org/show_bug.cgi?id=11089>.

Please update the expectation so that <sub>/<sup> are expected in all cases, so 
that IE/Firefox/Opera pass and WebKit fails.

Original issue reported on code.google.com by Simetrical on 15 Apr 2012 at 7:11

GoogleCodeExporter commented 8 years ago
I should add: the reason the expected behavior isn't desired is because sup/sub 
also change font size, while vertical-align by itself does not.  This means 
that if superscript/subscript produce <span style="vertical-align: ..."> in CSS 
mode, it won't match the behavior in non-CSS mode, which is a bug.  Users 
expect sup/sub to make the text smaller too.  And if we tried to make it add 
font-size as well as vertical-align, we'd open a can of worms, because when 
removing styles we'd have to figure out whether font-size was added by 
superscript/subscript or something else.  And finally, the motivation for 
styleWithCSS mode is better standards conformance, but <sub>/<sup> are valid in 
all HTML standards I'm aware of, even XHTML2 (which removes /<i>/etc.).

Original comment by Simetrical on 15 Apr 2012 at 7:16