Commit Graph

8561 Commits

Author SHA1 Message Date
Boris Zbarsky
2e09ba1f75 Bug 1377980 part 2. Remove most C++ use of nsIDOMRange. r=mccr8 2018-05-17 12:01:38 -04:00
Boris Zbarsky
40d2bf9d7f Bug 1377980 part 1. Remove use of nsIDOMRange in xpidl. r=mcc8 2018-05-17 12:01:37 -04:00
Makoto Kato
bf208eff66 Bug 1423767 - Splitting node might be orphan. r=masayuki
SplitNodeDeepWithTransaction will split nodes until better point. But
this test case becomes that node is orphan into loop.  So I would like to
add more check whether parent is nothing.

MozReview-Commit-ID: EroSV4uVBVL

--HG--
extra : rebase_source : f594bdf7cd9efac7d10e6e05a8f87dadfc761295
2018-05-16 16:54:20 +09:00
Dorel Luca
0d2ff9e60d Merge mozilla-inbound to mozilla-central. a=merge 2018-05-16 00:54:22 +03:00
Emilio Cobos Álvarez
11794a944d Bug 1461701: Remove nsUpdateType and UPDATE_CONTENT_MODEL. r=smaug
MozReview-Commit-ID: 33iBMZqnkAc
2018-05-15 18:47:16 +02:00
Emilio Cobos Álvarez
cb56e2c9f3 Bug 1459529: Remove UPDATE_STYLE. r=heycam
Now that BeginUpdate is useless for the UPDATE_STYLE case, we don't need the
update mechanism at all. Just ensure that ApplicableStylesChanged is called on
the pres shell via the relevant RuleChanged, etc. notifications.

There's a big hidden gotcha here. nsIDocument::BeginUpdate does put a script
blocker on the stack for these updates. However it's not needed, since no script
can run during these notifications (only the stylesheet events we post for
devtools, but those use AsyncEventDispatcher and PostDOMEvents, so they don't
try to run immediately).

nsIDocument::BeginUpdate also does XBL binding attached queue stuff, but we
can't change bindings during these notifications anyway, so it also doesn't
matter.

MozReview-Commit-ID: HJvK6zQfloh
2018-05-15 18:44:29 +02:00
Emilio Cobos Álvarez
2054320f28 Bug 1459529: Make sheets be associated to a shadow root too potentially. r=bz
MozReview-Commit-ID: Cd8xJuLRY5w
2018-05-15 18:44:25 +02:00
Adrian Wielgosik
3a8ef6cf8a Bug 1460940 - Remove nsIDOMDocument uses in editor/. r=bz
MozReview-Commit-ID: 8doC9drkrG9

--HG--
extra : rebase_source : 24ac8ea960faff10b04ef0f419bc6dc7b6556452
2018-05-11 19:46:15 +02:00
Emilio Cobos Álvarez
5aab8db970 Bug 1408301: Remove getPropertyCSSValue. r=bz
It's been removed for a while on Nightly without any known regressions. This
gives us a full beta cycle of telemetry and two nightly cycles without the API
before shipping.

This only removes the API, followup work will replace serialization by Servo's,
and remove the remaining DOM interfaces.

MozReview-Commit-ID: 2m1taYg5xEr
2018-05-12 11:23:47 +02:00
Cosmin Sabou
a916fb7c3e Merge inbound to mozilla-central. a=merge 2018-05-09 20:27:38 +03:00
Chris Peterson
87ddcb8273 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
--HG--
extra : rebase_source : 9bad9e57e2e0363fb315949ac73b869fac0b9a73
2018-05-08 22:21:22 -07:00
Boris Zbarsky
1fb03996f4 Bug 1387143 part 29. Remove nsISelection. r=mats 2018-05-08 13:52:42 -04:00
Boris Zbarsky
a44e6132ff Bug 1387143 part 28. Remove nsISelection::AsSelection(). r=mats 2018-05-08 13:52:42 -04:00
Boris Zbarsky
b47b72dae9 Bug 1387143 part 23. Remove nsISelection collapse* methods. r=mats 2018-05-08 13:52:41 -04:00
Boris Zbarsky
f992e7ed0d Bug 1387143 part 22. Remove nsISelection isCollapsed/collapsed bits. r=mats 2018-05-08 13:52:39 -04:00
Boris Zbarsky
1ff99d888e Bug 1387143 part 20. Remove nsISelectionPrivate. r=mats 2018-05-08 13:52:38 -04:00
Boris Zbarsky
a36e7f946e Bug 1387143 part 9. Remove nsISelectionPrivate::Get/SetAncestorLimiter. r=mats 2018-05-08 13:52:37 -04:00
Boris Zbarsky
2abc41a969 Bug 1387143 part 8. Remove nsISelectionPrivate::Get/SetInterlinePosition. r=mats 2018-05-08 13:52:37 -04:00
Boris Zbarsky
abdd178705 Bug 1387143 part 7. Move the TABLESELECTION_* constants from nsISelectionPrivate to a TableSelection enum. r=mats 2018-05-08 13:52:36 -04:00
Boris Zbarsky
c4c94974c4 Bug 1387143 part 5. Remove JS use of nsISelectionPrivate. r=mats 2018-05-08 13:52:36 -04:00
Boris Zbarsky
921ee1d522 Bug 1387143 part 4. Stop using nsISelection in remaining xpidl. r=mats 2018-05-08 13:52:36 -04:00
Boris Zbarsky
46cae9462a Bug 1387143 part 3. Stop using nsISelection in nsISelectionController. r=mats 2018-05-08 13:52:36 -04:00
Boris Zbarsky
b23f25078d Bug 1387143 part 1. Stop using nsISelection in nsISelectionListener. r=mats 2018-05-08 13:52:35 -04:00
Masayuki Nakano
92a4e5d234 Bug 1452538 - Add telemetry probes HTMLEditors which have shown Gecko build-in editing UIs and count of user interaction with them r=Ehsan
Gecko has some built-in UIs:
* to edit size of objects like <img>, <table> and absolute positioned elements.
* to edit position of absolute positioned elements.
* to add/remove table columns and rows.

