Commit Graph

9793 Commits

Author SHA1 Message Date
Masayuki Nakano
2135d8a449 Bug 1625633 - part 1: Encapsulate WSFragment::mRightType r=m_kato
It means why the `WSFragment` ends by.  I.e., it tells next content type of
the fragment.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 09:13:49 +00:00
Arthur Iakab
7e869be20c Backed out changeset 5e89020502f7 (bug 1625834) for causing build bustages
CLOSED TREE
2020-04-01 04:32:11 +03:00
Chris Peterson
b469a9d9db Bug 1625834 - Replace MOZ_MUST_USE with [[nodiscard]] in editor. r=masayuki
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 06:45:40 +00:00
Emilio Cobos Álvarez
bf84528d4f Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D68586

--HG--
extra : moz-landing-system : lando
2020-03-30 17:20:06 +00:00
Cosmin Sabou
0f415974f2 Backed out 2 changesets (bug 1098151) for refrest failures on overflow.html. CLOSED TREE
Backed out changeset 1893ec9ff2de (bug 1098151)
Backed out changeset 66e5251cc1e2 (bug 1098151)
2020-03-30 19:10:13 +03:00
Emilio Cobos Álvarez
0bd5a5bb55 Bug 1098151 - Make the test a bit more forgiving to pass on Mac, like the following test.
MANUAL PUSH: Fix orange.

CLOSED TREE
2020-03-30 18:03:10 +02:00
Emilio Cobos Álvarez
f846b9b159 Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D68586

--HG--
extra : moz-landing-system : lando
2020-03-30 13:50:04 +00:00
Masayuki Nakano
fc75118988 Bug 1618091 - Make editor dispatch beforeinput event when Document.execCommand() is called by addon r=smaug
Discussion in
* https://github.com/w3c/input-events/issues/91
* https://github.com/w3c/editing/issues/200

Web developers must want to handle `beforeinput` events which are caused by
addons because addon's behavior is exactly same as default action of browser
from point of view of web apps.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 01:47:53 +00:00
Simon Giesecke
d3deabac64 Bug 1613363 - Maybe<T> should preserve trivial copy-constructability and destructability of T. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68173

--HG--
extra : moz-landing-system : lando
2020-03-27 14:22:51 +00:00
Masayuki Nakano
46be890959 Bug 1623913 - Make WSRunObject::PrepareToDeleteRangePriv() invalidate child of mScanStartPoint before reusing it r=m_kato
I give up to write a clean patch for this bug with current design.  The trigger
is indeed bug 1618089, but this is a hidden regression of bug 1530649.

Starting from bug 1530649, `WSRunObject` started to use `EditorDOMPoint` for
storing the specified point.  And it may store (or only store) child node.
Therefore, if it points a text node and it's removed by
`WSRunObject::DeleteRange()`, the point becomes invalid even if its offset
is still valid.  Therefore, we should make `mStartScanPoint` and `mEndScanPoint`
forget their child before DOM tree change ideally, but it means that we need
to compute offset of the child every time before changing the DOM tree.  We
cannot accept this safest approach due to performance reason.

Therefore, this patch just invalidates `mStartScanPoint`'s child node only when
it's reused after the DOM tree is modified.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 05:53:22 +00:00
Masayuki Nakano
0ccabd567d Bug 1620504 - part 23: Fix some inconsistent coding style in editor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D67132

--HG--
extra : moz-landing-system : lando
2020-03-22 10:46:39 +00:00
Masayuki Nakano
0fdd700a75 Bug 1620504 - part 22-9: Clean up warnings in HTMLTableEditor.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D67131

--HG--
extra : moz-landing-system : lando
2020-03-22 09:17:31 +00:00
Dan Glastonbury
04870fc980 Bug 1623562 - Refactor allowPlugins to use BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D67428

--HG--
extra : moz-landing-system : lando
2020-03-20 04:53:43 +00:00
Narcis Beleuzu
66477aeb36 Backed out changeset 20f1bb2d5bd2 (bug 1623562) for bc failures. CLOSED TREE 2020-03-20 05:42:41 +02:00
Masayuki Nakano
74a2dd84e9 Bug 1620504 - part 22-8: Clean up warnings in HTMLStyleEditor.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D67130

--HG--
extra : moz-landing-system : lando
2020-03-19 12:48:42 +00:00
Dan Glastonbury
d15761b621 Bug 1623562 - Refactor allowPlugins to use BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D67428

