image72 / browserscope

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

In richtext2, queryCommandValue() should return "" for boolean-state commands, not "true"/"false" #332

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Many tests like RTE2-QV_B_TEXT_SI test that document.queryCommandValue("bold") 
etc. returns "true" or "false" depending on the state.  This is how WebKit 
behaves, but all other browsers consistently return something that evalutes to 
boolean false.  The spec requires returning "".  WebKit's behavior

1) isn't useful, because you can just use queryCommandState();

2) doesn't work for commands that have separate state and value, such as (per 
spec) justify*;

3) is confusing, because "false" == true.

Please update the tests to require the empty string here instead.

(As with all of these bugs I'm filing, I'm happy to write a patch, if it will 
get accepted.)

Original issue reported on code.google.com by a...@aryeh.name on 24 Apr 2012 at 12:41