[Webkit-unassigned] [Bug 23370] Style removal can remove too much
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 15 17:27:59 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=23370
------- Comment #1 from eric at webkit.org 2009-01-15 17:27 PDT -------
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)
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list