Bug 120530 - Wrong results when toggling execCommand underline/strikethrough with mixed text decoration properties
Summary: Wrong results when toggling execCommand underline/strikethrough with mixed te...
Status: RESOLVED DUPLICATE of bug 27818
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bruno Abinader
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-30 08:37 PDT by Bruno Abinader
Modified: 2016-04-11 01:23 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Abinader 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.
Comment 1 Ryosuke Niwa 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 ***