Граф коммитов

10386 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 4f347077a1 Bug 1696378 - Fuzz other test annotation.
MANUAL PUSH: Sheriffs mentioned this failure afterwards.
2021-03-05 02:41:03 +01:00
Kagami Sascha Rosylight e9a7261412 Bug 1360715 - Part 3: Remove remaining cross-context instanceof from tests r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106663
2021-03-04 22:03:58 +00:00
Brindusan Cristian b926d96be6 Backed out 3 changesets (bug 1360715) for mochitest failures at test_WebCrypto.html. CLOSED TREE
Backed out changeset b4a14c42313d (bug 1360715)
Backed out changeset 0e4b1b65fcbe (bug 1360715)
Backed out changeset fb8b9841d82b (bug 1360715)
2021-03-04 21:15:16 +02:00
Kagami Sascha Rosylight 7bec866ac5 Bug 1360715 - Part 3: Remove remaining cross-context instanceof from tests r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106663
2021-03-04 15:05:27 +00:00
Masayuki Nakano 3b20d0d64b Bug 1655508 - Add crashtest (the bug itself was fixed by bug 1517028) r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D106873
2021-03-02 06:38:38 +00:00
Masayuki Nakano 5e6dccb510 Bug 1517028 - Make `HTMLEditor::SplitNodeDeepWithTransaction` not try to split non-splittable node and `HTMLEditor::HandleInsertParagraphInHeadingElement` check its result r=m_kato
There are 2 bugs.  One is that `SplitNodeDeepWithTransaction` tries to split
comment node, but it fails.  The other is, the failure result is not checked
by `HandleInsertParagraphInHeadingElement`.  Therefore, the original head
element's previous node may not be a heading element.

Depends on D106591

Differential Revision: https://phabricator.services.mozilla.com/D106620
2021-03-02 00:51:05 +00:00
Makoto Kato b1cd4c6075 Bug 1675779 - Update browserscope for contenteditable=false case. r=masayuki
browserscope is no longer maintained, so contenteditable=false case is
incorrect now. So I would like to update this tests for non editable case.

Differential Revision: https://phabricator.services.mozilla.com/D96299
2021-02-22 10:18:49 +00:00
Makoto Kato 6d173e8282 Bug 1675779 - HandleDeleteAtomicContent should handle non-editable text node. r=masayuki
Since `WSScanResult` can return non-editable/non-removable text node,
`HandleDeleteAtomicContent` is called with non editable text node, then it cannot
remove atomic content.

This fix doesn't follow other block case such as added newer test.

Differential Revision: https://phabricator.services.mozilla.com/D96298
2021-02-22 10:18:48 +00:00
Kagami Sascha Rosylight 717d5d2aa5 Bug 1671768 - Part 4: Use MOZ_CAN_RUN_SCRIPT for Selection::RemoveAllRanges r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D103780
2021-02-03 21:52:48 +00:00
Kagami Sascha Rosylight 0ea5caf27e Bug 1671768 - Part 3: Use MOZ_CAN_RUN_SCRIPT for Selection::SelectAllChildren r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D103779
2021-02-03 21:52:22 +00:00
Masayuki Nakano ef60f67cc9 Bug 1103374 - Add simple automoated test for arrow key navigation in vertical editable content r=jfkthame
Now, we can write a test for the situation with synthesized key events.

Differential Revision: https://phabricator.services.mozilla.com/D102882
2021-02-02 03:05:01 +00:00
Masayuki Nakano a25988774a Bug 1685491 - part 5: Move the code remapping arrow keys in vertical content to `NativeKeyBindings` r=smaug,jfkthame
Currently, this feature is implemented only on Linux and macOS (see also
bug 1077515 and bug 1301497), and the code is really similar each other.
Additionally, it always tries to query selection to check whether the caret is
in vertical content or not if arrow keys are pressed.  For avoiding a lot of
query, this patch makes `TextEventDispatcher` cache writing mode at every
selection change notification.  However, unfortunately, it's not available when
non-editable content has focus, but it should be out of scope of this bug since
it requires a lot of changes.

Anyway, with this patch, we can write a mochitest only on Linux and macOS.
The following patch adds a test for this as a fix of bug 1103374.

Differential Revision: https://phabricator.services.mozilla.com/D102881
2021-02-02 03:29:31 +00:00
Masayuki Nakano 9b750e79a1 Bug 1685491 - part 2: Fix all new oranges caused by the previous patch r=smaug
Applying default edit action for some shortcut keys on Linux and macOS
causes some oranges.  The new failure reasons are:
* The keyboard events are consumed in the bubbling phase of the system
group if editor has focus (`EditorEventListener` or `TextInputListener`
does it).
* No key combinations are mapped to per-word move or select on macOS.
* Home/End keys on macOS do not change selection.

