Load attached reduction.html Select the word "one" Command-I to de-italicize the word "one is de-italicized, but it's also de-underlined. <rdar://problem/4438963> Style removal removes too much style
I've not seen the test case yet. But I assume this is just caused by this function: void ApplyStyleCommand::removeHTMLStyleNode(HTMLElement *elem) { // This node can be removed. // EDIT FIXME: This does not handle the case where the node // has attributes. But how often do people add attributes to <B> tags? // Not so often I think. ASSERT(elem); removeNodePreservingChildren(elem); } The check which is made before calling that function is this one: bool ApplyStyleCommand::isHTMLStyleNode(CSSMutableStyleDeclaration *style, HTMLElement *elem) { CSSMutableStyleDeclaration::const_iterator end = style->end(); for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) { switch ((*it).id()) { case CSSPropertyFontWeight: if (elem->hasLocalName(bTag)) return true; break; case CSSPropertyFontStyle: if (elem->hasLocalName(iTag)) return true; } } return false; } (which I intend to expand to include other tag types soon)
*** This bug has been marked as a duplicate of bug 23496 ***