--HG--
extra : moz-landing-system : lando
2020-03-20 02:16:12 +00:00
Masayuki Nakano
5c3bb8caf1 Bug 1620504 - part 22-7: Clean up warnings in HTMLInlineTableEditor.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66986

--HG--
extra : moz-landing-system : lando
2020-03-19 12:29:51 +00:00
Emilio Cobos Álvarez
04828e3a4a Bug 253870 - Make disabled form controls selectable. r=masayuki,MarcoZ
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.

This matches the behavior of other browsers as far as I can tell.

Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 13:18:16 +00:00
Masayuki Nakano
5de3c1b41d Bug 1620504 - part 22-6: Clean up warnings in HTMLEditorObjectResizer.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66985

--HG--
extra : moz-landing-system : lando
2020-03-19 11:38:42 +00:00
Mirko Brodesser
c602e0e0d7 Bug 1623333: part 4) Assert Selection's type is eNormal in relevant methods accessing mFrameSelection. r=smaug
Helps to determine which methods of `nsFrameSelection` are intended to
be called only for the `eNormal` Selection.

Driven by the idea that state of `nsFrameSelection` relevant only for
the `eNormal` Selection should later move to a `NormalSelection` class.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 11:08:58 +00:00
Mirko Brodesser
1c4dcdbce9 Bug 1623333: part 3) Assert EditorBase::SelectionRefPtr has type eNormal. r=masayuki
Simplifies reasoning about it.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 10:40:10 +00:00
Masayuki Nakano
1f9bbb50d0 Bug 1620504 - part 22-5: Clean up warnings in HTMLEditorDataTransfer.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66984

--HG--
extra : moz-landing-system : lando
2020-03-19 07:38:19 +00:00
Masayuki Nakano
d7d4de3f48 Bug 1620504 - part 22-4: Clean up warnings in HTMLEditSubActionHandler.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66983

--HG--
extra : moz-landing-system : lando
2020-03-19 04:23:31 +00:00
Kagami Sascha Rosylight
90a7b434c7 Bug 1542521 - Join blocks with empty elements in between r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D67076

--HG--
extra : moz-landing-system : lando
2020-03-18 15:42:05 +00:00
Masayuki Nakano
6de9c5bcef Bug 1620504 - part 22-3: Clean up warnings in HTMLAnonymousNodeEditor.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66981

--HG--
extra : moz-landing-system : lando
2020-03-18 12:43:40 +00:00
Masayuki Nakano
ba0909ed8b Bug 1620504 - part 22-2: Clean up warnings in HTMLAbsPositionEditor.cpp r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66980

--HG--
extra : moz-landing-system : lando
2020-03-18 06:06:22 +00:00
Emilio Cobos Álvarez
664a546418 Bug 1618260 - Fix number input so that it honors overflow-clip-box-block. r=mats
This never worked, but it's more visible with the new form controls which have
more padding.

Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.

This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 09:21:44 +00:00
Masayuki Nakano
87dc9fcfe5 Bug 1620504 - part 22-1: Clean up warnings in HTMLEditor.cpp and HTMLEditor.h r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66979

--HG--
extra : moz-landing-system : lando
2020-03-18 02:02:17 +00:00
Masayuki Nakano
9c977f38b7 Bug 1620504 - part 21: Clean up warnings in TextEditor r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66852

--HG--
extra : moz-landing-system : lando
2020-03-18 01:14:42 +00:00
Sean Feng
8af0b53201 Bug 1377999 - Make DocumentFragment to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57707

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:46 +00:00
Makoto Kato
3399b1e3a5 Bug 1621827 - Skip spellchecker reftests on Android. r=masayuki
Actually GeckoView turns off spellchekcer, so it is unnecessary to run reftests
for spellchecker on GeckoView.

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

--HG--
extra : moz-landing-system : lando
2020-03-12 09:37:25 +00:00
Masayuki Nakano
0913d9141d Bug 1620504 - part 20: Clean up warnings in SelectionState and related classes r=m_kato
This changes a lot of arguments from pointer to reference.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 09:57:58 +00:00
Mihai Alexandru Michis
58bc354025 Backed out changeset 9eeee9ec66d9 (bug 253870) for causing failures in browser_bug1261299.js
CLOSED TREE
2020-03-16 22:32:41 +02:00
Emilio Cobos Álvarez
9f28f89085 Bug 253870 - Make disabled form controls selectable. r=masayuki,MarcoZ
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.

