The nav cache may not have a cursor set if it is
rebuilt while the long press timer is running. Use
the original hit test data in this case.
bug:3198707
Change-Id: I795a3afb31de3667b3a69abbe898381912806802
Some website will have an initial view scale which is less
than the overview scale and the page will display poorly.
This fix sets the initial scale and text wrap scale to be at least
overview scale to make the page looking good at first load. When a page
is restored, the scale will not be changed.
Also make the reading level scale always bigger than overview
scale for consistency.
issue: 3226625
Change-Id: I8b77cf4fda454a35c3037fa09aaff1aac0c0f664
Also move a debug statement so it can report the
extra selection choice.
This does not scrolls overflow divs for now; once
Pat has that code checked in, this can adapt to
work for that as well.
requires a companion change in external/webkit
bug:3186988
Change-Id: I071ecd31d589e9ef715d2ecb12b1768696075686
New algo is:
1) if view width < MIN_WIDTH (currently 300px), clip glow and edge to fit
2) else stretch glow and edge to fill width
3) make alpha and height of edge and glow 30% "more intense"
Change-Id: I8f121bb165a8fb835bc33950dbedd1bc80c5df65
Allow scrolling, dragging, zooming to process normally
while selecting text, but prevent them from resuming
the webkit update until the selection is done.
Also, resume the webkit priority when resuming the
updates.
bug:3226364
Change-Id: Idfad6b63b6eb02208f977d89a8409377e9d731e7
Rotating the screen may cause it to layout differently. The
selected text may be hard to match or may not be visible at
all. Cancel the text selection mode when a rotate is detected.
bug:3205291
Change-Id: If7e8f98a1cc396bf21f8261f2a7b4a342907ef2f
When the user selects a form field that is part of a form that can
be autofilled, inform the embedder that this is the case to give
them the opportunity to configure a profile if they the user has
not done so already. A Message is also provided
to the embedder that when sent will trigger the form to be filled
with the profile that the embedder set up.
Change-Id: Ica995e5b1ed92a3ec3e356401b261740d9f90e57
Make select text available as an external interface
so that the browser can initiate it from a context
menu.
Interface is marked hidden pending API council approval.
companion change in packages/apps/Browser
bug:3214410
Change-Id: I7d513a38cc3a5ac9c0d1b3be39c02e0835bea90a
It is possible that a call to the L10nUtils class will
come before it has been properly initialised (if the
user highlights a form very quickly onload for example) so move
the initialisation earlier in the WebView ctor so that it is
set up before the WebCore thread is started.
Change-Id: Iff5a1c16d04c47d001146184f753d2cc0cbbb404
We need to be able to reuse this logic from the Chrome HTTP
stack. This is just a refactoring that doesn't change any
behaviour; we'll need a separate change in external/webkit
to call this from the code that handles POST requests.
Change-Id: I3f3f84a15a8501f63de974bffa6f7c911a3d3820
Bug:3085564
In order to treat the selection handles properly, the text in
WebTextView needs to line up with the text in webkit. Use the
line spacing style, or the paint if none provided, to determine
the spacing for WebTextView's Layout. When no line spacing is
provided, use the floating point values of ascent and descent,
rather than the rounded result, to determine spacing.
Requires a change in external/webkit:
https://android-git.corp.google.com/g/#change,80641
Change-Id: I51081835e128a0e938028c7c7aeb5111aa5f072c
When in pre-release mode, we did not have a semi-colon between
the locale (i.e. "en-us") and the the Build (i.e. "Build/HRH50")
In release mode we correctly added the semi-colon (and put in
the "model") so this was only an issue when in pre-release mode.
Bug: 3215465
Change-Id: Ied1acc69463ffddabbc886e7e7e5e8cc8ab14956
This is to support video/m4v mimeType in the Browser.
Even though it's not listed in MediaFile.java, it's
supported and plays well.
issue:3207898
Change-Id: I35c7905527ce2c46f8861662b3a2ee94a690b38e
BREAKING CHANGE: Redesigned the key character map format to
accomodate full keyboards with more comprehensive suite of modifiers.
Old key character maps will not work anymore and must be updated.
The new format is plain text only and it not compiled to a binary
file (so the "kcm" tool will be removed in a subsequent check-in).
Added FULL keyboard type to support full PC-style keyboards.
Added SPECIAL_FUNCTION keyboard type to support special function
keypads that do not have any printable keys suitable for typing
and only have keys like HOME and POWER
Added a special VIRTUAL_KEYBOARD device id convention that maps
to a virtual keyboard with a fixed known layout. This is designed
to work around issues injecting input events on devices whose
built-in keyboard does not have a useful key character map (ie.
when the built-in keyboard is a special function keyboard only.)
Modified several places where events were being synthesized
to use the virtual keyboard.
Removed support for the "qwerty" default layout.
The new default layout is "Generic". For the most part "qwerty"
was being used as a backstop in case the built-in keyboard did
not have a key character map (probably because it was a special
function keypad) and the framework needed to be able to inject
key events anyways. The latter issue is resolved by using the
special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD.
Added the concept of a key modifier behavior so that
MetaKeyKeyListener can distinguish between keyboards that use
chorded vs. toggled modifiers.
Wrote more robust key layout and key character map parsers
to enable support for new keyboard features and user installable
key maps.
Fixed a bug in InputReader generating key ups when keys
are released out of sequence.
Updated tons of documentation.
Currently QwertyKeyListener is being used for full keyboards
with autotext and capitalization disabled. This mostly works
but causes some problems with character pickers, etc.
These issues will be resolved in subsequent changes.
Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
Creating a new Boolean is wasteful since there's already a static
Boolean.TRUE and Boolean.FALSE. Using Boolean.valueOf will return one of
those static objects and reduce memory usage a bit.
Change-Id: Id497f951c8a894ec03ac6c3181e6055b56db9db4
Move the check for selecting text before calling
the parent, so that the context menu isn't an
available option.
bug:3205306
Change-Id: I5d2c3f6b71c74cda56153fbc773eb5be98e44be7
Bug:3174399
If the page requests to scroll beyond the edge of the
screen, we send a message to try again on a draw, in case
our picture is out of date and the page should be larger.
However, sometimes we get stuck in a loop of retrying the
same scroll position over and over again. End this loop.
Change-Id: I53fcd4c2fa70c7ef63d4537d8b24eabb6b924b0b
The reason for this is that the CookieSyncManager might not be
initialized right after a webview is created since the initialization
is done with a message.
If someone creates a webview and tries to access a cookie right
afterwards that would cause an unintended exception.
This requires a change in external/webkit
Bug 3172863
Change-Id: I4f4f162253e2af09f63ee582bfce9f75ccf4037b
Programmatic scrolls fail when the scroll has not had a chance
to start. In this case, the current position equals the last
position; the logic erroneously cancels the scrolls, assuming
that in this case the scroll has finished.
Also, new scrolls should cancel the old velocity whether they
are animated or not.
This has a companion change in external/webkit, which is not
required, but makes tap initiated scrolls work more reliably.
bug:1331125
bug:3099569
Change-Id: I80ae8e8cdefce2d8d09532f79d1b2e1ae4738fa6
The new callback allows applications to return a response for a particular url.
Deprecate onLoadResource in favor of the new api. onLoadResource is not
currently being used by the new network stack and applications can post a
message from shouldInterceptRequest to handle onLoadResource.
Bug: 2905943
Change-Id: Icf48ab3110d85d76112b3c3b4a1a8c8a333b82f0
This method is called from both the Android and Chrome HTTP stacks.
We want the same user-facing behaviour in each case, but the Chrome
code does not have easy access to the same error message strings.
Therefore, I'll have the Chrome HTTP stack provide empty strings
for the descriptions. (See change I9042a2ee in external/webkit).
This CL makes BrowserFrame check for empty or null strings and use
the standard error messages instead.
The strings were package-private, so I did a little cleaning up
to make them public (but still hidden from the API). Using a switch
statement instead of an array because it's more robust and should
be comparably efficient.
Bug: 3172265
Test: Load http://google.com:81 to force a timeout error, check
that the correct message is displayed.
Change-Id: I7dec8dffe8ad9e513fdb90877e0b466e707174a8
If the user cancels the bad SSL certificate dialog, stop loading
and return them to the page they were on previously.
Bug: 3189482
Change-Id: Ie5796a8fdc5ba38e1ab42de5beecf7fa4ecec3ed
Bug:3085564
Do not round the text size when applying it to the WebTextView,
so that it will better line up with the text shown on the web
page.
Modify the WebTextView paint to better match the paint used by
webkit.
Update the padding when the zoom level changes.
Change-Id: I284a6febcba2be21dc1ab3f74c6ab5751e1b19b6
This is mostly for sites which will change content width when first
loaded such as nytimes.com.
Also zoom to reading level if the zoom overview scale has very
little diff from current actual scale.
issue: 3003933
Change-Id: Ie4b32bf6ac109eef145cd59b31f04077226b9052
V8 can be smarter about the memory it uses and the frequency
of garbage collection but we need to inform it of the values
to use. As this varies device to device look it up and store
it on the WebViewCore to be read by native code over JNI.
See also https://android-git.corp.google.com/g/#change,78691
Bug: 3075565
Change-Id: Ib52f4df775b80b386fc98f1d71b5687f01c12b2e