Currently, those UIs are available in both designMode editor and contenteditable
editor only on Gecko.  I.e., the other browsers' users cannot modify as such
without web apps implement such function.  So, for compatibility with the
other browsers, we should hide those UIs by default.  On the other hand, if
this is too risky for backward compatibility, we should not do that.

So, before doing that, we should collect actual usage data of object resizers,
inline table editing UI, positioning UI of absolute positioned elements with
telemetry probes.

This patch adds 3 sets of probes for each UI.  One is percentage of showing
each UI in all instantiated HTMLEditor.  The other is number of user interaction
of each UI in HTMLEditors which has shown the UI.

This patch makes all new probes as "opt-out" because they are really important
data since used for deciding whether those UIs are necessary or unnecessary.

MozReview-Commit-ID: B9Y6GTiCPw6

--HG--
extra : rebase_source : 00e49f31712e24cb269ad3aa65c7d13b7cccb3a5
2018-04-09 17:31:23 +09:00
Dorel Luca
2b4e625186 Backed out changeset b57df5aa1534 (bug 1457813) for conflict after bug 833098 got backed out. CLOSED TREE 2018-05-08 14:49:35 +03:00
Chris Peterson
5a63a12794 Bug 1457813 - Part 3: Remove NS_PRECONDITION definition. r=froydnj
Use fatal MOZ_ASSERT or non-fatal NS_ASSERTION instead.

MozReview-Commit-ID: 1QAsgoWpXDn

--HG--
extra : source : 9ca972b6b3e7d3b576e20a0bf412df51d82aad9f
extra : intermediate-source : a909a9d7bc9a53095e963a4bea45f4fc4aa85b72
2018-04-27 21:42:24 -07:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Boris Zbarsky
323a9a7102 Bug 1457862. Don't forget cellParent until we're done using it in HTMLEditor::GetCellContext. r=masayuki 2018-04-30 21:30:44 -04:00
Makoto Kato
db7992dc59 Bug 1457431 - Devirtualize mozInlineSpellChecker::SpellCheckAfterEditorChange. r=masayuki
It is unnecessary to keep virtual method for
mozInlineSpellChecker::SpellCheckAfterEditorChange, so we should remove virtual
keyword.

MozReview-Commit-ID: 2ry5uhMTFVC

--HG--
extra : rebase_source : ba86bb7c4e47598f83e3869733a238a740cef6b2
2018-04-27 21:11:31 +09:00
Xidorn Quan
f2ba299166 Bug 1448759 part 1 - Make KTableEntry an independent type. r=heycam
MozReview-Commit-ID: oZfJAigThN

