<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">trying to understand this part of the webcore code, I faced a possibly<br>
wrong impl:<br>
<br>
(...)<br>
VisiblePosition logicalStartOfLine(const VisiblePosition& c)<br>
{<br>
VisiblePosition visPos = logicalStartPositionForLine(c);<br>
<br>
if (visPos.isNull())<br>
return c.honorEditableBoundaryAtOrAfter(visPos);<br>
<br>
return c.honorEditableBoundaryAtOrAfter(visPos);<br>
}<br>
(...)<br>
<br>
note that "c.honorEditableBoundaryAtOrAfter(visPos);" will be<br>
executed regardless visPos being null or not. thoughts ?<br>
</blockquote><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">honorEditableBoundaryAtOrAfter does check whether the visPos is null or not, and if it's null, then it returns the original visible position, so it's harmless (i.e. does not crash or has a side-effect). But I'm not sure what the caller of <span class="Apple-style-span" style="border-collapse: separate; font-family: arial; font-size: small; ">logicalStartOfLine is expecting; maybe we're supposed to do something in the case visible position was null. But assuming that the original is correct, we don't need that if statement at all.</span></span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">Did you file a bug for it?</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, sans-serif">Ryosuke</font></div></div>