[Webkit-unassigned] [Bug 145285] previousRootInlineBoxCandidatePosition & nextRootInlineBoxCandidatePosition FIXME to remove duplicate code
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 26 13:28:31 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=145285
--- Comment #13 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 253716
--> https://bugs.webkit.org/attachment.cgi?id=253716
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=253716&action=review
> Source/WebCore/editing/VisibleUnits.cpp:86
> + Node* leaf = leafWithSameEditability(direction, node, editableType, editableType);
We should be consistent with whether "direction" is the first argument or the last argument.
> 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));
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?"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150526/29b19d44/attachment.html>
More information about the webkit-unassigned
mailing list