In XPCShell tests, this `console` variable ends up being null and it later triggers an assertion
that makes the test crash in debug builds. We should always pass a defined object to this constructor.
MozReview-Commit-ID: F7QRXD15lH9
Depends on D11154
Differential Revision: https://phabricator.services.mozilla.com/D11445
--HG--
extra : moz-landing-system : lando
Even when execCommand("insertorderedlist") and
execCommand("insertunorderedlist") remove existing lists, we need to set
InputEvent.inputType value to "insertOrderedList" or "insertUnorderedList".
Fortunately, the XPCOM method is used only for handling
execCommand("insertorderedlist") and execCommand("insertunorderedlist") on
Firefox. Therefore, we should make it set EditAction to
EditAction::eRemoveOrderedListElement or EditAction::RemoveUnorderedListElement.
Note that comm-central uses this method directly and uses "cmd_removeList"
which causes calling the XPCOM method with empty string. However, input
events for them won't be exposed to the web. Therefore, it's okay to set
EditAction::eRemoveListElement for the other cases.
Differential Revision: https://phabricator.services.mozilla.com/D11439
--HG--
extra : moz-landing-system : lando
Both Chrome and Safari dispatches 2 sets of "beforeinput" and "input" events
when user drag and drop content in same editor. One is "deleteByDrag" and
the other is "insertFromDrop". We need to follow same behavior since
it should be able to cancel only "deleteByDrag" or "insertFromDrop" when
we implement "beforeinput" event.
HTMLEditor::InsertObject() may handle asynchronously. And we don't need to
do anything additionally for HTMLEditor. Therefore, TextEditor::OnDrop()
can delete selection before inserting dropped content by itself.
Therefore, this patch makes TextEditor::OnDrop() call
TextEditor::PrepareToInsertContent() and EditorBase::FireInputEvent() by
itself.
Unfortunately, it seems that we cannot write automated tests for this.
Even if using synthesizeMouse() of EventUtils, synthesizing mouse events
won't generate "dragover" nor "drop" events. Perhaps, like EventUtils.js,
we need to do something with drag service, but it means that we cannot
emulate drag and drop in an editor.
Differential Revision: https://phabricator.services.mozilla.com/D11285
--HG--
extra : moz-landing-system : lando
I also had to make some small changes to relazification for XDR tests for that to pass.
Differential Revision: https://phabricator.services.mozilla.com/D11587
--HG--
extra : moz-landing-system : lando
Only TextEditor::InsertTextAt() and HTMLEditor::DoInsertHTMLWithContext()
removes selected content before pasting from clipboard or inserting dropped
content, and they do same things. Therefore, they can share the code with
a helper method.
Note that this makes each root caller won't return NS_ERROR_EDITOR_DESTROYED
since the destruction is expected by web app.
Differential Revision: https://phabricator.services.mozilla.com/D11284
--HG--
extra : moz-landing-system : lando
All static functions from nsAccessibilityService that were either only called once from the markup map, or are simple one-liners that were only called up to three times, were converted to lambdas in the markup map.
the static function that creates HyperTextAccessibleWrap has remained untouched because it is called a lot from the markup map, even though its implementation is actually just a one-liner.
The other untouched static function is the templated one for html:dt or html:dd.
Differential Revision: https://phabricator.services.mozilla.com/D11458
--HG--
extra : moz-landing-system : lando
This makes sure we don't end up with stale entries with geometry clipped
to the previous mImageBounds on the receiving side.
The update code is duplicated for now but will hopefully be cleaned up
after the blob re-coordination work is done.
Differential Revision: https://phabricator.services.mozilla.com/D11566
--HG--
extra : moz-landing-system : lando
ConvertSampleToAnnexB takes the sample's out of band extradata to prepend it to the data. It was theorically possible that the first sample would contain the SPS/PPS from the previous format.
Depends on D11559
Differential Revision: https://phabricator.services.mozilla.com/D11560
--HG--
extra : moz-landing-system : lando
keyframe was tracked in the CodecChangeMonitor in order to determine when to prepend the SPS/PPS to a sample for decoder using AnnexB format.
The assumption was that it was needed only once per the lifetime of the decoder (and indeed this is true with the Windows and Android decoder). However this causes issue with the Widevine H264 decoder and it will error on some content if the first sample passed following a flush doesn't contain a SPS/PPS.
Interestingly, this issue isn't observed with Netflix content or other Widevine sample videos. Only Amazon PrimeVideo content so far.
We instead use the global MediaChangeMonitor keyframe status that knows when the decoder has been drained or flushed.
Differential Revision: https://phabricator.services.mozilla.com/D11556
--HG--
extra : moz-landing-system : lando
Set markup view lines to use a precise 14px line-height, 16px total height.
Align markup badges more precisely with vertical-align:top and margin-top,
because vertical-align:middle is imprecise and has unwanted side effects.
Differential Revision: https://phabricator.services.mozilla.com/D9993
--HG--
extra : moz-landing-system : lando
In Bug 1479125 we put calls to .children that were intended to access child elements into the custom
method, which is a slower path. We may eventually want to remove itemChildren altogether and just assume
that all children are items, but that's out of scope for a perf fix like this.
Differential Revision: https://phabricator.services.mozilla.com/D10751
--HG--
extra : moz-landing-system : lando
The particular toolchain is somewhat arbitrary, but is what servo uses on master
right now, and is newer than the rust version we use everywhere else, which
wasn't the case.
Differential Revision: https://phabricator.services.mozilla.com/D11574