For photon we need to add some colors.
I don't want change current color and dimen too much. I want to add new resources if possible to avoid confliction.
For Tab Items, there are three layout
1. AutoFitTabsGridLayout. Used in tablet-land/port and phone-land
2. CompactTabsGridLayout. Used in phone-port(with pref on)
3. TabsListLayout. Used in phone-port(default)
In 1.2, we only constrain the gap of the Tab item padding and the layout padding.
In 3, we restrain the thumbnail width to 137dp .
I also make the tab strip longer for tablet. And I change the color of tab item border and set the thumbnail ratio to 4:3.
We might need to remove unused resources and test different density(2.6 and 3 are all xxhdpi!) and sw240,sw360,sw400 combination.
MozReview-Commit-ID: Gp25nG8NkR5
Replace usages of GeckoAppShell.getContext() with
getApplicationContext() if possible, or the current Activity if the
usage expects an Activity context.
MozReview-Commit-ID: 9GOWszgEsQu
In order to use VectorDrawable's in this code we need to use AppCompatDrawableManager, which
is in the v7 appcompat support library. GeckoView cannot access that library, hence
we should move getDrawable() into the main Fennec jar in order to let us use
VectorDrawable's.
Similarly we need to move DrawableUtil for the same reasons.
(This commit only takes care of moving the code, the following code adds VectorDrawable support.)
MozReview-Commit-ID: CE2yTMLgBlJ
This patch includes a small memory optimization of using ArrayList and
`volatile int` for storing the pending thumbnails list and pending
width, instead of using LinkedList and AtomicInteger, respectively.
The patch also fixes a possible race condition due to calling
processNextThumbnail outside of a lock. Now it must be called inside a
lock and its name is changed to reflect that.
Move the "thumbnail:" handler out of BitmapUtils and into
ThumbnailHelper and PromptListItem.
The patch adds two overloads of the getAndProcessThumbnailFor method in
ThumbnailHelper, which handle the tasks of getting a thumbnail for a
specific tab and calling a given BitmapLoader.
Because only PromptListItem makes use of the "thumbnail:" convention,
the actual handling of "thumbnail:" is moved to PromptListItem, which
calls ThumbnailHelper to get the thumbnail.
Replace old flags in WrapForJNI usages with new flags. The calledFrom
and dispatchTo flags are set based on whether the method is native or
non-native, and how the method is used.
Also fix testEventDipatcher to respect NativeJSObject's calledFrom =
"gekco" flag, by moving a test to Gecko thread.