Make ApplyStyleCommand::applyRelativeFontStyleChange() to handle AfterAnchor position correctly
This patch makes |ApplyStyleCommand::applyRelativeFontStyleChange()| to stop
node iteration from start position to end node position by using
|Position::nodeAsRangePastLastNode()| instead of |Position::anchorNode()| to
have correct beyond last node in below loop:
Node* beyondLast = end.anchorNode();
for (Node* node = startNode; node != beyondLast;
node = NodeTraversal::next(node)) {
... use |node| ...
}
When |end| is |AfterAnchor| of previous sibling of |startNode|, above loop
doesn't stop.
BUG=619753
TEST=LayoutTests/editing/execCommand/font-size-delta-after-anchor-crash.html
Review-Url: https://codereview.chromium.org/2119083003
Cr-Commit-Position: refs/heads/master@{#403750}
2 files changed