Bug 120530
Summary: | Wrong results when toggling execCommand underline/strikethrough with mixed text decoration properties | ||
---|---|---|---|
Product: | WebKit | Reporter: | Bruno Abinader <brunoabinader> |
Component: | CSS | Assignee: | Bruno Abinader <brunoabinader> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Bruno Abinader
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
This should be fixed by http://trac.webkit.org/changeset/183770.
*** This bug has been marked as a duplicate of bug 27818 ***