Therefore, this adjusts each failure case for the new behavior.

Differential Revision: https://phabricator.services.mozilla.com/D102878
2021-02-02 03:02:53 +00:00
Tom Schuster d0d823f729 Bug 1689827 - Remove length parameter from JS callers of setTransferData. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103555
2021-02-01 12:05:12 +00:00
Emilio Cobos Álvarez 5f5ca653cb Bug 1689868 - Add a fuzzy annotation for input-text-notheme-onfocus-reframe.html if using the non-native-theme. 2021-02-01 12:32:47 +01:00
Emilio Cobos Álvarez b9b4fc2acc Bug 1689871 - Ensure non-native resizers are loaded in test_bug629172.html r=masayuki
The issue is that the test was depending on the native resizers (or on a
previous test having loaded the non-native ones).

The first snapshot will not have resizers (because we just started the
load of the SVG) and thus following snapshots would fail.

Wait for the load event and pre-show the ltr textarea, so that the
resizer is known loaded.

This doesn't happen without the non-native theme because that uses
native resizers which don't depend on the image load.

Differential Revision: https://phabricator.services.mozilla.com/D103591
2021-02-01 02:36:41 +00:00
Jonathan Kew 8dc5b5c351 Bug 1663816 - Disable async font fallback for spell-checker tests. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D103183
2021-01-27 18:39:34 +00:00
Cameron McCormack b77842bf22 Bug 1687868 - Annotate fuzziness in reftest with the non-native theme enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D102884
2021-01-26 10:38:14 +00:00
Noemi Erli a99af52366 Backed out changeset 6495f98f94e0 (bug 1687868) for causing reftest failures CLOSED TREE 2021-01-26 03:53:49 +02:00
Cameron McCormack 15ed3bf857 Bug 1687868 - Annotate fuzziness in reftest with the non-native theme enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D102884
2021-01-25 22:56:12 +00:00
Mihai Alexandru Michis f2fe4465be Bug 1663816 - Disable test_bug1205983.html and test_bug697981.html on windows and linux. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D102853
2021-01-25 17:59:25 +00:00
Masayuki Nakano 1a7d5b3f13 Bug 1664969 - Disable async font list initialization under editor/libeditor/tests r=m_kato,jfkthame
According to the debug log and result on tryserver, the frequency of this
test failure becomes higher is caused by bug 1676966.  When global reflow
is kicked during dragging the grabber, the implicit capture is released
forcibly.  Fortunately, editor behavior shouldn't depend on font list
loading system, so, disabling the feature until fixing bug 1688430 is fine.

Differential Revision: https://phabricator.services.mozilla.com/D102889
2021-01-25 10:19:12 +00:00
Makoto Kato d8cdbc5ec4 Bug 1687167 - Move IME handling guide to source tree. r=masayuki DONTBUILD
https://developer.mozilla.org/en-US/docs/Mozilla/IME_handling_guide is
archived content now, So we should move this to
https://firefox-source-docs.mozilla.org/.

Also, I have updated mActionHint and Android section.

Differential Revision: https://phabricator.services.mozilla.com/D102118
2021-01-19 06:07:27 +00:00
Henri Sivonen e9ebba30d8 Bug 1682950 - Skip test_sanitizer_on_paste.html in headless mode. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D101338
2021-01-13 11:30:50 +00:00
Masayuki Nakano 8907ec27b0 Bug 1357365 - part 7: Make `TypeInState::OnSelectionChange` stop keeping link style for new inserting content after content around a link edge is deleted r=m_kato
This is same behavior as the other browsers.  When selection is collapsed to
a edge of a link after deletion, we should stop applying link style to new
inserted content.

Differential Revision: https://phabricator.services.mozilla.com/D101006
2021-01-13 01:56:05 +00:00
Masayuki Nakano 900311e687 Bug 1357365 - part 6: Make `TypeInState::OnSelectionChange()` stop keeping link style when selection is not collapsed and the range is not entirely in a link r=m_kato
When selection is not collapsed and is across link element boundary, we can
assume that user does not try to modify the link text because the other
browsers behave so.  Therefore, we should take the same behavior in this case.

Note that all the new failures of `editing/run/inserttext.html` are passed
only on Gecko.  So, it should be updated in another bug.

