selectionHasStyle does not return TrueTriState when asked if <b><span style="text-decoration: underline;">hello</span><span style="text-decoration: underline;">world</span></b> is has underline. Because b does not have underline style, it returns MixedTriState. It also does not take care of -webkit-text-decorations; i.e. text decorations added by u, s, and strike.
Created attachment 33849 [details] fixes the bug, large because converts a pixel test to a dumpastext.
Created attachment 33852 [details] fixed per comment on IRC
Will fix // CSS properties that only has a visual difference when applied to text. to // CSS properties that have a visual difference only if applied to text.
Comment on attachment 33852 [details] fixed per comment on IRC will split into two patches.
Created attachment 34107 [details] fixes the bug
Comment on attachment 34107 [details] fixes the bug Converting the tests in one patch and then changing them in a second would be clearer.
The test conversion bug is filed as https://bugs.webkit.org/show_bug.cgi?id=28055 and the corresponding patch has been submitted.
Created attachment 34236 [details] resubmission after split
Comment on attachment 34236 [details] resubmission after split Looks OK.
Comment on attachment 34236 [details] resubmission after split + WebKit now applies the text styles (bold, italic, etc) if the specified style was not present on + at least one text node, rather than at the beginning of selection. This change is tested in toggle-compound-styles. Sorry I didn't notice this until now but we behaved this way to match Mac OS X editing behavior (TextEdit). Perhaps we should preserve the old behavior for Mac-only.
Created attachment 34325 [details] reverts the behavioral change in Mac
Created attachment 34329 [details] fixes the bug and changes the WebKit behavior on all platforms except mac
mn... I don't know why it has svn property change. that doesn't seem right. should i delete that property change before I commit?
Landed in http://trac.webkit.org/changeset/46920.