[Webkit-unassigned] [Bug 56439] Get rid of nearestMailBlockquote

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 12:38:03 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56439





--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org>  2011-03-16 12:38:03 PST ---
(From update of attachment 85896)
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.

Extracting a helper function sounds good.  isMailPasteAsQuotationOrMailBlockquoteDescendent?

-- 
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