<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - previousRootInlineBoxCandidatePosition & nextRootInlineBoxCandidatePosition FIXME to remove duplicate code"
href="https://bugs.webkit.org/show_bug.cgi?id=145285#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - previousRootInlineBoxCandidatePosition & nextRootInlineBoxCandidatePosition FIXME to remove duplicate code"
href="https://bugs.webkit.org/show_bug.cgi?id=145285">bug 145285</a>
from <span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=253716&action=diff" name="attach_253716" title="patch">attachment 253716</a> <a href="attachment.cgi?id=253716&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=253716&action=review">https://bugs.webkit.org/attachment.cgi?id=253716&action=review</a>
<span class="quote">> Source/WebCore/editing/VisibleUnits.cpp:86
> + Node* leaf = leafWithSameEditability(direction, node, editableType, editableType);</span >
We should be consistent with whether "direction" is the first argument or the last argument.
<span class="quote">> Source/WebCore/editing/VisibleUnits.cpp:102
> + if (leaf->hasTagName(brTag))
> + pos = positionBeforeNode(leaf);
> + else
> + pos = createLegacyEditingPosition(leaf, caretMaxOffset(leaf));
> + } else
> + pos = createLegacyEditingPosition(leaf, caretMinOffset(leaf));</span >
Do you know why only previous direction requires a check for BR?
Not saying that you need to figure out why but it deserves a why comment.
We can add a FIXME like "Why do we only do this for previous direction?"</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>