gecko-dev/dom
Masayuki Nakano d4cbc09db8 Bug 1533293 - part 1: Create Selection::SetStartAndEnd() to set new range as far as faster r=smaug
`Selection::Extend()` is too slow because:
- it may create some `nsRange` instances.
- it users `nsContentUtils::ComparePoints()` multiple times.

Therefore, we can improve the performance if we can stop using it in some
places.  First, this patch creates `Selection::SetStartAndEnd()` and
`Selection::SetStartAndEndInLimiter()` for internal use.  They remove
current ranges, reuse `nsRange` instance as far as possible and add new
range which is set by their arguments.  Then, this patch makes
`Selection::SelectAllChildren()` stop using `Selection::Extend()`.  At this
time, this fixes a web-compat issue.  `Selection::Expand()` cannot cross the
selection limiter boundary when there is a limiter (e.g., when an editing host
has focus).  But we can now fix this with using the new internal API.

Note that methods in editor shouldn't move selection to outside of active
editing host.  Therefore, this patch adds `Selection::SetStartAndEndInLimiter()`
and `Selection::SetBaseAndExtentInLimiter()` for them.

Differential Revision: https://phabricator.services.mozilla.com/D23459

--HG--
extra : moz-landing-system : lando
2019-03-18 01:50:59 +00:00
..
abort Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
animation Bug 1533963 - Use a single RestyleHint representation. r=heycam 2019-03-14 11:47:50 +00:00
asmjscache Bug 1526891 - Part 4: Add QuotaManager::IsPrincipalInfoValid checks to all quota clients; r=asuth 2019-02-23 17:03:40 +01:00
audiochannel Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
base Bug 1533293 - part 1: Create Selection::SetStartAndEnd() to set new range as far as faster r=smaug 2019-03-18 01:50:59 +00:00
battery
bindings Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
broadcastchannel Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
browser-element Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
cache Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
canvas Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
chrome-webidl Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
clients Bug 1533066 - replace OptionalIPCClientInfo with IPCClientInfo? in IPDL; r=valentin 2019-03-06 17:57:04 +00:00
commandhandler Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki 2019-03-13 00:43:48 +00:00
console Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
credentialmanagement
crypto Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
encoding Bug 1528651 - Re-enable warnings-as-errors on Windows in some directories. r=dmajor 2019-02-17 15:03:02 +09:00
events Bug 1534562, setPointerCapture should work also in Shadow DOM, r=masayuki 2019-03-14 21:40:19 +02:00
fetch Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
file Bug 1535397 - Part 2 - use native Maybe syntax in place of IPCFileUnion in IDPL; r=baku 2019-03-15 17:09:59 +00:00
filehandle Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
filesystem Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
flex
gamepad Bug 1532411 - Pass a document pointer to nsContentUtils::ShouldResistFingerprinting() callers in the gamepad API; r=baku 2019-03-05 12:42:51 +00:00
geolocation Bug 1525054 - Make ContentPermissionRequestBase calculate the isHandlingUserInput flag itself instead of relying on callers who may or may not pass in the correct information; r=baku 2019-02-04 19:56:48 +00:00
grid
html Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
imptests Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
indexedDB Bug 1535397 - Part 5 - use native Maybe syntax in place of OptionalKeyRange in IDPL; r=baku 2019-03-15 17:39:59 +00:00
interfaces Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
ipc Bug 1528695 - Part 1 : Use referrerInfo in openWindow, cpp file r=smaug 2019-03-15 05:11:43 +00:00
jsurl Merge mozilla-inbound to mozilla-central. a=merge 2019-03-14 18:25:40 +02:00
locales Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
localstorage Bug 1535619 - add meta information to create bugs for files in dom/localstorage/ in 'Core :: DOM: Web Storage' r=janv 2019-03-15 14:01:58 +00:00
manifest Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
mathml Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
media Bug 1535525 - Rename TrackingDummyChannel to ClassifierDummyChannel, r=Ehsan 2019-03-15 18:55:10 +00:00
messagechannel Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
midi Bug 1527505 - Part 9: Make nsIPermissionManager accept ACString arguments for permission types instead of raw C strings; r=nika 2019-02-21 22:54:28 +00:00
network Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
notification Bug 1531097 - Skip notification tests on GeckoView r=gbrown 2019-02-27 20:14:14 +00:00
offline
payments Bug 1525959 - Skip some mochitests tests under GeckoView r=geckoview-reviewers,esawin 2019-02-27 15:01:43 +00:00
performance Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
permission Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
plugins Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
power Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
presentation Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
prio Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
promise Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
prototype Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug 2019-03-09 01:00:23 +00:00
push Bug 1524655 - Remove dom.push.alwaysConnect and connect unconditionally. r=jrconlin,pjenvey 2019-03-14 22:37:51 +00:00
quota Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
reporting Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
res
script Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
security Bug 1534971: Add helper function within CSP to check if two CSPs are equal. r=jkt 2019-03-15 12:20:52 +00:00
serviceworkers Bug 1432325 - Disable test_third_party_iframes.html on android debug for frequent failures r=aryx 2019-03-15 22:23:29 +00:00
simpledb Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink 2019-03-04 15:19:16 -08:00
smil Bug 1343357 - Ignore lower-priority animateMotion if a to-animation is encountered r=dholbert 2019-03-15 01:26:13 +00:00
storage Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 3 - LocalStorage and SessionStorage, r=asuth 2019-03-08 09:00:46 +00:00
svg Bug 1532156 - correct marker-start for closed paths so it is the average of the start and end angles i.e. the same as marker-end r=dholbert 2019-03-16 17:00:23 +00:00
system Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
tests Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
u2f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
url Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
vr Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
webauthn Bug 1528097 : Fix FIDO U2F support on Windows 10 19H1/20H1 Insider builds r=keeler,jcj 2019-03-04 20:07:24 +00:00
webbrowserpersist Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
webgpu Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
webidl Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
websocket Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
workers Bug 1530223 - Guard RemoteWorkerChild's shared data with a mutex r=perry,asuth 2019-03-14 20:19:18 +00:00
worklet Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
xbl Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
xhr Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
xml Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan 2019-03-08 09:04:11 +00:00
xslt Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
xul Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki 2019-03-13 00:43:48 +00:00
jar.mn
moz.build Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00