Commit Graph

401 Commits

Author SHA1 Message Date
Andrei Popescu
50c862324b Update <video> implementation after new IRC discussion with Eric Carlsson.
- move poster drawing on the WebKit side
- get rid of the child views
- add prepareToPlay method to the MediaPlayer iface.

Fixes http://b/issue?id=2156592
2009-09-30 20:09:29 +01:00
Cary Clark
0c5924e9dd preserve webkit-side text selection
When webkit modifies a text field programmatically, it may change
the selection. This competes with the UI thread attempting to
set the selection in response to the IME next button and changes
made by the trackball.

One recent fix (https://android-git.corp.google.com/g/#change,26904)
sets the selection from the UI side after the IME generated click.
Unfortunately, this can be generated under other circumstances,
so this change qualifies this with mOkayForFocusNotToMatch, which
is only set after the IME next button is pressed.

The other change qualfies onTextChanged calls so that if it was
triggered by setTextAndKeepSelection, the webkit-side selection
is unchanged.

fixes http://b/issue?id=2096746
2009-09-30 10:52:14 -04:00
Leon Clarke
194e345eb0 Re-instate the link coloring on startup, but going via the browser
to read the bookmark history, and restricting it to 100 results.

Link coloring - doing db lookup in new thread

Whitespace, following review
2009-09-30 10:09:49 +01:00
Mike LeBeau
2e4dbe70e7 Unhide APIs for enabling geolocation in web views. I've confirmed
with Grace that these are okay to unhide.
2009-09-29 19:40:28 -07:00
Cary Clark
4fbf81bc94 check for null item in web history in saveState
fixes http://b/issue?id=215369
2009-09-29 16:21:25 -04:00
Cary Clark
eaa18dec91 scroll text field with touch
Add a hidden public method to text/method/Touch.java that
computes the maximum scroll amount for a text field.

Remove 'faketouch' code; it causes a crash and is
no longer required.

Pass the percentage of the current scroll from the UI
thread to webkit. One additional fix is to allow very
small movements which are currently disallowed because
they are smaller than 'smallerSlop' in WebTextView.java.

Companion fix is in external/webkit.

Fixes http://b/issue?id=2133049
2009-09-29 15:42:37 -04:00
Leon Scroggins
d84e7d53d3 Allow scrolls to continue when getting a new content size.
In recordNewContentSize, rather than aborting any scrolls in progress,
find the final coordinates of the scroll and pin them to the new size,
and let the scroll continue.

Fixes http://b/issue?id=2141960

Change-Id: I7bfa444b52e70a0ca817221f379df77efc3496b7
2009-09-29 14:43:05 -04:00
Grace Kloba
94c715d662 Skip requestRectangleOnScreen for WebTextView during
zoom animation. If it is in edit mode, we already adjust
WebTextView in the end of zoom animation.

Fix part 1 of http://b/issue?id=2147168
2009-09-28 23:23:53 -07:00
Mike Cleron
f116bf8884 Fading scrollbars return. But you have to opt in. 2009-09-28 10:47:04 -07:00
Android (Google) Code Review
5d062bc3de Merge change 27426 into eclair
* changes:
  Handle the case where GoogleLocationSettingObserver::onChange is called after GoogleLocationSettingObserver::doNotObserve().
2009-09-28 13:33:01 -04:00
Grace Kloba
0d03b91407 Before we send VIEW_SIZE_CHANGED after first layout,
we should remove VIEW_SIZE_CHANGED in the queue if
there is any as we are going to send the message in
the front of the queue.

Fix http://b/issue?id=2133222
2009-09-28 10:10:15 -07:00
Grace Kloba
207308a781 WebView may get message after destroy() is called.
Just return in this case.

Fix http://b/issue?id=2143668
2009-09-28 09:41:33 -07:00
Andrew Stadler
6585fe004e Add extension->mime type mappings
* Microsoft Office common extensions
* .xml -> text/xml
* Change existing mapping of ".pot"->"text/plain" to ".po"

Note:  We already had a definition for .pot to text/plain.  Per the
information found at <http://www.fileinfo.com/extension/pot> this is the
rarely seen "portable object file", and is often named ".po" to avoid
this same conflict.

Addresses bug # 2097457

Change-Id: I964b853fdeae77d742f627c535a8b32e0e53516a
2009-09-28 09:23:53 -07:00
Andrei Popescu
7885381f9b Handle the case where GoogleLocationSettingObserver::onChange
is called after GoogleLocationSettingObserver::doNotObserve().

Fixes http://b/issue?id=2147888
2009-09-28 12:42:02 +01:00
Grace Kloba
d66d84ffa2 Reset mPreventDrag at touch_down.
Check the delta for short press case as we may switch to
PREVENT_DRAG_NO at SWITCH_TO_SHORTPRESS.

This should fix another two corner cases where flick doesn't
do anything.
2009-09-27 14:53:45 -07:00
Grace Kloba
ba6728023d When change from narrow screen to wide screen, we will
leave the mMinZoomScale to 1.0
2009-09-25 15:54:08 -07:00
Grace Kloba
f58af62211 If WebCore doesn't response touch down in time, don't
block the UI tap, pan and double tap. Added a time out
(which is same as shortpress time out, 200ms) for how
long we wait for WebCore's response for touch down.

This should fix the problem where pan/touch is not working
all the time when Flash plugin is installed.

Fix http://b/issue?id=2144761
2009-09-25 12:06:08 -07:00
Cary Clark
96cfad5d67 check for null before calling native webkit from java webview
fixes http://b/issue?id=2121684
2009-09-25 12:06:20 -04:00
Android (Google) Code Review
f4a36e86bb Merge change 26909 into eclair
* changes:
  Not all WebView's host have permission to read the history. Add a security catch and return an empty list.
2009-09-24 17:24:40 -04:00
Grace Kloba
db674fb4e8 Not all WebView's host have permission to read the history.
Add a security catch and return an empty list.

We don't use tab in the code.

Fix http://b/viewIssue?id=2144339
2009-09-24 14:24:13 -07:00
Cary Clark
f18c539344 set the selection after sending a click
Webkit expects the currently focused text input to have
a set selection before it can receive key events for insertion.

Coincidentally, we always set the selection except when
using the 'next' button on the IME to switch between text fields.

The selection has to be set after the text field receives
focus, so add a setSelection() message after the click() message
is sent in passToJavaScript().

fixes http://b/issue?id=2087546
2009-09-24 16:45:24 -04:00
Grace Kloba
dbad320bf3 ResultTransport needs a default value. If the thread is
ununlocked by something else other than CallbackProxy's
notify(), it can have a null value.

Fix http://b/issue?id=2131842
2009-09-24 12:27:14 -07:00
Android (Google) Code Review
bb6aba1984 Merge change 26876 into eclair
* changes:
  Restrict touch to the view height with the title. This should fix the links in the bottom of the screen are not touchable when title bar presents.
2009-09-24 14:45:57 -04:00
Grace Kloba
8eff73f79b Restrict touch to the view height with the title. This
should fix the links in the bottom of the screen are not
touchable when title bar presents.

Also fix a bug in calcOutContentVisibleRect. We need to
adjust visibleTitleHeight for the top, but we should not
do it for the bottom. Otherwise, WebKit will have the
wrong visible rect and it will think the part right under
the bottom of the screen are visible.

Fix http://b/issue?id=2140971
2009-09-24 11:36:26 -07:00
Leon Clarke
9c8d886bb7 Coloring clicked-on links
Following review comments

Merging in ben's change

Whitespace
2009-09-24 18:22:51 +01:00
Ben Murdoch
d421995fdb Fix parsing of HTTP Date years.
Change-Id: I17157eb145599e6e1a23c5ba77c3c713b8af14ff
2009-09-24 12:14:17 +01:00
Cary Clark
37703b6c87 invalidate the webview after pressing the IME 'next' button
fixes http://b/issue?id=2141013
2009-09-23 15:40:17 -04:00
Leon Scroggins
ea96d1e27f Provide a getter to access the width of the HTML document.
Necessary to scale thumbnail pictures to show the full page width.

Change-Id: I631e880b09fe66403ea71bf5e019899a180e6a53
2009-09-23 14:14:34 -04:00
Cary Clark
b82665e78f don't allow min scale to go to infinity
When a new picture is received, the min zoom scale is set.
One of the many choices divides by draw.mMinPrefWidth, even
if it is zero. Add a check to require it to be greater than
zero before using it as a ratio component.

fixes http://b/issue?id=2138786
2009-09-23 13:09:34 -04:00
Android (Google) Code Review
c28e3a670f Merge change 26595 into eclair
* changes:
  Move destroying the web view to the WVC thread (previously it was on the UI thread)
2009-09-23 12:53:31 -04:00
Ben Murdoch
3dba1e4d81 Move destroying the web view to the WVC thread (previously it was on the UI thread)
Change-Id: I5a48734c6a244eadd1d60659f8e02ebb889a8fc1
2009-09-23 16:14:37 +01:00
Leon Scroggins
37df6a8328 In calcOurContentVisibleRect, account for the visible title bar.
Fixes http://b/issue?id=2137879 and http://b/issue?id=2135469

Change-Id: I6a4b2f90ffa8d37adbe86a2fd19d141c4136213c
2009-09-23 10:53:42 -04:00
Derek Sollenberger
c0b8a96d28 launching plugin activity when a plugin requests to go full screen.
Change-Id: Ib42bb08d01a75ca3a9c02085ee185396bb7b7378
2009-09-22 16:29:17 -04:00
Andrei Popescu
dee76be487 Fix for 2122292: make sure we unregister the ContentObserver for the system location settings. Also make the GoogleLocationManager use the singleton pattern correctly. 2009-09-22 19:51:14 +01:00
Grace Kloba
24a3ff958b Change double tap toast to long toast.
Change toast count to static to cross all the windows.

It should be --count instead of count--.
2009-09-22 11:11:01 -07:00
Android (Google) Code Review
194099dc4f Merge change 26220 into eclair
* changes:
  Reimplement the settings to use async callbacks
2009-09-22 14:02:44 -04:00
Nicolas Roard
6c24b4d102 Reimplement the settings to use async callbacks 2009-09-22 18:44:52 +01:00
Patrick Scott
d58ccff769 Add a boolean indicating if the apple-touch-icon is precomposed. 2009-09-22 13:28:36 -04:00
Grace Kloba
408cf85207 Support the new dpi change in the WebView.
Fix http://b/issue?id=2071943
2009-09-22 10:07:27 -07:00
Grace Kloba
f53c186524 Don't snap the initialScale to min or max if it is not defined.
Fix http://b/issue?id=2133821
2009-09-22 09:14:25 -07:00
Leon Scroggins
d3997e556e Make scrolling textfields work better in the browser.
The touch slop seems to be too large for scrolling
a small textfield, so use a smaller number.  Also,
in WebView, create viewToContentDimension, and use
it for determining the scroll position of the text
field.

Partial fix for http://b/issue?id=2133049

Change-Id: I0ded3be264b179bad39301e6adce86851b649a42
2009-09-21 15:54:21 -04:00
Leon Scroggins
d7b95aa702 Always interpret (0,0) scrolls as top of title bar.
Move the specialized code in NEW_PICTURE_MSG_ID to
setContentScrollTo so that a scroll to (0,0), whether
a result of a NEW_PICTURE_MSG_ID or from an initial
layout (or otherwise) is treated as scrolling to the
top of the content, including showing the title bar.
Scrolls to (0,1) will trigger code that animates the
title bar off screen.

Change-Id: Ia6db6d4620dea2bfe62407c4394a8ead38501b2f
2009-09-21 14:18:09 -04:00
Grace Kloba
f8d8b46a2c Add a tip toast for double tap.
Fix http://b/issue?id=2059934
2009-09-21 10:10:11 -07:00
Cary Clark
5bb6b52bf3 Account for find dialog height in content height
Use the set dialog height when the find dialog is up so that
found items at the bottom of the screen are scrolled into view.

This requires a companion change to set the dialog height in
the browser app.

Fixes http://b/issue?id=2122916
2009-09-21 12:48:50 -04:00
Leon Scroggins
03c87bf51c Allow a webpage that wants to scroll off the title bar to do so.
Slows down the animation so the user can see it slide away.  Also
move the animation to before we change to view coordinates so it
will not be dependent on the zoom level/screen resolution.

Change-Id: Icc54b2b26c08cd54d84b4e9892a316a5712534e4
2009-09-21 10:58:54 -04:00
Grace Kloba
17dd1aebf5 When double tap zoom out to overview mode, force reveal the full
title bar if it is partial visible.

http://b/issue?id=2110583
2009-09-18 15:11:51 -07:00
Android (Google) Code Review
fd49faae33 Merge change 25772 into eclair
* changes:
  Add progress view and default poster for the <video> implementation
2009-09-18 14:22:01 -04:00
Andrei Popescu
bf385d7c7b Add progress view and default poster for the <video> implementation 2009-09-18 19:07:17 +01:00
Leon Scroggins
83d4ba83dd Do not attempt to retry a scrollTo with a negative position.
Fixes http://b/issue?id=2093435

Change-Id: If938c8f6e5d74b91e39a06a5736967663c9800b7
2009-09-18 12:44:03 -04:00
Grace Kloba
6ed525ecee When a WebView starts, we may get first layout before viewSizeChanged()
ever get called. Call WebView's getViewWidth() to get the current UI
width. If it is still 0, log a warning.

Fix http://b/issue?id=2128645
2009-09-18 09:21:33 -07:00