Move lock of window inside thread in `LayerViewSupport::OnDetach` and pop the `GeckoResult` from list of waiting results while we still have the initiallock in `LayerViewSupport::RecvScreenPixels`.
This passes try, but then so did the last patch.
Differential Revision: https://phabricator.services.mozilla.com/D44800
--HG--
extra : moz-landing-system : lando
Chrome flags need to be set both on the `window` and the `browser` object.
Right now we only set them on the `browser` objects and that could lead to
unintended consequences. This patch sets the flags to the `window` accordingly.
Differential Revision: https://phabricator.services.mozilla.com/D43523
--HG--
extra : moz-landing-system : lando
Converts android.widget_paints_background to a static pref. From my understanding, this pref only matters on android, and the overridden function in nsIWidget defaults to `false`. Based on that I replaced the entire WidgetPaintsBackground() function with a static pref.
Differential Revision: https://phabricator.services.mozilla.com/D42395
--HG--
extra : moz-landing-system : lando
Converts ui.scrolling.negate_wheel_scroll to a static pref and updates its usages. This one is only enabled on android, so I used the IS_ANDROID value to fill it.
Differential Revision: https://phabricator.services.mozilla.com/D42394
--HG--
extra : moz-landing-system : lando
This is to ensure that multiple completions cannot be attempted on the same `GeckoResult`, resulting in crashes.
Differential Revision: https://phabricator.services.mozilla.com/D36929
--HG--
extra : moz-landing-system : lando
This is caused by a race condition when the compositor is detached. Because the actual detachment happens in a new thread, `detach` can complete and release the lock on `mLayerViewSupport`, and `RecvScreenPixels` can obtain the lock, before `mLayerViewSupport` is properly cleaned up. We therefore check to ensure that `lvs` is not null before calling a method on it.
Differential Revision: https://phabricator.services.mozilla.com/D36928
--HG--
extra : moz-landing-system : lando
On android, android's nsWindow creates LayerManaer only in nsWindow::Create(). When WebRender error happened, gecko just stopped rendering by disabling Webrender.
The nsWindow needs to re-create LayerManager during disabling Webrender. Further, during disabling WebRender, All GeckoSurfaceTextures should not be attached to GLContext. It is for preventing a conflict with AttachToGLContext() call in SurfaceTextureHost::EnsureAttached().
Differential Revision: https://phabricator.services.mozilla.com/D26687
--HG--
extra : moz-landing-system : lando
Only gtk returns failure ever, and nobody checks the result anyway.
Use an enum class so that it's clear from the caller what it means.
Differential Revision: https://phabricator.services.mozilla.com/D32353
--HG--
extra : moz-landing-system : lando
Only gtk returns failure ever, and nobody checks the result anyway.
Use an enum class so that it's clear from the caller what it means.
Differential Revision: https://phabricator.services.mozilla.com/D32353
--HG--
extra : moz-landing-system : lando
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.
Differential Revision: https://phabricator.services.mozilla.com/D25325
--HG--
extra : moz-landing-system : lando
Renamed all class member instances from WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource
Differential Revision: https://phabricator.services.mozilla.com/D25322
--HG--
extra : moz-landing-system : lando
Renamed all class member instances from WidgetMouseEventBase::hitCluster to WidgetMouseEventBase::mHitCluster
Differential Revision: https://phabricator.services.mozilla.com/D25318
--HG--
extra : moz-landing-system : lando
Invert screen pixels in `nsWindow`.
Update `RequestScreenPixels` in `nsWindow` to accept a `GeckoResult` as an argument and save as a `GlobalRef`.
Update `RecvScreenPixels` in `nsWindow` in order to invert the image before sending over JNI rather than requiring callers to invert the image themselves.
Complete the `GeckoResult` if there is one in `RecvScreenPixels` instead of making a callback to the compositor.
Remove `RecvScreenPixels` from `GeckoSession` and `GeckoSession.Compositor`.
Move `RecvScreenPixels` and `getPixels` to `GeckoDisplay`
Rename `getPixels` to `capturePixels`
Return Bitmap from `RecvScreenPixels`.
Return `GeckoResult` from `capturePixels`.
Add doc comments to new methods and classes.
Update FennecNativeDriver to use `GeckoView` and `GeckoResult`.
Update API docs and Changelog
Add tests
Differential Revision: https://phabricator.services.mozilla.com/D21833
--HG--
extra : moz-landing-system : lando
So that we can query the test value in the child process properly.
Note that the APIs used for setting the prefers-reduced-motion value for testing
are only used on Android and MacOSX. As for MacOSX we have a different
machinery (see bug 1486971) to deliver the test value without spinning native
event loop in the child process so the change here is valid only for Android.
Differential Revision: https://phabricator.services.mozilla.com/D18311
--HG--
extra : moz-landing-system : lando
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)
--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
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
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
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
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