DescriptionRefactoring code in highestEditableRoot to avoid a redundant call to
rendererIsEditable
rendererIsEditable check was being done twice for the node obtained
from editableRootForPosition, first by Node::rootEditableElement
(invoked from editableRootForPosition) and again by an explicit call
in highestEditableRoot, once the node is obtained.
rendereIsEditable check would be already done for any node returned
from editableRootForPosition. Hence we need not invoke rendereIsEditable
check for this node again in highestEditableRoot.
If the editable node obtained from editableRootForPosition is <body>,
exit early as we do not want to go beyond <body>.
Otherwise, search for the highest editable root, by traversing up the tree
starting from parent of the node obtained by editableRootForPosition,
instead of traversing from the node itself.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=155650
Patch Set 1 #
Messages
Total messages: 6 (0 generated)
|