This patch adds some space after the menu button in the toolbar, which
makes things a lot better on MacOS and I noticed a small improvement on
Windows too.
Differential Revision: https://phabricator.services.mozilla.com/D158138
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.
As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).
For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.
For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.
Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.
Differential Revision: https://phabricator.services.mozilla.com/D157875
The main thread is always displayed first,
then we display all content process targets (sorted by PID number),
and we end up with worker targets (sorted alphabetically).
This should follow the same order as the js context selector.
Differential Revision: https://phabricator.services.mozilla.com/D155336
Override GetFrameName() for BRFrame so that frame tree dump shows `BR(br)`
rather than `Frame(br)`.
Also, expand nsLineBox::StateToString() in List() to get rid of `cbuf`.
Differential Revision: https://phabricator.services.mozilla.com/D158111
Remove `virtual` for methods already having `override`. Remove `explicit` for
the constructor because it has two parameters.
Differential Revision: https://phabricator.services.mozilla.com/D158109
Convert all imports but the one related to SessionDataHelper
as that's an hybrid module which is loaded as a JSM from the main thread,
but loaded as a common js module from the worker thread.
We will be able to drop this once we can migrate this JSM to ESM
once we support loading ESM from the worker thread.
Differential Revision: https://phabricator.services.mozilla.com/D158007
This might have only be useful from the source actor.
In workers, you don't have access to Cu, so nor have access to Cu.reportError.
Otherwise from the main thread, you can safely use Cu.reportError.
In couple of places I'm removing the usage of reportError.
Hopefully throwing an exception is enough to get the error displayed!
Differential Revision: https://phabricator.services.mozilla.com/D157909
Unfortunately, it's hard to split this (and similar) patch because we need to
touch `MoveNodeResult` itself for making it available as the ok type of
`Result`. However, I guess that it's not so hard to investigate regression
point if something would be found later because `MoveNodeResult` is mainly
used by deletion which is the most complicated part of `HTMLEditor`, but
`MoveNodeResult` is used only in a few cases.
Differential Revision: https://phabricator.services.mozilla.com/D157574
kk -> fb5e622c57a8c364c4db0e36f0766c4599b85dc1
ko -> e90d42d902a61ea21e0e574d4c7ea2d533392215
lo -> f1807fe2dffcfb11beaa858f29a95bdaaf9843ec
ru -> 06d6bf5c7adb54c67fb9e9f8c27d1af973d2fd3d
sk -> 90ac720f20704cfa61508e9c4dcf4759009fe30a
te -> f48eb7c14603a7405827af48b2ac9ad3c7b84460
tg -> aa0b52b88e19005289dd9ed663e8bdf980fe7544
zh-TW -> ac94972630881d0d61900aecfbe8952e386cfbd9
This is a hack for compatibility with the other browsers. When we move first
line of `<pre>` to left paragraph whose `white-space` style does not make it
preformatted, they drop the last linefeed because of unnecessary.
Differential Revision: https://phabricator.services.mozilla.com/D157419
It splits inline elements at the destination of first line in the right block.
However, it typically creates empty inline elements before the right block and
may be never used because it sets the insertion point to before the right node
of the splitting.
Therefore, it should stop creates empty inline elements (if they are required,
they should be created in `HTMLEditor::MoveNodeOrChildrenWithTransaction`
instead) and adjust split point after the element if it didn't split any nodes.
Differential Revision: https://phabricator.services.mozilla.com/D157418
When the first line of right block element is moved before the block element,
unnecessary line break may be moved to immediately before the right block
element. In the case, it needs to clean it up instead of trying to find
unnecessary line break at end of the left block which is a container of the
right block element.
Differential Revision: https://phabricator.services.mozilla.com/D157417
Empty inline nodes except non-container nodes are not required in the
destination paragraph. Therefore, it should just remove the node from the
DOM tree.
Differential Revision: https://phabricator.services.mozilla.com/D157416
We don't ignore invisible data node at joining 2 paragraphs and this is
a different behavior from the other browsers. When looking for a content
from current block boundary, `AutoBlockElementsJoiner` should keep scanning
visible things with ignoring invisible data nodes. Then, it should delete
all invisible things after joining the paragraphs.
Differential Revision: https://phabricator.services.mozilla.com/D157414
Chrome and Safari preserve `white-space` with `style` attribute to keep
collapsible or preserved white-spaces as-is. If an HTML element is moved,
`style` attribute should be set to it. Otherwise, create `<span>` element
whose `style` attribute has the declaration for `white-space` and move
content into it.
Differential Revision: https://phabricator.services.mozilla.com/D157413
Gecko just joins 2 blocks when editable block parents are same element, e.g.,
both are `<div>`. However, Chrome and Safari moves only first line of the
right block into the left block, and Gecko does it when both blocks are
different elements.
Ideally, we should take same behavior as Chrome and Safari because it's
reasonable for both compatibility with the other browsers and consistency
when both blocks are different but has same style, then we don't need to
maintain different behavior paths.
However, doing it for all elements are too risky because right block will be
merged into left block if right block has no line break. On the other hand,
without doing it, preserving `white-space` is really hard because we need to
maintain the both paths.
Therefore, I'd like to change the behavior only when both blocks have different
`white-space` styles. Usually, web apps do not change `white-space` for each
block, so I think that this is safer than doing this in all elements,
additionally, we can revert the behavior easy since this patch is really small.
Differential Revision: https://phabricator.services.mozilla.com/D157412
This fixes bug 503838 partially. The new utility method scans unnecessary
`<br>` with strict check as far as possible. Then, we can delete the node or
the preformatted line break at end of the last text node.
Differential Revision: https://phabricator.services.mozilla.com/D157411
This patch ports most part of `editor/libeditor/tests/test_bug772796.html` to
WPT because this kind of behaviors are not tested by `editing/run/delete.html`
nor `editing/run/forwarddelete.html`. (Not ported tests are invalid HTML
structure cases and list item cases, the reason why not doing this for the
latter is, it needs a lot of cases and not important for most web apps.)
The most expectations are based on Chrome and Safari (they both behave almost
same), but they fail a lot in `join-pre-and-other-block.html` and
`white-space: pre-line` cases in the other tests.
Even though this ports a lot of cases, for making easier to compare the
behavior change in the following patches, we should keep the tests.
Differential Revision: https://phabricator.services.mozilla.com/D157410
This gecko integration code is better managed with the other devtools platform
hook code. To simplify resolving the JSM and avoiding issues around restricted
use of eval in chrome, I also reset the DIST_SUBDIR config and run the xpcshell
tests without a firefox-appdir. The test works on Android these days, so
re-enable it on that platform.
Differential Revision: https://phabricator.services.mozilla.com/D157522
When we move this out of the js/ directory, a number of lint exceptions stop
applying so we should just fix the issues now.
Differential Revision: https://phabricator.services.mozilla.com/D157521
Use 'globalThis' instead of 'this' when trying to attach a debugger to the
current global to avoid subtle footguns with the varied definitions of 'this'.
The debugger interface needs a true GlobalObject so this is much clearer. In
particular, this is a problem in test_nativewrappers.js when the test runs in
strict mode since the 'this' in the test function is no long implicitly the
global.
Differential Revision: https://phabricator.services.mozilla.com/D157544