gecko-dev/dom
Masayuki Nakano db32271cec Bug 1540029 - part 2: Get rid of TextEditRules::DocumentIsEmpty() and HTMLEditRules::DocumentIsEmpty() r=m_kato
`TextEditRules::DocumentIsEmpty()` is a wrapper of `TextEditor::IsEmpty()` so
that we can get rid of it simply.

`HTMLEditRules::DocumentIsEmpty()` needs to change.  It's oddly checks only
`EditorBase::mPaddingBRElementForEmptyEditor` is `nullptr` or not.  However,
the editor may be completely empty.  And the result may be different from
`TextEditor::IsEmpty()` which is not overridden by `HTMLEditor`.  For partially
solving this issue, this patch makes `HTMLEditor` overrides `IsEmpty()` and
optimizes `TextEditor::IsEmpty()`.

With this change, the caller of `HTMLEditRules::DocumentIsEmpty()` may behave
differently in the only caller, `HTMLEditor::SelectEntireDocument()`.  And
unfortunately, its root called from `SelectAllCommand::DoCommand()`.  However,
it does just collapse `Selection` into the root element (`<body>` or
`Document.documentElement`) if it returns `true`.  Therefore, this change
must be safe since anyway `SelectionRefPtr()->SelectAllChildren()` with
the root element is exactly same as `SelectionRefPtr()->Collapse()` with
the empty root element if it's truly empty.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 06:58:06 +00:00
..
abort Backed out 22 changesets (bug 1231213) for Browser-chrome failures on /workers/remoteworkers/RemoteWorkerChild.cpp 2019-08-15 01:04:46 +03:00
animation Bug 1541705 - Factor out functionalities for obsversing animation style counts into testcommon.js. r=boris 2019-09-12 08:08:20 +00:00
audiochannel Bug 1579588 - part2 : create media controller for media element only. r=chunmin 2019-09-12 23:13:04 +00:00
base Backed out 21 changesets (bug 1578327, bug 1575448, bug 1580091, bug 1576554, bug 1581049, bug 1576551, bug 1578329, bug 1576555) for platform.cpp related bustage CLOSED TREE 2019-09-17 10:16:14 +03:00
battery
bindings Bug 1581414 - Don't report deprecation warnings after diverging from the recording, r=mccr8. 2019-09-16 13:33:43 +00:00
broadcastchannel
browser-element Bug 1574915 - Fix useless try-catch issues in dom/. r=hsivonen 2019-08-19 17:02:54 +00:00
cache Bug 1581127 - Add IsShuttingDown checks to DOM Cache origin initialization; r=asuth 2019-09-13 16:43:30 +00:00
canvas Bug 1561046 - remove android_version == '19' from test manifests r=gbrown 2019-09-13 14:12:27 +00:00
chrome-webidl Bug 1575306 - Suppress reporting of uncaught testing sentinel, r=bzbarsky. 2019-09-16 20:17:17 +00:00
clients Bug 1556489 - P23 - Only create new ClientSource objects in the content, but use the recreated info from redirects in the parent. r=asuth 2019-09-03 10:19:53 +10:00
commandhandler Bug 1574627 - Fix some "disbaled" typos. DONTBUILD r=njn 2019-08-16 23:23:05 +00:00
console Bug 1578623 move principal-related data from LoadInfo to WorkletImpl r=baku 2019-09-09 00:42:05 +00:00
credentialmanagement
crypto
debugger
docs Bug 1580907 - Remove transferables attribute for SendAsyncMessage and SendQuery in JSWindowActor; r=nika 2019-09-13 16:51:23 +00:00
encoding Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
events Bug 1547063 - fuzz for SharedFTFace. r=jfkthame 2019-09-16 16:46:12 +00:00
fetch Bug 1580082. Align Response constructor IDL with spec. r=baku 2019-09-11 11:06:58 +00:00
file Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
filehandle
filesystem
flex Bug 1563163 Part 1: Make Flex::Flex gracefully handle frames without FlexContainerInfo structures. r=mats 2019-08-30 23:16:09 +00:00
gamepad Bug 1579492 - Check if nullptr in DarwinGamepadService::ReportChangedCallback(). r=baku 2019-09-09 11:58:01 +00:00
geolocation Backed out changeset 493061169650 (bug 1529591) for build bustages on nsGeolocation.cpp. CLOSED TREE 2019-09-09 17:35:39 +03:00
grid Bug 1308587 Part 1 - Manually remove "-moz" prefixed multi-column properties in some tests. r=dholbert 2019-09-05 21:32:05 +00:00
html Bug 1540029 - part 2: Get rid of TextEditRules::DocumentIsEmpty() and HTMLEditRules::DocumentIsEmpty() r=m_kato 2019-09-17 06:58:06 +00:00
imptests Bug 1556637 - Replace all mozDumpDebugInfo calls r=jya,jib 2019-08-14 20:32:31 +00:00
indexedDB Bug 1580195 - Exclude calls of open(name, {}) and open(name) from telemetry. r=ttung,asuth 2019-09-13 16:55:13 +00:00
interfaces Bug 1580710: Expose functionality on the CSP Object to allow skipping the inline style checks. r=bzbarsky 2019-09-16 23:47:19 +00:00
ipc Bug 1579765 - Don't overwrite redirect timings when we convert DocumentChannel to a real channel. r=mayhemer 2019-09-16 07:22:32 +00:00
jsurl
l10n Bug 1580991 - Trigger DOMLocalization::OnChange from Localization::Observe. r=smaug 2019-09-13 10:08:26 +00:00
locales Bug 1529068 - Implementation of the navigate-to CSP directive as defined in CSP Level 3. r=ckerschb,mccr8 2019-09-10 22:33:51 +00:00
localstorage Bug 1576260 - Make LSValue initialization fallible; r=asuth 2019-09-14 05:33:01 +00:00
manifest Bug 1575140 - Manifest ImageResource sizes should be an array r=baku 2019-08-21 10:29:16 +00:00
mathml Bug 1579602 - Rename nsMathMLElement to dom::MathMLElement. r=bzbarsky 2019-09-13 16:27:54 +00:00
media Backed out 21 changesets (bug 1578327, bug 1575448, bug 1580091, bug 1576554, bug 1581049, bug 1576551, bug 1578329, bug 1576555) for platform.cpp related bustage CLOSED TREE 2019-09-17 10:16:14 +03:00
messagechannel Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku 2019-09-02 11:22:27 +00:00
midi
network Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku 2019-09-02 11:22:27 +00:00
notification Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
offline
payments Bug 1580496 - Return NS_ERROR_FAILURE while getting nullptr PaymentRequestChild for PaymentRquest r=baku 2019-09-17 07:49:52 +00:00
performance Backed out 21 changesets (bug 1578327, bug 1575448, bug 1580091, bug 1576554, bug 1581049, bug 1576551, bug 1578329, bug 1576555) for platform.cpp related bustage CLOSED TREE 2019-09-17 10:16:14 +03:00
permission
plugins Bug 1580282 - Remove checks for plugins that are part of extensions and support for loading plugins from the app and profile dir, r=mconley,mixedpuppy 2019-09-12 23:15:49 +00:00
power
presentation Bug 1571466 - Cleanup unnecessary ESLint global definitions. r=mossop 2019-08-19 07:11:56 +00:00
prio
promise Bug 1575306 - Suppress reporting of uncaught testing sentinel, r=bzbarsky. 2019-09-16 20:17:17 +00:00
prototype Bug 1575620 - Fix refreshing session restore when using prototype cache. r=smaug 2019-09-06 20:27:09 +00:00
push Backed out changeset a956d11fef6e (bug 1369436) for XPCshell failure on dom/push/test/xpcshell/test_notification_http2.js 2019-09-13 00:42:28 +03:00
quota Bug 1581127 - Add IsShuttingDown checks to DOM Cache origin initialization; r=asuth 2019-09-13 16:43:30 +00:00
reporting Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
res
script Bug 1568171. Fix handling of load events if document.open() is called while async scripts are still loading for the original pageload. r=smaug 2019-09-10 20:43:56 +00:00
security Bug 1580710: Expose functionality on the CSP Object to allow skipping the inline style checks. r=bzbarsky 2019-09-16 23:47:19 +00:00
serviceworkers Bug 1581072 - Removing skip-if = fission for testing fission r=perry 2019-09-16 21:11:57 +00:00
simpledb Bug 1563023 - Part 3: Change client usage type to support the null value; r=asuth 2019-08-22 20:52:09 +00:00
smil Bug 1574222 - Serialize getComputedStyle on text-decoration properly. r=emilio,dholbert 2019-09-10 21:52:26 +00:00
storage Bug 1570644 - Part 1: Fix a regression caused by bug 1556812; r=asuth 2019-08-19 10:24:39 +02:00
svg Bug 1579181 - Don't keep <use> shadow trees which we know we'll never render. r=longsonr 2019-09-15 16:09:28 +00:00
system Bug 1576465. Fix nsDeviceSensors's cross-origin check for Fission. r=kmag 2019-09-10 10:33:13 +00:00
tests Backed out changeset 3af4309ffce7 (bug 1237782) for wpt assertions/leaks. CLOSED TREE 2019-09-17 01:03:46 +03:00
u2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku 2019-09-02 11:22:27 +00:00
url
vr Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
webauthn Bug 1573245 - Change AuthenticatorTransport to be string, not enum r=bzbarsky,keeler 2019-09-17 07:50:44 +00:00
webbrowserpersist Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-08-13 07:15:25 +00:00
webgpu
webidl Bug 1573245 - Change AuthenticatorTransport to be string, not enum r=bzbarsky,keeler 2019-09-17 07:50:44 +00:00
websocket Bug 1579820 - Handle window.open() from remote subframes. r=nika 2019-09-10 09:04:17 +00:00
workers Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
worklet Bug 1578623 use an opaque origin for WorkletGlobalScope r=baku 2019-09-09 00:42:01 +00:00
xbl Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki 2019-09-06 17:10:40 +00:00
xhr Bug 1532933 - Enable ESLint for dom/xhr (automatic changes). r=Standard8,baku 2019-09-16 07:01:07 +00:00
xml Bug 1575620 - Fix refreshing session restore when using prototype cache. r=smaug 2019-09-06 20:27:09 +00:00
xslt Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
xul Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki 2019-09-06 17:10:40 +00:00
jar.mn
moz.build Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj 2019-08-21 12:25:42 +00:00