[webkit-reviews] review granted: [Bug 56439] Get rid of nearestMailBlockquote : [Attachment 85896] cleanup + minor crash fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 10:48:05 PDT 2011


Tony Chang <tony at chromium.org> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 56439: Get rid of nearestMailBlockquote
https://bugs.webkit.org/show_bug.cgi?id=56439

Attachment 85896: cleanup + minor crash fix
https://bugs.webkit.org/attachment.cgi?id=85896&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=85896&action=review

> Source/WebCore/editing/ReplaceSelectionCommand.cpp:626
> +    Node* blockquoteNode = (!context || isMailPasteAsQuotationNode(context))
? context : enclosingNodeOfType(firstPositionInNode(context), isMailBlockquote,
CanCrossEditingBoundary);

Nit: It took me a while to figure out why you added !context (i.e., it's ok to
pass NULL to isMailPasteAsQuotationNode, but it's not OK to pass NULL to
firstPositionInNode).  Maybe pull this out into a helper function (it could
also be used in line 559).  Alternately, maybe firstPositionInNode should
return a null position when passed in a NULL pointer.


More information about the webkit-reviews mailing list