--HG--
extra : rebase_source : 6a0efbf40fed8c9eaba7bb3af74d281b536677c8
2018-04-29 21:17:26 +10:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Cosmin Sabou
68fdb6cf4f Merge inbound to mozilla-central. a=merge 2018-04-27 13:04:36 +03:00
Boris Zbarsky
ffa08d7425 Bug 1455674 part 9. Remove nsIDOMElement use from nsIFocusManager. r=qdot 2018-04-26 23:35:19 -04:00
Boris Zbarsky
9e59f290d1 Bug 1455674 part 7. Simplify HTMLEditor::GetFocusedNode. r=masayuki 2018-04-26 23:35:19 -04:00
Boris Zbarsky
42cb3dbf9d Bug 1455674 part 6. Mostly remove use of nsIDOMElement in editor. r=masayuki 2018-04-26 23:35:18 -04:00
Boris Zbarsky
0659ea615e Bug 1455674 part 5. Remove remaining IDL use of nsIDOMElement in editor. r=masayuki 2018-04-26 23:35:18 -04:00
Boris Zbarsky
550b06a56b Bug 1455674 part 4. Stop using nsIDOMElement in nsIHTMLEditor::GetElementOrParentByTagName. r=masayuki 2018-04-26 23:35:18 -04:00
Boris Zbarsky
2348052be1 Bug 1455674 part 3. Stop using nsIDOMElement in nsITableEditor. r=masayuki
The patch is a bit large because all these methods except
SswitchTableCellHeaderType call each other; doing it piecemeal would have
required introducing, then removing, a bunch of QIs.
2018-04-26 23:35:18 -04:00
Boris Zbarsky
aab9f97f4e Bug 1455674 part 2. Mostly stop using nsIDOMElement in nsIHTMLEditor. r=masayuki
MozReview-Commit-ID: Koxv2qS2gft
2018-04-26 23:35:18 -04:00
Boris Zbarsky
c9bcb72283 Bug 1455674 part 1. Stop using nsIDOMElement in nsIEditor. r=masayuki 2018-04-26 23:35:18 -04:00
Boris Zbarsky
dd4506eee2 Bug 1457155. Rename various focus manager variables to make it clearer that they're Elements. r=mccr8 2018-04-26 15:28:31 -04:00
shindli
af700315a1 Backed out 2 changesets (bug 1457155, bug 1457156) for B failures in builds/worker/workspace/build/src/dom/html/HTMLObjectElement.cpp on a CLOSED TREE
Backed out changeset 8b2a6b54336c (bug 1457155)
Backed out changeset 4e267d999797 (bug 1457156)
2018-04-27 01:34:37 +03:00
Boris Zbarsky
25cec96459 Bug 1457155. Rename various focus manager variables to make it clearer that they're Elements. r=mccr8 2018-04-26 15:28:31 -04:00
Emilio Cobos Álvarez
081d926e7b Bug 1457026: Teach nsDocumentEncoder about display: contents. r=mats
MozReview-Commit-ID: 5F3qurRHMNM
2018-04-26 18:06:37 +02:00
Doug Thayer
ce5461c0d3 Bug 887889 - Fix leak in RemoteSpellCheckingEngineChild r=Ehsan
The work to migrate to Sqlite.jsm seems to have caused a timing problem
in our tests where shutdown the content process while this IPC message
is still unresolved. This causes us to destroy RemoteSpellCheckingEngineChild
without it having processed its RecvNotiy..., leading to the promise being
leaked. As far as I can tell this resolves all of our leak issues on try.

MozReview-Commit-ID: GdwVIp5dj1m

--HG--
extra : rebase_source : b7bf5838c53e40b49bea17df123028a2dbd26e5e
2018-04-19 14:33:18 -07:00
Emilio Cobos Álvarez
a1b2e5070a Bug 1455885: Inline and make document casts fatally assert. r=bz
For consistency with AsElement / AsContent / AsDocumentFragment, etc.

MozReview-Commit-ID: 8GSj8R9hLBe
2018-04-26 17:05:12 +02:00
Emilio Cobos Álvarez
8239c1300e Bug 1386840: Defer loading and don't block rendering for non-matching stylesheets. r=bz,heycam
MozReview-Commit-ID: 24UJZDooGmn
2018-04-26 16:44:03 +02:00
Emilio Cobos Álvarez
5f526b4a81 Bug 1455559: Make FromNode work for references. r=bz,Nika
MozReview-Commit-ID: 1ldU1aKeMzs

--HG--
extra : rebase_source : 70a2537ab56d040f33acd84d4fd0c3d9de392198
2018-04-20 11:10:12 +02:00
Masayuki Nakano
552423e58f Bug 1456377 - Move composition event handlers from EditorBase to TextEditor r=m_kato
Currently, EditorBase handles most composition events.  However, only
eCompositionChange event handler is in TextEditor and it's the main event
of handling composition.  Therefore, we should make all composition event
handlers in one place for easier to read, and make them non-virtual.

MozReview-Commit-ID: BYDhiPyGKvo

--HG--
extra : rebase_source : ed9db0f49d7ae268c85359e48015e86584f9c999
2018-04-19 00:31:51 +09:00
Masayuki Nakano
f52e0b206b Bug 1455903 - Make EditorBase::CloneAttributesWithTransaction() set sourceElement to aSourceElement rather than aDestElement r=m_kato
This is simple mistake of bug 1451672.

EditorBase::CloneAttributesWithTransaction() sets both sourceElement and
destElement to aDestElement, but of course, it should set sourceElement to
aSourceElement.

Additionally, this patch adds mozilla specific web-platform tests to check
attribute cloning with basic edit operation.

MozReview-Commit-ID: GM1VjRHG7C3

--HG--
extra : rebase_source : 95427853442454525232df519ce5b5ad7bb12693
2018-04-23 18:02:50 +09:00