author Jim Chen <nchen@mozilla.com>
Wed, 19 Jul 2017 14:29:59 -0400
changeset 418394 b7909eddfe2659a1d02afe4f416b28a2a21c0b28
parent 369155 2e262535fc7358975b86240798c75cf624f39870
permissions -rw-r--r--
Bug 1351170 - 2. Notify selection listeners after adjusting range offsets; r=smaug `nsRange` registers mutation observers to adjust the range when content changes. However, there are some cases where we adjust the start and/or end offsets but don't notify selection listeners (i.e. we don't call `nsRange::DoSetRange` to set the new range points, contrary to what the comment above `nsRange::DoSetRange` says). This patch makes us call `nsRange::DoSetRange` in those cases. The patch adds a testcase in test_selectevents.html, and changes a few unexpected-pass cases in test_composition_text_querycontent.xul that this patch fixed. MozReview-Commit-ID: 73D8RYMS3MS

# Checks run by clang-tidy over Mozilla code.

# The following checks are currently enabled:
# * modernize-raw-string-literal -
#     Replace string literals containing escaped characters with raw string literals
# * modernize-use-bool-literals
#     Replace integer literals which are cast to bool
# * modernize-loop-convert
#     Converts for(...; ...; ...) loops to use the new range-based loops in C++11
# * modernize-use-default
#     Replace default bodies of special member functions with = default;
# * modernize-use-override
#     Use C++11's override and remove virtual where applicable

Checks:          '-*, modernize-raw-string-literal, modernize-use-bool-literals, modernize-loop-convert, modernize-use-default, modernize-use-override'