You need to
before you can comment on or make changes to this bug.
1. Start with the following HTML
<div style="textDecoration: underline"><div id="editable">Text</div></div>
2. Set document.getElementById('editable').contentEditable = true
3. Select Text
4. Ctrl-U (or execCommand('underline')
5. Note that the style for the outer div has changed.
Created an attachment (id=28238) [details]
Demonstration of the bug, note the HTML in the second textarea shows style has been removed from the outer DIV.
Created an attachment (id=32751) [details]
demonstrates the same bug on WebKit & Firefox
Created an attachment (id=32754) [details]
simplified test case (without designMode="on")
The previous test case had the designMode="on". When turning this off, Firefox doesn't change the style at all.
It seems that highestAncestorWithTextDecoration called in ApplyStyleCommand::pushDownTextDecorationStyleAroundNode is crossing the editing boundary.
Created an attachment (id=33120) [details]
fixes the bug
This patch may also resolve https://bugs.webkit.org/show_bug.cgi?id=20215.
(From update of attachment 33120 [details])
This makes unrelated, possibly incorrect changes. Please break this into multiple patches with individual test cases.
See the test case on https://bugs.webkit.org/show_bug.cgi?id=20215, I think you may have broken some of those cases here.
Note: also see http://trac.webkit.org/changeset/8466
Changed the priority because this has potential security vulnerability that part of document that the author does not expect to change may change.
I respectfully disagree.
I don't think there is any "security" concern here. If there was it should be under the Security component anyway. P1s are generally regressions or crashes, of which this is neither.
Created an attachment (id=33463) [details]
smaller patch with extra test case for unsplittable element
(From update of attachment 33463 [details])
Landed in http://trac.webkit.org/changeset/46373