[Webkit-unassigned] [Bug 34156] Incorrect boolean expression in isMailBlockquote() (WebCore/htmlediting.cpp)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 26 08:18:36 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34156
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #47391|review? |review-
Flag| |
--- Comment #3 from Darin Adler <darin at apple.com> 2010-01-26 08:18:36 PST ---
(From update of attachment 47391)
> + Could potentially lead to a crash if applied to an attribute named "blockquote",
That's incorrect. The Node::hasTagName will only return true for an Element.
You can look at the implementation to double-check this.
> + or an incorrect result if applied to a different element that has an attribute "cite".
I don't understand this claim.
> + No new tests. (minor code change)
If the "cite" case existed, you could probably construct a test case for it.
> - if (!node || (!node->isElementNode() && !node->hasTagName(blockquoteTag)))
> + if (!node || !node->isElementNode() || !node->hasTagName(blockquoteTag))
> return false;
The isElementNode check is entirely unnecessary and can be removed. That's
probably the best fix.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list