RESOLVED DUPLICATE of bug 27818 120530
Wrong results when toggling execCommand underline/strikethrough with mixed text decoration properties
https://bugs.webkit.org/show_bug.cgi?id=120530
Summary Wrong results when toggling execCommand underline/strikethrough with mixed te...
Bruno Abinader
Reported 2013-08-30 08:37:20 PDT
While implementing editing layout tests for CSS3 Text Decoration properties (bug 120114), I found out there are wrong results when toggling execCommand's underline/strikethrough commands together with mixed text-decoration/-webkit-text-decoration-line properties. See example below: Example 1: Toggling "underline" on an underlined text When toggling execCommand's "underline", expected behavior should be to remove -webkit-text-decoration-line from style declaration, however it remains as-is: Before: <span style="-webkit-text-decoration-line: underline; -webkit-text-decoration-style: dashed; -webkit-text-decoration-color: blue;">test</span> After: <span style="-webkit-text-decoration-line: underline; -webkit-text-decoration-style: dashed; -webkit-text-decoration-color: blue;">test</span> Example 2: Toggling "underline" on an overlined text When toggling execCommand's "underline", expected behavior should be to merge "underline" value in -webkit-text-decoration-line, however it remains as-is and a new text-decoration property is appended into style: Before: <span style="-webkit-text-decoration-line: overline; -webkit-text-decoration-style: dashed; -webkit-text-decoration-color: blue;">test</span> After: <span style="-webkit-text-decoration-line: overline; -webkit-text-decoration-style: dashed; -webkit-text-decoration-color: blue; text-decoration: underline">test/</span> Similar behavior is also presented when using "strikeThrough" execCommand. I suspect this happens because both text-decoration implementation (following CSS2.1 spec) and -webkit-text-decoration-line (CSS3) implementation shares the same data internally.
Attachments
Ryosuke Niwa
Comment 1 2016-04-11 01:23:17 PDT
This should be fixed by http://trac.webkit.org/changeset/183770. *** This bug has been marked as a duplicate of bug 27818 ***
Note You need to log in before you can comment on or make changes to this bug.