Right now CreateDataFromPrimitive doesn't use the aDataLen parameter, and after this change the out
value should be the same as the value passed in, as long as we are dealing with strings.
Differential Revision: https://phabricator.services.mozilla.com/D10718
--HG--
extra : moz-landing-system : lando
The previous |if (data)| check is not quite the same as !data.IsEmpty(), because
the previous code just checked if the do_QueryInterface failed, but not if the resulting
string is empty.
Differential Revision: https://phabricator.services.mozilla.com/D10438
--HG--
extra : moz-landing-system : lando
Large clipboard data (in nsTransferable) in content processes is no
longer stored in a temporary file, but kept in memory.
Differential Revision: https://phabricator.services.mozilla.com/D10336
Keep our old 'progressbar' as an alias for now, but unship
'progresschunk' by restricting it to UA/chrome sheets only.
Unship 'progresschunk-vertical' by removing it since it's
not used internally for anything.
This patch re-enables the new behavior of bug 1479964, to set keyCode or
charCode of keypress event whose value is zero to the other's non-zero value.
However, some web apps are still broken with the new behavior. Therefore,
this patch adds a blacklist to keep using our legacy behavior in some specific
web apps.
Note that Google Docs, Gmail and Remember The Milk are reported as broken.
However, I don't see any broken shortcut with Gmail. Therefore, this patch
adds only Google Docs and Remeber The Milk into the blacklist.
Differential Revision: https://phabricator.services.mozilla.com/D10322
--HG--
extra : moz-landing-system : lando
If we already queued some synchronize replies, we should queue any
additional replies so that we don't prematurely reply to an event that
has not finished processing yet.
Also add delay for synchronize replies when a `OnImeUpdateComposition`
call is being processed.
Differential Revision: https://phabricator.services.mozilla.com/D9850
Currently we make a sync call from the child process to the parent
process to retrieve the IGeckoEditableParent instance. However, that can
lead to deadlocks when a11y code makes parent-to-child async calls at
the same time. This patch makes the call async to avoid the deadlock.
Differential Revision: https://phabricator.services.mozilla.com/D10663
During a session transfer, update existing GeckoEditableChild instances
in the parent and child processes to use the new GeckoEditableParent
instance that corresponds to the new session. If the GeckoEditableChild
has focus, take additional steps to make sure the GeckoEditableParent
receives current input context and focus information.
Differential Revision: https://phabricator.services.mozilla.com/D8996
Set the default GeckoEditableChild from C++, so we can keep the same
GeckoEditableChild instance across session transfers, and only have a
different GeckoEditableParent instance after each transfer.
Differential Revision: https://phabricator.services.mozilla.com/D8995
This commit attempts to lower the pain of modifying FrameMetrics.h.
It looks like most includes really only want ViewID or
ScrollableLayerGuid, so this commit factors them out into a separate
header. In the process FrameMetrics::ViewID is changed to
ScrollableLayerGuid::ViewID, which personally seems like a better
place for it now that we have RepaintRequest. Unfortunately that
requires a lot of places to be updated.
After this commit there are still a couple of major places that
FrameMetrics is included.
* nsDisplayList.h
* nsIScrollableFrame.h
* Layers.h
Those are going to be more tricky or impossible to fix so they're
not in this commit.
Differential Revision: https://phabricator.services.mozilla.com/D10722
--HG--
rename : gfx/layers/FrameMetrics.h => gfx/layers/ScrollableLayerGuid.h
rename : gfx/layers/FrameMetrics.h => gfx/layers/ZoomConstraints.h
extra : rebase_source : 29ac79f91460a181bf7437af5c371207e22858e2
extra : source : c2e70e531075493fc6e374dcec862827f0bc6e77
A wrapper for ::GetModuleFileNameW() is needed in multiple places for the
purpose of evaluating and processing untrusted DLLs. This adds the appropriate
wrapper to WinUtils.cpp
Depends on D6240
Differential Revision: https://phabricator.services.mozilla.com/D9163
--HG--
extra : moz-landing-system : lando
Bug 1435827 part 3/9: Add WinUtils::PreparePathForTelemetry;r=aklotz
PreparePathForTelemetry encapsulates our method of removing sensitive
information from file paths for use in telemetry payloads.
SanitizePath() has been essentially renamed to PreparePathForTelemetry()
which is a bit more precise now that it's being used externally.
Untrusted modules evaluation requires a few path transformations to happen at
various places during processing. This is largely because APIs like
GetLongPathNameW can be rather slow, so performance becomes an issue.
That is the justification for breaking out path transformations into separate
wrapper functions and also the need for PathFlags.
Differential Revision: https://phabricator.services.mozilla.com/D6240
--HG--
extra : moz-landing-system : lando
This exposes Gecko networking to GeckoView apps. It includes speculative connections, name resolution, and a Fetch-like HTTP API.
Differential Revision: https://phabricator.services.mozilla.com/D7799
squash to executor
Content process of Android uses sync IPC when initializing LookAndFeel. But
current e10s has LookAndFeel cache for start up of content process.
So we should use it, then remove sync IPC for start up performance
Differential Revision: https://phabricator.services.mozilla.com/D9750
--HG--
extra : moz-landing-system : lando
This combines some of your ideas from D8074, in which I think is quite a big improvement to the overall code.
The code for nsTransferable::GetTransferData, especially nsIFlavorDataProvider is a bit wonky, because I tried to preserve the current behavior.
Differential Revision: https://phabricator.services.mozilla.com/D9599
--HG--
extra : moz-landing-system : lando
This combines some of your ideas from D8074, in which I think is quite a big improvement to the overall code.
The code for nsTransferable::GetTransferData, especially nsIFlavorDataProvider is a bit wonky, because I tried to preserve the current behavior.
Differential Revision: https://phabricator.services.mozilla.com/D9599
--HG--
extra : moz-landing-system : lando
We already have a check for the nvidia vendor id in gfxPlatform.cpp so
we don't need to list all the other vendors explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D9677
--HG--
extra : moz-landing-system : lando
When clicking toast notification window, OnActivate is called. When using
Windows 8, 2nd parameter (IInspectable) might be nullptr.
So when this parameter is nullptr, it should recognize as alertclickcallback
with mClickable=true.
Differential Revision: https://phabricator.services.mozilla.com/D8076
--HG--
extra : moz-landing-system : lando
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window
according to its position on the display. This change is to move implementation to the nsIWidget derived classes.
We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we
need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented
in nsBaseWidget.
Differential Revision: https://phabricator.services.mozilla.com/D7290
--HG--
extra : moz-landing-system : lando
We currently allow the GPU process if we are not hardware accelerated. One of the
reasons we might not use hardware acceleration is because the device vendor is
not in the gfxInfo whitelist. In this case, we should be consistent and still
use the GPU process.
Differential Revision: https://phabricator.services.mozilla.com/D9446
--HG--
extra : moz-landing-system : lando
This also includes implementation of nsNativeThemeCocoa::GetWidgetAutoColor
which should have been done in bug 1464722 actually.
Differential Revision: https://phabricator.services.mozilla.com/D8629
--HG--
extra : moz-landing-system : lando
Running clang-format makes this code at least a bit more pleasant to look at.
Differential Revision: https://phabricator.services.mozilla.com/D8074
--HG--
extra : moz-landing-system : lando
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window
according to its position on the display. This change is to move implementation to the nsIWidget derived classes.
We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we
need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented
in nsBaseWidget.
Differential Revision: https://phabricator.services.mozilla.com/D7290
--HG--
extra : moz-landing-system : lando
Because the root resolution is conceptually at the parent/child process
boundary, when sending mouse events from child to the parent, we need to
apply that resolution to the mouse coordinates.
Differential Revision: https://phabricator.services.mozilla.com/D8993
--HG--
extra : moz-landing-system : lando
Our implementation of this method was removed in bug 1070710. I forgot to remove the declaration in that bug.
Differential Revision: https://phabricator.services.mozilla.com/D7947
--HG--
extra : moz-landing-system : lando
I verified that we can still copy from Firefox to an older version of Firefox without this patch.
LibreOffice also still works. Talking to some GTK people on IRC they are also happy about UTF-8 instead of wrongly declared UCS2.
Differential Revision: https://phabricator.services.mozilla.com/D8467
--HG--
extra : moz-landing-system : lando
This was separate because at some point in the past we were calling
-[ChildView drawRect:inContext:] from a separate draw-in-titlebar pass. That separate
pass was removed in bug 676241.
Depends on D7929
Differential Revision: https://phabricator.services.mozilla.com/D7931
--HG--
extra : moz-landing-system : lando
I don't think anybody has made use of this code in years.
Depends on D7927
Differential Revision: https://phabricator.services.mozilla.com/D7928
--HG--
extra : moz-landing-system : lando
This override was intended to ignore unnecessary nsChildView::Invalidate calls
when using main thread OpenGL. With OMTC, Gecko no longer calls Invalidate in
those cases, it just composites on the compositor thread, and the widget's main
thread code doesn't really hear about it. So this workaround is no longer necessary.
Depends on D7925
Differential Revision: https://phabricator.services.mozilla.com/D7927
--HG--
extra : moz-landing-system : lando
The main thread layer manager is always NONE, BASIC or CLIENT. It is never OPENGL anymore.
Main-thread OpenGL rendering was removed in bug 924403.
Depends on D7924
Differential Revision: https://phabricator.services.mozilla.com/D7925
--HG--
extra : moz-landing-system : lando
This was an experiment before we had e10s. It's no longer needed.
Depends on D7922
Differential Revision: https://phabricator.services.mozilla.com/D7924
--HG--
extra : moz-landing-system : lando
Many years ago, Gecko would sometimes call nsChildView::Invalidate during drawRect:.
This is no longer the case: Widget invalidations now only happen outside of drawRect,
usually from a refresh tick or from viewWillDraw.
Differential Revision: https://phabricator.services.mozilla.com/D7922
--HG--
extra : moz-landing-system : lando
I verified that we can still copy from Firefox to an older version of Firefox without this patch.
LibreOffice also still works. Talking to some GTK people on IRC they are also happy about UTF-8 instead of wrongly declared UCS2.
Differential Revision: https://phabricator.services.mozilla.com/D8467
--HG--
extra : moz-landing-system : lando
This patch makes Firefox's GTK3 platform support use GtkFileChooserNative when
available. GtkFileChooserNative transparently uses the desktop portals
interface, which enables Firefox to use native Qt file dialogs on KDE, or
sandboxed file dialogs in Flatpak.
Differential Revision: https://phabricator.services.mozilla.com/D7033
--HG--
extra : moz-landing-system : lando
I verified that we can still copy from Firefox to an older version of Firefox without this patch.
LibreOffice also still works. Talking to some GTK people on IRC they are also happy about UTF-8 instead of wrongly declared UCS2.
Differential Revision: https://phabricator.services.mozilla.com/D8467
--HG--
extra : moz-landing-system : lando
It seems some touchscreen devices are recognized as an HID not a mouse, so
for such devices we need to use GUID_DEVINTERFACE_HID instead.
I've confirmed that WM_DEVICECHANGE is received when a mouse is
connected/disconnected on a Thinkpad even if we use GUID_DEVINTERFACE_HID here.
Differential Revision: https://phabricator.services.mozilla.com/D8526
--HG--
extra : moz-landing-system : lando
This is based on patch by Mike Conley (:mconley)
The left/right toolbox placement can be adjusted later as we know at toolkit level where the buttons are
so we can set border/padding accordingly.
Depends on D8529
Differential Revision: https://phabricator.services.mozilla.com/D8549
--HG--
extra : moz-landing-system : lando
It just doesn't work.
We add the preference media.wmf.force.allow-p010-format to force enable it.
Depends on D8136
Differential Revision: https://phabricator.services.mozilla.com/D8310
--HG--
extra : moz-landing-system : lando
Using gtk_targets_include_text actually leads to a small behavior difference,
because gtk_targets_include_text also includes text/plain.
But gtk_selection_data_set_text seems to correctly convert UTF-8 to plain text.
Differential Revision: https://phabricator.services.mozilla.com/D8283
--HG--
extra : moz-landing-system : lando
This patch makes Firefox's GTK3 platform support use GtkFileChooserNative when
available. GtkFileChooserNative transparently uses the desktop portals
interface, which enables Firefox to use native Qt file dialogs on KDE, or
sandboxed file dialogs in Flatpak.
Differential Revision: https://phabricator.services.mozilla.com/D7033
--HG--
extra : moz-landing-system : lando
EventStateManager needs to handle middle click paste without editor.
Therefore, the handler should be in EventStateManager.
Differential Revision: https://phabricator.services.mozilla.com/D7852
--HG--
extra : moz-landing-system : lando
nsNativeThemeWin.cpp has a lot of warnings at build time. They hides preceding
errors and warning due to too many. This patch avoids the warnings with:
- adding |default| case of each |switch| statement with widget type.
- removing unused overload of ScaleForFrameDPI().
Differential Revision: https://phabricator.services.mozilla.com/D8055
--HG--
extra : moz-landing-system : lando
Because of that the isPrimary of mouse pointer events will always be
true. So, we suppress other events that have isPrimary as false when
fingerprinting resistance is enabled.
Depends on D6003
Differential Revision: https://phabricator.services.mozilla.com/D6004
--HG--
extra : moz-landing-system : lando
The main benefit of doing this is that if semi-transparent colors are
specified on scrollbar-color, they can blend natively with underlying
content. This may match authors' expectation better.
Differential Revision: https://phabricator.services.mozilla.com/D7154
--HG--
extra : moz-landing-system : lando
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window
according to its position on the display. This change is to move implementation to the nsIWidget derived classes.
We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we
need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented
in nsBaseWidget.
Differential Revision: https://phabricator.services.mozilla.com/D7290
--HG--
extra : moz-landing-system : lando
PuppetWidget::StartPluginIME() calls TabChild::SendStartPluginIME()
with given WidgetKeyboardEvent instance. Then, the keyboard event
will be marked as "posted to remote process" by
ParamTraits<mozilla::WidgetEvent>::Write(). However, the method
sends back the keyboard event to the main process synchronously.
So, we don't want the event is treated as "posted" since the
flag is used to check whether current process handles posted event
*before* the remote process or not.
So, PuppetWidget::StartPluginIME() should restore the cross process
dispatching state with calling
WidgetEvent::ResetCrossProcessDispatchingState(). Unfortunately,
this also clears propagation state of the event too if the event
has already been posted to a remote process and is waiting reply
from the remote process. This shouldn't occur in content
process, however, we should check it with MOZ_ASSERT() for
detecting regressions.
Differential Revision: https://phabricator.services.mozilla.com/D7579
--HG--
extra : moz-landing-system : lando
QueryFullProcessImageNameW may fail in some environments when dwFlags is zero
due to NT-to-DOS path conversions. CreateFile will convert the argumant back to
an NT path anyway.
--HG--
extra : source : 54778cf89825c24f656fcf8ebcef5aa3bf4e6839
extra : intermediate-source : b40d295b3c43d5cffa453bc0536af2bada4eeac2
Based on a patch from Marco Pesenti Gritti (11 years ago)
Depends on D7407
Differential Revision: https://phabricator.services.mozilla.com/D7408
--HG--
extra : moz-landing-system : lando
The assertion was reasonable check before fixing bug 1446401. However,
this is currently valid situation in UI Events spec.
Differential Revision: https://phabricator.services.mozilla.com/D7578
--HG--
extra : moz-landing-system : lando
Synthesizing keyboard events is dangerous and such API is requested only by
fuzzing test. So, we should add it into FuzzingFunctions which is built
only when |ac_add_options --enable-fuzzing| is specified and enabled by
the pref.
This patch implements the API as synthesizing keyboard events in the focused
widget and the synthesized events are propagated as native key events except
APZ (because keyboard events are synthesized only in the process). This
behavior allows to test including any default action handlers such as
EventStateManager and setting WidgetGUIEvent::mWidget since some C++ handler
checks if it's nullptr.
Differential Revision: https://phabricator.services.mozilla.com/D5516
--HG--
extra : moz-landing-system : lando
We need to port synthesizeKey() of EventUtils.js to FuzzingFunctions. So,
its helper function, _guessCodeFromKeyName() in EventUtils.js needs to be
accessible from FuzzingFunctions. Therefore, we need to reimplement it
with C++ and make it accessible via nsITextInputProcessor for EventUtils.js
for making easier to maintain.
This patch moves _guessCodeFromKeyName() into TextInputProcessor and
WidgetKeyboardEvent. Non-printable key part of _guessCodeFromKeyName() is
moved to WidgetKeyboardEvent::ComputeCodeNameIndexFromKeyNameIndex() because
of not depending on active keyboard layout. On the other hand, printable
key part needs to assume that active keyboard layout is en-US keyboard layout.
Therefore, it's moved to
TextInputProcessor::GuessCodeValueOfPrintableKeyInUSEnglishKeyboardLayout()
because any Core code shouldn't refer it as utility method for keeping that
we're i18n-aware.
Differential Revision: https://phabricator.services.mozilla.com/D5514
--HG--
extra : moz-landing-system : lando
Unfortunately there is no realiable way to tell whether there is no mouse
connected or not. So we are going to take a heuristic way here. The way is
that;
1) Count mouse type devices with SetupDiEnumDeviceInterfaces [1]
2) If the count is 1 and if the system is used as tablet or has a touch device,
the device should be COARSE
This way causes a misrecognition as if there is a mouse device in the case
where the touchscreen is disabled on the tablet even if there is no mouse
connected (i.e. the case where CountMouseDevices() returns 1 and the system
is on table mode). We will try to fix the misrecognition in a later bug
(bug 1495938).
[1] https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdienumdeviceinterfaces
Differential Revision: https://phabricator.services.mozilla.com/D7565
--HG--
extra : moz-landing-system : lando
Unfortunately there is no realiable way to tell whether there is no mouse
connected or not. So we are going to take a heuristic way here. The way is
that;
1) Count mouse type devices with SetupDiEnumDeviceInterfaces [1]
2) If the count is 1 and if the system is used as tablet or has a touch device,
the device should be COARSE
This way causes a misrecognition as if there is a mouse device in the case
where the touchscreen is disabled on the tablet even if there is no mouse
connected (i.e. the case where CountMouseDevices() returns 1 and the system
is on table mode). We will try to fix the misrecognition in a later bug
(bug 1495938).
[1] https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdienumdeviceinterfaces
Differential Revision: https://phabricator.services.mozilla.com/D7565
--HG--
extra : moz-landing-system : lando
Make LayerViewSupport, NPZCSupport, GeckoEditableSupport, and
SessionAccessibility use the new disposal mechanism to ensure the
disposal is performed safely.
Differential Revision: https://phabricator.services.mozilla.com/D7110
--HG--
extra : moz-landing-system : lando
Add a new mechanism in NativePtr::Detach to safely dispose objects. A
new disposer Runnable is passed to OnDetach functions. The OnDetach
functions invoke the disposer after changing the object state. The
disposer then makes sure the object hasn't been attached to another
native object in the meantime. Disposal is only performed when the
current native object matches the original one.
Differential Revision: https://phabricator.services.mozilla.com/D7109
--HG--
extra : moz-landing-system : lando
Create a new native handle first before deleting any old ones, so we can
be sure the new handle would not have the same value as the old handle,
which can confuse our code.
Differential Revision: https://phabricator.services.mozilla.com/D7107
--HG--
extra : moz-landing-system : lando
Calls to do_QueryInterface to a base class can be replaced by a static
cast, which is faster.
Differential Revision: https://phabricator.services.mozilla.com/D7224
--HG--
extra : moz-landing-system : lando
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.
Differential Revision: https://phabricator.services.mozilla.com/D6861
--HG--
extra : moz-landing-system : lando
If we do not pass the high quality scaling flag than the resulting surface will be marked as cannot substitute, which is not accurate, so we don't want.
The only place that actually tries to be smart about the size is nsImageFrame::MaybeDecodeForPredictedSize. All other cases just ask for the intrinsic size.
The two most likely cases are that there are no decoded copies of the image, or there is one decoded (or in progress) copy of the image.
In the first case we will request decode at the instrinsic size, and then if we draw at a different size that draw will request the proper size. This doesn't change with this patch.
In the second case there is a decoded copy already available, this is likely from a draw call on the image, and that is the surface size that we want. So we save a decode. If we are actually drawing the image at two different sizes the second size will be slightly delayed, but we have the wrongly sized copy of the image that we can draw until then. This seems like a good tradeoff to avoid always decoding an instrinic size copy of images.
This saves one word per static atom, per process.
The `nsGkAtoms` change is only a small part of this commit.
In regen_atoms.py:
- There is now only one link name per platform: nsGkAtoms::sAtoms[].
- But there is a new constant per atom, giving the index into
nsGkAtoms::sAtoms[].
- And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using
the index constant.
- A couple of `*mut` pointers are now `*const`.
Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are
necessary to avoid link errors, presumably due to some template instantiation
wrinkle.
--HG--
extra : rebase_source : 629642e708c8bc6e27d6057beae5f35955fdd837
Since some filesystems do not support FileIdInfo, we can't assume that it will
succeed even on Windows 8 or later.
--HG--
extra : source : 00c79940244f7a57d77db186996533cd5589c4ea
Gtk+ sets .left/.right classes to GtkBox element at GtkHeaderBar according to button placement (left/right).
We don't support that now so set .left at least to be compatible with themes - BlueMenta for instance.
Differential Revision: https://phabricator.services.mozilla.com/D6657
--HG--
extra : moz-landing-system : lando
Replace mozilla.widget.use-argb-visuals pref by -moz-gtk-csd-transparent-background media query at browser.css
to draw transparent background. The media query is set by toolkit code and enabled when compatible
window manager is detected.
Differential Revision: https://phabricator.services.mozilla.com/D6658
--HG--
extra : moz-landing-system : lando
On Mojave (or later versions) defaultCenter doesn't get the
accessibilityDisplayShouldReduceMotion changes, we need to use
sharedWorkspace.notificationCenter instead.
Note that the reason why we use defaultCenter originally is that using
sharedWorkspace.notificationCenter to post a notification (for mochitest)
crashed on MacOSX 10.10 (on a try).
Differential Revision: https://phabricator.services.mozilla.com/D6201
--HG--
extra : moz-landing-system : lando
when g_io_channel_set_encoding() fails we return invalid/uninitialized clipboardData,
so initialize clipboardData explicitly.
When SetClipboardDataOffer() is called with null aWaylandDataOffer,
delete our recent clipboard content and not throw an error message.
Differential Revision: https://phabricator.services.mozilla.com/D6039
--HG--
extra : moz-landing-system : lando
If a key inputs multiple characters, we dispatch same number eKeyPress
events to input each character. However,
TISInputSourceWrapper::WillDispatchKeyboardEvent() always sets
charCode of all eKeyPress events to first character of inserting.
Instead, it should set charCode value to nth character of the
inserting string.
Differential Revision: https://phabricator.services.mozilla.com/D5884
--HG--
extra : moz-landing-system : lando
If we're trying to detach and reattach the same compositor object for
whatever reason, we should skip it so we don't inadvertently end up not
attaching the object at all.
Differential Revision: https://phabricator.services.mozilla.com/D5608
--HG--
extra : moz-landing-system : lando
Some Gtk+ themes use non-rectangular toplevel windows. To fully support
such themes we need to make toplevel window transparent with ARGB visual.
It may cause performanance issue so make it configurable
and enable it by default for GNOME right now as it already uses ARGB visual
for widgets.
Also use mozilla.widget.use-argb-visuals to override this.
Differential Revision: https://phabricator.services.mozilla.com/D5754
--HG--
extra : moz-landing-system : lando
If we're trying to detach and reattach the same compositor object for
whatever reason, we should skip it so we don't inadvertently end up not
attaching the object at all.
Differential Revision: https://phabricator.services.mozilla.com/D5608
--HG--
extra : moz-landing-system : lando
To make the test work properly, there needs two functions. One is just setting
a value for testing and sending the notificaiton for the value changes, the
other one is to reset the state for testing.
The test itself will be introduced in bug 1486971, especially in
https://phabricator.services.mozilla.com/D5004
Depends on D5503
Differential Revision: https://phabricator.services.mozilla.com/D5504
--HG--
extra : moz-landing-system : lando
Because we are going to use it for prefers-reduced-motion media feature which
is tied to a system setting.
Differential Revision: https://phabricator.services.mozilla.com/D5502
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoInputDeviceListener.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSystemStateListener.java
rename : widget/android/GeckoInputDeviceListener.h => widget/android/GeckoSystemStateListener.h
extra : moz-landing-system : lando
The framework to simulate the setting change works as following;
- nsIDOMWindowUtils.setPrefersReducedMotion() calls an IPC function which ends
up calling nsChildView::SetPrefersReducedMotion() in the parent process
- nsChildView::SetPrefersReducedMotion() sets the given value into
nsLookAndFeel::mPrefersReducedMotionCached just like we set the value queried
via NSWorkspace.accessibilityDisplayShouldReduceMotion in the parent process
and send a notification which is the same notification MacOSX sends when the
system setting changed
- Normally the cached value is cleared before quering new values since the
cache value is stale, but in this case the value is up-to-date one, so
nsChildView::SetPrefersReducedMotion() tells that we don't need to clear the
cache, and nsIDOMWindowUtils.resetPrefersReducedMotion() resets that state
of 'we don't need to clear the cache'
There are two test cases with the framework in this commit, one is just setting
the value and checking the value queried by window.matchMedia. The other one is
receiving 'change' event and checking the value of the event target.
Note that to make this test works the patch for bug 1478212 is necessary since
the test runs in an iframe.
Depends on D5003
Differential Revision: https://phabricator.services.mozilla.com/D5004
--HG--
extra : moz-landing-system : lando
In child processes on MacOSX we don't spin native event loop at all.
Without native event loops NSWorkspace.accessibilityDisplayShouldReduceMotion
doesn't return up-to-date value when the system setting changed for some reasons.
To workaround this we use NSWorkspace.accessibilityDisplayShouldReduceMotion
only on the parent process which spins native event loop or when it's the
initial query on the child process. And we give the up-to-date value to the
child process via an IPC call just like other cached values do.
Depends on D5002
Differential Revision: https://phabricator.services.mozilla.com/D5003
--HG--
extra : moz-landing-system : lando
In addition to the image container, the draw result can also be useful
for callers to know whether or not the surface(s) in the container are
fully decoded or not. This is used in subsequent parts to avoid
flickering in some cases.
We don't set gtk_header_bar_set_decoration_layout() so we don't need to query the layout
by gtk_header_bar_get_decoration_layout(). That means we don't need to create the GtkHeaderBar
at startup when titlebar rendering is disabled.
Also unify window/header bar construction at CreateHeaderBarWidget() and assert when the widgets
are already created.
Differential Revision: https://phabricator.services.mozilla.com/D5417
--HG--
extra : moz-landing-system : lando