Differential Revision: https://phabricator.services.mozilla.com/D101005
2021-01-13 01:55:48 +00:00
Masayuki Nakano 269faceec3 Bug 1357365 - part 5: Make `TypeInState::OnSelectionChange` stop keeping link style for new inserting content when selection is changed by JS r=m_kato,edgar
This is the most important situation.  If selection is collapsed to a edge of a
link, the other browsers does not insert new content into the link.  So, from
the point of view of web developers, this cause should work exactly same as
the other browsers.

Note that the new failures in `editing/run/inserttext.html` are passed only
on Gecko.  So, the test should be updated after fixing this bug.

Differential Revision: https://phabricator.services.mozilla.com/D101004
2021-01-13 01:55:40 +00:00
Masayuki Nakano b12d5c9e83 Bug 1357365 - part 4: Make `TypeInState` stop keeping link style when selection change command is performed, but it didn't change selection r=m_kato,edgar
When caret is not moved but selection change command is fired, it means that
the caret is already set to start or end of editing host.  In this case, we
should stop keeping link style for new inserting content because otherwise,
user cannot exit from the first or last link with arrow keys.

Differential Revision: https://phabricator.services.mozilla.com/D101003
2021-01-13 01:55:32 +00:00
Masayuki Nakano 201d289381 Bug 1357365 - part 3: Make `TypeInState::OnSelectionChange()` stop keeping link style if caret is positioned at edge of a link element and not moved in the link r=m_kato,edgar
Although different from the other browsers' behavior, our traditional behavior
might be better than them because the behavior on the other browser does not
allow users to insert new content at start nor end of a link.

However, we can relax more about keeping traditional behavior for web-compat.
Perhaps, only when caret is moved from the other side of first or last character
in the link and moves caret to the edge of the link with arrow key, we should
allow users to modify the link text.

Otherwise, e.g., `Home` and `End` key press should make it stop keeping the
link style.  This helps advanced users who are familiar with keyboard navigatin
in editor.

Note that this patch also changes the condition which checks
`aReason & nsISelectionListener::KEYPRESS_REASON` to check also
`nsISelectionListener::COLLAPSETO_START_REASON` and
`nsISelectionListener::COLLAPSETO_END_REASON` because all of them are
set by `nsFrameSelection::MoveCaret` exclusively.
https://searchfox.org/mozilla-central/rev/a0ccd492719b1ad2106f6456549be62a76f45acb/layout/generic/nsFrameSelection.cpp#738,741,745
Therefore, they should be treated as same as a key press.

Note that they are also set by `Selection::CollapseToStart` and
`Selection::CollapseToEnd` too.  But a following patch will add a new
reason to notify selection listeners of caused by JS.  So, the problem
will be fixed by the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D101002
2021-01-13 01:55:29 +00:00
Masayuki Nakano 4b218fc374 Bug 1357365 - part 2: Make `TypeInState::OnSelectionChange()` stop inserting new content into the link if clicked outside it r=m_kato
When mouse button is clicked outside a link element but caret is positioned
start or end of the link, our traditional behavior keeps inserting new content
into the link.  But this is different from the other browsers, and it does
not make sense to treat such selection change is intended to keep typing in
the link element.

Therefore, this patch makes `TypeInState::OnSelectionChange()` handle
selection change reason is `mousedown` and `mouseup` cases.  However,
it cannot know whether the event was fired in the parent link element or
not.  Therefore, this patch makes `HTMLEditorEventListener` notifies
`TypeInState` of mouse events via `HTMLEditor`.

Differential Revision: https://phabricator.services.mozilla.com/D101001
2021-01-13 01:55:27 +00:00
Masayuki Nakano 0028b2127b Bug 1357365 - part 1: Rename `HTMLEditor::OnMouseDown()`, `HTMLEditor::OnMouseUp()` and `HTMLEditor::OnMouseMove()` r=m_kato
They were designed for object resizer and grabber to move absolutely positioned
element.  Therefore, they should have better name to explain what they do.
Then, we can create event listener methods for generic cases.

Differential Revision: https://phabricator.services.mozilla.com/D100999
2021-01-13 01:54:17 +00:00
Masayuki Nakano aca200577d Bug 1357365 - part 0-1: Make `test_typing_at_edge_of_anchor.html` test both on `contenteditable` and `designMode` r=m_kato
Currently, the test checks the result only in `contenteditable`, but I'd be
better to do same tests in `designMode` editor too.

