Remove unused classes and make classes that are not used outside of the
package package-private.
MozReview-Commit-ID: 9FxcL5QsM1Q
--HG--
extra : rebase_source : d9ed39d06a0e2aadec131d06c92cb11ef342a320
Use o.m.g.util.BitmapUtils in code that use BitmapUtils.
MozReview-Commit-ID: KPM05Aqf1kW
--HG--
extra : rebase_source : ea910333fc195b329ef41bf168d0299584e63d20
I think BitmapUtils is better suited for the o.m.g.util package instead
of o.m.g.gfx, since none of the other classes in gfx actually use
BitmapUtils.
MozReview-Commit-ID: IEwSIb5h9Y7
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/BitmapUtils.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/BitmapUtils.java
extra : rebase_source : 3960fbd5172b745b3a41d1da8e855a2a539ed906
Remove LayerView now that it's no longer used. FullScreenState is
obsolete as well and is removed.
MozReview-Commit-ID: Jt7OMAoarOJ
--HG--
extra : rebase_source : da9285999fe093c41ea6d7693cf9255c0db1d688
Use GeckoSession/LayerSession or GeckoView in Fennec code instead of
using LayerView.
MozReview-Commit-ID: Iod7XsqKy1e
--HG--
extra : rebase_source : 5917540422698f5526ca373f17c4358a712cdcef
Implement the setSurfaceBackgroundColor functionality in a new
coverUntilFirstPaint method. Because we no longer rely on any LayerView
functionality, GeckoView now inherits directly from FrameLayout.
MozReview-Commit-ID: 3xgWsgk64GM
--HG--
extra : rebase_source : 1185e40456ffce6c40676230e6f921dd0f3cbc3e
Add CompositorController and LayerSession.getCompositorController for
accessing miscellaneous compositor-related methods such as adding draw
callbacks and getting pixels.
A simple Runnable is used for draw callbacks instead of using the
DrawListener interface from LayerView. A first-paint callback is added
to implement the "clear surface background on first paint" requirement
when switching between documents in Fennec.
MozReview-Commit-ID: 8pE1B5HYe2w
--HG--
extra : rebase_source : abd35b189d04073c203b542fb9f9ef763027e117
Limit the number of SurfaceTextures to ensure that we do not reach the
process's fd limit. 200 was chosen as the limit because it allows for
more tiles than any reasonable page should require, yet should not
come close to the 1024 fd limit, even with 2 fds (buffer and sync
fence) per SurfaceTexture.
MozReview-Commit-ID: F21H1Rj4FVF
--HG--
extra : rebase_source : 379b460c8067cc3c5aa11a47cc66f865bae1ac64
Remove NPZC references from LayerView, and add an NPZC getter in
LayerSession. Use the new APIs in GeckoView to forward events to NPZC.
MozReview-Commit-ID: 1UcJkpW0XuM
--HG--
extra : rebase_source : 6f50d1ca9398a2549678cc4e0fbb2578d284f63a
Clean up the NativePanZoomController object including,
1) Remove references to LayerView because NPZC will be created and used
by LayerSession.
2) Rename `mDestroyed` to `mAttached` because NPZC now needs to support
cases where it's used before being attached, in addition to after being
destroyed.
3) Move origin of synthesized event coordinates from the screen to the
surface in native code, so we don't need to do the same thing in Java.
4) Invoke all callbacks from native code on the UI thread.
MozReview-Commit-ID: Fu4XIY59yKw
--HG--
extra : rebase_source : cb4d432cb940cfa92f3c0a931f1f2d2991932462
There is some overscroll handling code in NativePanZoomController that
should be moved, along with other overscroll code in LayerView, to
LayerSession. LayerSession now provides a getter for
OverscrollEdgeEffect, which is cleaned up to have a public API with
documentation.
MozReview-Commit-ID: LkKHFS8OkR7
--HG--
extra : rebase_source : dc6b680b1cc7d7e2dd221091a63a208971d63c80
Use the LayerSession coordinates APIs instead of manually calculating
coordinates using viewport metrics and toolbar height, which is prone to
error.
MozReview-Commit-ID: 4ebI3BHEOXR
--HG--
extra : rebase_source : 264f03f3032f101687c2a39d1cf052ac1805f12b
Provide a set of coordinates APIs in LayerSession instead of exposing
the raw viewport metrics, which are hard to use. This also lets us
remove ImmutableViewportMetrics completely.
The new APIs provide rectangular bounds in client or surface
coordinates, and matrices to transform those coordinates to screen
coordinates. This is done because the transformation to screen
coordinates could (in the future) involve skew, rotation, etc, so it's
up to the application to decide how to handle non-rectangular screen
bounds.
MozReview-Commit-ID: 8Yw8L63TmrQ
--HG--
extra : rebase_source : 76954d32da9fb8435ec68ea53b6dc618f8cb0121
Remove all DynamicToolbarAnimator-related code from LayerView now that
they are in LayerSession.
MozReview-Commit-ID: 56AO79T3NoK
--HG--
extra : rebase_source : 7685806436d43dc203cc034dd5105eb1f9c80a94
Use DynamicToolbarAnimator through the session in places where we need
to interact with the toolbar or get the current toolbar height.
MozReview-Commit-ID: PdGX4FEHp5
--HG--
extra : rebase_source : 825fc70b584eb4b75f0ce9bd21a36c68f700c8c2
Add getter/setter for DynamicToolbarAnimator in LayerSession in lieu of
LayerView. It is then LayerSession's responsibility to keep track of how
changes in the toolbar affects other things like the window and viewport
bounds.
MozReview-Commit-ID: HmRqxZ7EUCZ
--HG--
extra : rebase_source : 80648a17ed10672400daa4bcce0de49f4ee76557
The plan is to incorporate DynamicToolbarAnimator into the official
GeckoView API and expose getter/setter in LayerSession. This patch
cleans up the class to make sure only public APIs are public, and to
assert they are called on the UI thread.
MozReview-Commit-ID: D3ePV3k2HvX
--HG--
extra : rebase_source : b1925ff484b5661f3a02f66079d4834961efffbe
One fix I forgot to make in bug 1416310 is to change the code to reset
the flag in LayerView. I think it's better if we just moved the whole
thing to native code, since we don't really use the flag in Java.
MozReview-Commit-ID: 9cbcYb89LhC
--HG--
extra : rebase_source : a209669d6657a60c198f59f4a0e4d959478485c3
Remove GeckoLayerClient.java since it's no longer used, and update
auto-generated JNI bindings. r=me for trivial patch.
MozReview-Commit-ID: CiNPLLkh3VJ
--HG--
extra : rebase_source : 0cddae4f8914dd6f6a0631a7e69701828476f2b8
Move the GeckoLayerClient JNI callbacks to LayerSession.Compositor. Move
the rest of the viewport code to LayerView. Finally, move the input
event synthesis code to NativePanZoomController.
MozReview-Commit-ID: 1FEAM43KcwL
--HG--
extra : rebase_source : af2ded170a79f13afbb1f690ae466e77c7145ff6
Instead of sending an event through the global EventDispatcher in
GeckoLayerClient, switch to using the per-GeckoView EventDispatcher in
GeckoInputConnection, to handle scroll-to-focused-input-on-resize. This
lets us implement the same functionality for standalone GeckoView.
The patch also fixes some small bugs including unregistering
not-registered events, not scrolling when switching input focus, and
inadvertent scrolling when not showing the keyboard.
MozReview-Commit-ID: 20OZP9dMXtI
--HG--
extra : rebase_source : d9dee0fd8b3d01147b8b2eda5154c380d0f167dd
Patch gets rid of `LayerView.getMatrixForLayerRectToViewRect`, and just
uses `LayerView.getZoomFactor` directly when calculating the matrix in
GeckoInputConnection. This also lets us avoid the `isCompositorReady`
call on a non-UI thread. To get the correct offset, we need the screen
bounds from Gecko, so it's passed to Java as the first element in the
rect array. Using bounds from Gecko lets us avoid having to deal with
things like the dynamic toolbar animator ourselves.
MozReview-Commit-ID: 6I61SZGyQyO
--HG--
extra : rebase_source : d576fb7ef9a42de10b14db662e5c4833f16f6312
Avoid crash in `GeckoLayerClient.getMatrixForLayerRectToViewRect` by not
calling `isCompositorReady`. If the compositor is really not ready, we will
return inaccurate data, but that's acceptable. r=me for trivial patch.
MozReview-Commit-ID: HobHchWYQ5D
Remove most of the Compositor and Surface management code in LayerView.
And use LayerSession.Compositor in rest of the gfx code.
MozReview-Commit-ID: 5E9pj3eGHlv
--HG--
extra : rebase_source : 0b0a64113db58aaf376c98d5480f5cf31174a3d3
Add a `screenOriginChanged` callback to GeckoDisplay.Listener, which
informs Gecko of changes in the origin of the display. The origin
translates to coordinates for web APIs like screenX/screenY and certain
other calculations.
Also, make GeckoDisplay listen to layout changes in the view tree (by
overriding gatherTransparentRegion as an optimization), and call
`screenOriginChanged` accordingly.
MozReview-Commit-ID: C72EHCkbV3T
--HG--
extra : rebase_source : 240c5c8fb3c2938ae966f40e86f7c5a0ca66526c
Make GeckoView implement GeckoDisplay for its own SurfaceView, and use
that with GeckoSession.
MozReview-Commit-ID: LXllQGlCxaB
--HG--
extra : rebase_source : 1b41e411b2c293797d572d584c4f2b7036e83b23
Make GeckoSession inherit from LayerSession, and connect its Compositor
to native code as part of the GeckoSession routine.
MozReview-Commit-ID: wQaH1A0a7z
--HG--
extra : rebase_source : ee4ae96e974d15c8cb9ad569ea9abf0ace4d0fa5
Add a LayerSession class that's split off LayerView. Currently,
LayerSession takes over Surface management and the Compositor class from
LayerView. Eventually, all of LayerView will migrate to LayerSession.
MozReview-Commit-ID: F1ozOfZGY2g
--HG--
extra : rebase_source : eaf42122db1238c99b0da1e689bc365180a2835f
Introduce a GeckoDisplay interface for interaction with GeckoSession.
MozReview-Commit-ID: 13prgWaPqKU
--HG--
extra : rebase_source : 282b27a1f7c11cf4e559b1f25946c3f4574e900a
We don't actually use the screen size through GeckoLayerClient anymore.
Getting rid of it lets us get rid of the Context field in
GeckoLayerClient as well.
MozReview-Commit-ID: GM1jlhAZm4T
--HG--
extra : rebase_source : 04827eb61d6304d4782a7a935d5528013255726f
This patch makes the :geckoview Gradle project only use
o.m.geckoview.BuildConfig, and makes the :app Gradle project use all
of the preprocessed code coming from the moz.build system.
Eventually, we'll reduce that set of preprocessed code to only
o.m.gecko.BuildConfig, which will then be produced by Gradle.
MozReview-Commit-ID: Dnkde7axyZL
--HG--
extra : rebase_source : dc0b7f9fa542cbfd9c665bfac761d45f5957f7b8
Some of these make no sense for GeckoView, but perfect is the enemy of
the good here.
MozReview-Commit-ID: 9MwRkc61v9P
--HG--
extra : rebase_source : 8e7fa8102c615f34dbd76394fb6877188007c3c7
Versions is no more efficient than checking android.os.Build, and it
actually interferes with the Android lint that checks API
compatibility.
MozReview-Commit-ID: Cl1227uHWKZ
--HG--
extra : rebase_source : 91ceba45906ad5fbb47d55c982ecbb65569a3f00
Add BrowserLocaleManager.refreshLocales, a native function which calls OSPreferences::Refresh, and BrowserLocaleManager.getLocale, which returns the current locale string. Use these in place of observing modification of the intl.locale.os pref.
LOCALE_THOUSANDS_SEP, LOCALE_DECIMAL_POINT and LOCALE_GROUPING are only used by
old code without ICU. Since we turn on ICU with ECMA-402 support, it is
unnecessary to set LOCALE_THOUSANDS_SEP, LOCALE_DECIMAL_POINT and
LOCALE_GROUPING in GeckoLoader.setupLocaleEnvironment.
MozReview-Commit-ID: LlGQdLlM7I2
--HG--
extra : rebase_source : 559fafd4ded9e351805fdd7b10e7aaebfc09637e