DescriptionMake VisibleSelection::setWithoutValidation() to handle TextAffinity::Upstream
Before this patch, |VisibleSelection::setWithoutValidation()| assumes it is
always called |m_affinity| == |TextAffinity::Downstream|, however as attached
test case, "/set-without-validation-with-upstream-caret.html", this assumption
is false. |setWithoutValidation()| can be called with
|m_affinity| == |TextAffinity::Upstream|.
This patch makes |VisibleSelection::setWithoutValidation()| to handle in case
of |VisibleSelection::m_affinity| == |TextAffinity::Upstream| case by keeping
invariant only caret selection having |TextAffinity::Upstream|.
BUG=575568
TEST=editing/caret/set-without-validation-with-upstream-caret.html
Committed: https://crrev.com/57ff0386acaed36fc1cfcb86432d53b84d747e36
Cr-Commit-Position: refs/heads/master@{#369363}
Patch Set 1 : 2016-01-14T14:55:53 #
Messages
Total messages: 16 (8 generated)
|