Additionally, for detecting regressions of the following patches, it should
check the result of 2nd typing too because inserting text into end of a link
element may cause unlink it.

Differential Revision: https://phabricator.services.mozilla.com/D100997
2021-01-13 01:53:46 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Daniel Holbert ac4480af11 Bug 1685231: Fix the typo "ot" in various code-comments (to "to", "of", or "not"). r=mccr8
DONTBUILD because this is a comment-only change and hence doesn't affect
behavior at all.

I ran across this typo in nsPageFrame.cpp, and figured I might as well grep for
it and fix it more comprehensively. And while I'm at it, I also fixed some
neighboring instances of a duplicated word around a linebreak, in
nsXMLContentSerializer.h.

Differential Revision: https://phabricator.services.mozilla.com/D100852
2021-01-06 04:54:51 +00:00
Andi-Bogdan Postelnicu b6b336c821 Bug 1683534 - Make `editor` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100206
2021-01-04 14:18:50 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Masayuki Nakano 5599ddec3c Bug 1683226 - part 3: Get rid of pathes for handling plugin from `IMEStateManager`, `IMEContentObserver` and `ContentEventHandler` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D100102
2020-12-21 05:52:49 +00:00
Masayuki Nakano d27602eee6 Bug 1683226 - part 1: Make `IMEState::Enabled` an enum class r=m_kato,geckoview-reviewers
Before deleting `IMEState::Enabled::PLUGIN`, let's make it an enum class
for making the change safer.  Almost all of this change is done by
"replace" of VSCode.

Differential Revision: https://phabricator.services.mozilla.com/D100100
2020-12-21 05:52:03 +00:00
Emilio Cobos Álvarez 039592f4d8 Bug 1682003 - Avoid UTF-8 -> UTF-16 conversion during CSSOM serialization. r=heycam
This lifts a bunch of string conversions higher up the stack, but allows
us to make the servo code use utf-8 unconditionally, and seemed faster
in my benchmarking (see comment 0).

It should also make a bunch of attribute setters faster too (like
setting .cssText), now that we use UTF8String for them (we couldn't
because we couldn't specify different string types for the getter and
setters).

Differential Revision: https://phabricator.services.mozilla.com/D99590
2020-12-17 14:04:35 +00:00
Henri Sivonen 97959884fc Bug 1666300 test - Test SVG style sanitization on paste. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93634
2020-11-18 17:18:56 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Makoto Kato 832ca9a3d8 Bug 1671764 - Part 2. Respect application/system locale if language code is matched. r=masayuki
When we don't match exactly dictionary name with `lang` attribute, we look for
language name. When looking for language name (ex. en/fr etc), we don't
consider the priority by application/system locale. So if lang=en, it may be
selected by character order. Most case is that en-GB is always selected if it
is installed.

We should respect application/system locale if language name is matched to
current content language before random selection.

Depends on D99336

Differential Revision: https://phabricator.services.mozilla.com/D99337
2020-12-14 03:01:08 +00:00
Makoto Kato ddeba05428 Bug 1671764 - Part 1. Use ACString for dictionary language instead. r=masayuki
Actually, our locale service doesn't use UTF-16 for locale name and it will
be ASCII. Although dictionary name of spell checker is locale/language name,
it still uses UTF-16. To use locale API, I should replace it with `ACString`.

Differential Revision: https://phabricator.services.mozilla.com/D99336
2020-12-14 03:01:05 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Emilio Cobos Álvarez b1964fa19a Bug 1682006 - Don't call Truncate() on the return string in GetPropertyValue. r=xidorn
Turns out this causes a bit of overhead when appending to an AutoString,
because Truncate() calls SetToEmptyBuffer(), which makes it go from
inline-string to buffer string, and next time we append we need to turn
the string from a buffer-based string to an inline string again, which
is some minor, but measurable, work, while profiling some
micro-benchmarks.

Probably we should make Truncate() a no-op for a zero-length string, but
I'll send that separately.

Differential Revision: https://phabricator.services.mozilla.com/D99493
2020-12-12 12:06:06 +00:00
Kagami Sascha Rosylight 8aba7414f7 Bug 1680167 - Part 6: Use RefPtr for nsFocusManager in editor r=masayuki
Depends on D98628

Differential Revision: https://phabricator.services.mozilla.com/D98629
2020-12-03 21:35:20 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke f15895390e Bug 1673931 - Avoid including Element.h from header files.
Differential Revision: https://phabricator.services.mozilla.com/D96535

Depends on D96534
2020-11-23 16:08:40 +00:00