This matches the behavior of other browsers as far as I can tell.

Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 17:41:07 +00:00
Emilio Cobos Álvarez
a490bfb50c Bug 1620778 - Fix interaction of up/down keys with autocomplete and <input type=number>. r=masayuki,smaug
Differential Revision: https://phabricator.services.mozilla.com/D66011

--HG--
extra : moz-landing-system : lando
2020-03-16 15:50:31 +00:00
Ciure Andrei
032b6f7c89 Backed out 2 changesets (bug 1620778) for causing test_autocomplete_mac_caret.xhtml failures
Backed out changeset 66f97d1cf94a (bug 1620778)
Backed out changeset eda75d901f4c (bug 1620778)
2020-03-15 16:04:36 +02:00
Emilio Cobos Álvarez
749ef068e9 Bug 1620778 - Fix interaction of up/down keys with autocomplete and <input type=number>. r=masayuki,smaug
Differential Revision: https://phabricator.services.mozilla.com/D66011

--HG--
extra : moz-landing-system : lando
2020-03-15 12:11:09 +00:00
Masayuki Nakano
53e6bfdbf2 Bug 1620504 - part 19: Clean up warnings in WSRunScanner and WSRunObject r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66227

--HG--
extra : moz-landing-system : lando
2020-03-14 00:03:31 +00:00
Mirko Brodesser
ec9cb4d8ef Bug 1622199: annotate Selection::AddRangeAndSelectFramesAndNotifyListeners with MOZ_CAN_RUN_SCRIPT. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D66759

--HG--
extra : moz-landing-system : lando
2020-03-13 15:46:13 +00:00
Masayuki Nakano
03baeb9f3d Bug 1620504 - part 18: Clean up warnings in SplitNodeTransaction r=m_kato
Depends on D66179

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

--HG--
extra : moz-landing-system : lando
2020-03-11 06:13:26 +00:00
Masayuki Nakano
476081f03e Bug 1620504 - part 17: Clean up warnings in PlaceholderTransaction r=m_kato
Additionally, this makes some `nsIAbsorbingTransaction` methods infallible for
reducing unnecessary warnings.

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

--HG--
extra : moz-landing-system : lando
2020-03-11 02:11:52 +00:00
Masayuki Nakano
5343ffcff8 Bug 1620504 - part 16: Clean up warnings in JoinNodeTransaction r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66178

--HG--
extra : moz-landing-system : lando
2020-03-10 14:20:22 +00:00
Masayuki Nakano
b4e1588a17 Bug 1620504 - part 15: Clean up warnings in InsertTextTransaction r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66177

--HG--
extra : moz-landing-system : lando
2020-03-10 14:23:48 +00:00
Masayuki Nakano
605bafef7b Bug 1620504 - part 14: Clean up warnings in InsertNodeTransaction r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66176

--HG--
extra : moz-landing-system : lando
2020-03-10 14:17:53 +00:00
Masayuki Nakano
8371d74f49 Bug 1620504 - part 13: Clean up warnings in editor/txmgr r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D66175

--HG--
extra : moz-landing-system : lando
2020-03-10 13:59:36 +00:00
Masayuki Nakano
9c836ea324 Bug 1620504 - part 12: Clean up warnings in EditorEventListener r=m_kato
Depends on D65877

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

--HG--
extra : moz-landing-system : lando
2020-03-10 07:54:29 +00:00
Ehsan Akhgari
a96ff3afcf Bug 848644 - Add a crashtest based on the test case for the bug
Differential Revision: https://phabricator.services.mozilla.com/D66256

--HG--
extra : moz-landing-system : lando
2020-03-10 16:43:26 +00:00
Ehsan Akhgari
e23c47bb28 Bug 745494 - Add a crashtest based on the test case for the bug
Differential Revision: https://phabricator.services.mozilla.com/D66254

--HG--
extra : moz-landing-system : lando
2020-03-10 16:28:57 +00:00
Masayuki Nakano
96f81476ca Bug 1620504 - part 11: Clean up warnings in editor command classes r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D65877

--HG--
extra : moz-landing-system : lando
2020-03-10 04:34:15 +00:00
Masayuki Nakano
0e68df00a5 Bug 1620504 - part 10: Clean up warnings in EditorBase r=m_kato
Depends on D65875

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:57:24 +00:00