Commit Graph

525 Commits

Author SHA1 Message Date
Grace Kloba
9a67c82089 Address the multiple resizing during initializing
problem adobe run into.

When a child view is created, we first hide it if
the webview is not ready to draw yet. This will avoid
the multiple resizing notification.
2009-12-20 11:33:58 -08:00
Mike Reed
19f3f0e329 add DragTracker class 2009-12-18 12:25:30 -05:00
Grace Kloba
11438c371e Implement the full screen WebView plugin.
Use a NoTitleBar_Fullscreen dialog to implement the
full screen plugin. This runs in the same thread as
WebView (UI in the Browser case). One catch is that
the SurfaceView provided by the plugin needs to be
opaque if it doesn't want to see through the WebView.

The PluginFullScreenHolder translates the events to
the underline WebView. Special treatment in the touch
case as it needs to translate the coordinates.

WebView can't be panned, or double tap to zoom, or
long press to trigger the context menu while having
a full screen plugin.

Inside webkit, we also give the plugin element focus
when it goes to the full screen so that it takes key
events. While handling key events, we don't let it 
loose focus or scroll out.

Todo:
When a plugin goes to full screen, we should make
sure the embedded plugin is fully visible. Otherwise
when we translate the touch events back, they will be
outside of the visible rect and will be ignored.

This is part 1 of 2-project check in.
2009-12-16 11:39:12 -08:00
Cary Clark
1cb97eed56 check to see if nav cache is up to date on tap
Pass point to click in three steps.
1) See if point corresponds to cached node.
2) If so,send a message to webkit to see if the node is good.
3) Call webkit with point, and good/bad info.

This is a two-part change with external/webkit.

Fixes http://b/2249425
2009-12-15 13:40:43 -05:00
Leon Scroggins
aacced6bc5 Provide localized strings for <input> labels.
Fix for http://b/issue?id=2178786

Provide strings for input types file, submit, and reset, and allow
them to be passed down to native.

Requires a change in external/webkit.
2009-12-15 08:49:59 -05:00
Derek Sollenberger
b6ddc7ae35 Notify native plugin code when the browser discards the customView. 2009-12-14 08:48:42 -05:00
Grace Kloba
70b942d34d Post a Runnable to execute setNewZoomScale when
WebView's onSizeChanged is called. This will ensure
requestLayout of the Child View works.

Fix http://b/issue?id=2323445
2009-12-12 12:35:54 -08:00
Mike Reed
8b30209727 Update the zoom buttons after moving to a new page.
Move set VISIBLE out of updateZoomButtonsEnabled.
And add it to a place it needs it.

Fix http://b/issue?id=2257742
2009-12-10 17:52:10 -08:00
Android (Google) Code Review
c7f7c94034 Merge change Id469ba88 into eclair-mr2
* changes:
  Listen for window orientation events.
2009-12-09 11:30:00 -08:00
Patrick Scott
f06364b8c6 Listen for window orientation events.
These will be sent to webcore as orientation events.
2009-12-09 14:27:24 -05:00
Grace Kloba
5f68d6fafc Enable longpress and doubletap to WebKit as touch
event if it is requested.
2009-12-09 11:13:30 -08:00
Android (Google) Code Review
a50d450863 Merge change I75481cb8 into eclair-mr2
* changes:
  Check that the resolved activity is not in our package.
2009-12-09 09:52:24 -08:00
Patrick Scott
75481cb860 Check that the resolved activity is not in our package.
Ideally, I would like to allow Activities in the same package to intercept mime
types but there is no way to get the current Activity information from a generic
Context object. For now, skip resolved Activities that are in the same package.

Bug: 2314904
2009-12-09 11:09:04 -05:00
Leon Scroggins
47fabbfcbf Pass a message to move the focus when user hits "Next".
Directly move the focus rather than passing a click.

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

Requires a change to external/webkit
2009-12-09 10:19:10 -05:00
Grace Kloba
3f40bd48d2 Remove the code where we suspect webkit draw during
drag. It was added for the better performance of panning
while loading. But it does make sites using touch event
look bad as we don't have the display tree until touch up.

Fix http://b/issue?id=2310295
2009-12-08 13:49:50 -08:00
Leon Scroggins
6be3bf2393 Some fixes for positioning the WebTextView.
Move the change in position/size before the call to bring into view,
so that the properly positioned field will be brought into view.  It
is also now before we check to see if it is the same textfield, so
it happens in both cases.

Also remove some code which checks the selection and then sets it
unnecessarily.  It was originally surrounding some code which called
setRect, which had a side-effect of changing the selection.  That
code was removed (rendering the remaining code useless), and setRect
no longer has the side effect (the side effect was a result of calling
reqestFocus, which it no longer does - further, the change in selection from
requestFocus no longer affects the textfield's text).
2009-12-08 14:15:25 -05:00
Derek Sollenberger
51ef573a83 Switching from activity based full screen plugins to a view system overlay. 2009-12-08 08:12:44 -05:00
Android (Google) Code Review
6761e85d41 Merge change Idff5eb2a into eclair-mr2
* changes:
  Set InputType of WebTextView according to <input> field's type.
2009-12-07 13:39:22 -08:00
Leon Scroggins
aa7b9d7826 Set InputType of WebTextView according to <input> field's type.
Help fix http://b/issue?id=2150538 and http://b/issue?id=1890360

Use the <input type> information to set the InputType, so that
the IME can show the correct options.  Also consolidate setup
of WebTextView into setType().

Requires a change in external/webkit.
2009-12-07 16:36:34 -05:00
Grace Kloba
ddcea3d216 Expose onReceivedSslError() so that the WebView client
can accept the error and continue.

Fix http://b/issue?id=2299152
2009-12-07 13:20:33 -08:00
Grace Kloba
bd5c823e28 Add "res" support for WebView.
http://b/issue?id=2296839
2009-12-07 12:36:05 -08:00
Leon Scroggins
9e3e2d3a69 Show search icon for <input type="search"> fields.
Along with a change to external/webkit, fixes http://b/issue?id=2299650
2009-12-07 10:21:41 -05:00
Patrick Scott
7c24ed6904 Check if another Activity wants to intercept an xml mime type.
WebCore treats */*+xml as content that it can render. This prevents Activities
from intercepting those mime types. Check the same regular expression as
DOMImplementation and then use the PackageManager to look for a matching
Activity.

Requires a change to webcore.

Bug: 2256744
2009-12-04 13:19:52 -05:00
Leon Scroggins
b5c7ef331c When passing the Message for saved form data, pass the node pointer properly.
Partial fix for http://b/issue?id=2232001

We were calling obtainMessage with the node pointer as an argument.  What we
really need to do is set arg1 to the node pointer.  Also, avoid checking for
saved form data for password fields and fields whose names are blank.
2009-12-02 15:06:41 -05:00
Android (Google) Code Review
4eeace3db5 Merge change I097b1e77 into eclair-mr2
* changes:
  Add PageCacheCapacity to the WebSettings.
2009-12-02 11:43:56 -08:00
Leon Scroggins
cfc2915d92 In setDefaultSelection ensure that webkit is notified of the new selection.
Fix for http://b/issue?id=2254732
2009-12-02 10:27:22 -05:00
Romain Guy
f7b4accbda Fix scroll jump in ScrollView.
If a touch event was targeted at a ScrollView child, the content would jump after
the user moved her finger by the required threshold. This is inconsistent with
ListView's behavior.

Fixes #2296622.
2009-12-01 18:58:46 -08:00
Android (Google) Code Review
cf98f4268c Merge change I325e22ca into eclair-mr2
* changes:
  Fix a leak in WebView.
2009-12-01 16:40:07 -08:00
Romain Guy
01d0fbfa68 Fix a leak in WebView.
Fixes #2296601.

WebView and its related APIs are keeping static objects that hold references to
Context instance. This could cause applications to leak their first Activity
and all the associated resources.
2009-12-01 16:37:59 -08:00
Android (Google) Code Review
732a1223b2 Merge change I42d00fbe into eclair-mr2
* changes:
  fix issue with plugin surfaces not updating properly within the view system.
2009-12-01 12:26:54 -08:00
Derek Sollenberger
42d00fbe55 fix issue with plugin surfaces not updating properly within the view system. 2009-12-01 15:19:42 -05:00
Leon Scroggins
ed90811e71 Do not peform a click/move if longpress has been performed in WebTextView. 2009-12-01 11:39:46 -05:00
Derek Sollenberger
51e45ff0d5 Cleanup how a plugin goes full-screen.
The plugin activity now fetches the plugin's existing java class from native code instead of creating a new one.
2009-12-01 08:50:24 -05:00
Derek Sollenberger
cb37e71509 Refactoring plugins to use new java interfaces.
This change adds 3 new interfaces for plugins to the framework. This
change also includes extensive cleanup as we consolidate internal plugin
functions into the pluginManager.  Also using the new interfaces we no
longer need to pass  additional parameters in quite a few methods.
2009-11-30 08:42:43 -05:00
Leon Scroggins
f90b1261a5 When clicking on a WebTextView, always call nativeMotionUp.
We were previously calling nativeTextInputMotionUp, which was
intended to be faster than nativeMotionUp, which does more work.
However, as discussed in http://b/issue?id=2257787 , I think we
should simply call nativeMotionUp, which does everything the old
method did, while also correcting things if necessary.  This fixes
the second problem listed in http://b/issue?id=2266756 , since
nativeMotionUp will recognize that the <select> element should
take the click.

Since I have removed a native method, this requires a change to
external/webkit.
2009-11-25 10:14:50 -05:00
Grace Kloba
097b1e777a Add PageCacheCapacity to the WebSettings.
By default, page cache is disabled.

http://b/issue?id=2284168
2009-11-24 17:53:13 -08:00
Leon Scroggins
ecfc0eba60 Fix soft keyboard dismissing itself when zooming into a textfield in browser.
We remove the WebTextView while zooming.  If the WebTextView ended up
offscreen, we remove it completely, thus hiding the IME.  In some cases,
however, the WebTextView is only offscreen because the IME overlapped it.
Check to see if the IME is showing, and if so, adjust the WebTextView and
let it get scrolled into view.

Also perform the removal/change in text size inside the method, so it
happens in both places.

Lastly, do not call didUpdateTextViewBounds if there is no WebTextView.

Fix for http://b/issue?id=2266066
2009-11-24 09:21:48 -05:00
Android (Google) Code Review
ed1624d8ff Merge change I8ae1b41a into eclair-mr2
* changes:
  Expose some debugging tools of the WebView.
2009-11-23 12:07:20 -08:00
Grace Kloba
8ae1b41a43 Expose some debugging tools of the WebView. 2009-11-23 10:35:34 -08:00
Ben Murdoch
7caaeecce1 Rename WebChromeClient.addMessageToConsole to WebChromeClient.onConsoleMessage.
BUG=b/2271636

Change-Id: Ia9bed430c624c4c3745904c98fb2e27632d929f9
2009-11-20 10:14:46 +00:00
Android (Google) Code Review
98fdda0925 Merge change I86773fbb into eclair-mr2
* changes:
  If overview width is the same as the current width, don't change the mode when double tap or zoom out.
2009-11-19 13:47:24 -08:00
Steve Block
57534f1b9f Improves documentation for GeolocationPermissions class.
Also sets an explicit type for GeolocationPermissions.getOrigins.

This is a partial fix for bug http://b/issue?id=2271636

Change-Id: Ife478917a979b68e242c467798358a018455957f
2009-11-19 19:59:14 +00:00
Grace Kloba
86773fbb4e If overview width is the same as the current width,
don't change the mode when double tap or zoom out.

Fix http://b/issue?id=2240785
2009-11-19 11:25:20 -08:00
Android (Google) Code Review
b0fbb7cc15 Merge change I09e159ce into eclair-mr2
* changes:
  Update JavaDoc for CacheManger.CacheResult, WebChromeClient.getDefaultVideoPoster and WebChromeClient.getVideoLoadingProgressView.
2009-11-19 09:08:22 -08:00
Ben Murdoch
f0c443deca Update JavaDoc for CacheManger.CacheResult, WebChromeClient.getDefaultVideoPoster and WebChromeClient.getVideoLoadingProgressView.
Change-Id: I09e159cec0ccdf09b278daeeab268c0c4f4476ba
2009-11-19 16:48:16 +00:00
Ben Murdoch
0a784a5453 When requesting the href of a link, also request the link's text.
Change-Id: If3cf97d0b328d654919b1334b07d4c8cc7b1a9ea
2009-11-19 10:21:32 +00:00
Grace Kloba
a4fa107f97 Do not grow the viewport width to infinite to fit
the content. Limit the overview viewport width to
a level that if a site behaves badly, the WebView
still does reasonably.

Partially fix http://b/issue?id=2209659
maps.yahoo.com keeps growing due to a layout bug.
This prevents the browser to go insane.

Partially fix http://b/issue?id=2215387
caltrain.com has a super long &nbsp; which caused
the page super wide. This prevents the browser to
become unusable.

This change will make sites like, caltrain.com/timetable.html
not fit all in the view. You have to scroll left
and right. And it is same as iPhone.
2009-11-18 09:25:15 -08:00
Cary Clark
32847a97e1 rename nativeFindIsDown to nativeFindIsUp; check for null webkit
companion fix is in external/webkit

fixes bug http://b/issue?id=2264941
2009-11-17 16:08:49 -05:00
Leon Scroggins
a57632fee7 Fix bugs around removing and attaching WebViews.
When removing a WebView from its Window, remove the WebTextView.
Remove the old attempt to do the same, which was not being called.

When attaching a WebView to a Window, call onWindowFocusChanged so
its state of drawing the selection ring returns.

Fixes http://b/issue?id=2257787 and http://b/issue?id=2260867
2009-11-16 11:47:12 -05:00
Grace Kloba
4888c7da45 am dc30d28b: Merge change I3656f7a3 into eclair
Merge commit 'dc30d28bc8321171fbf4ed92a9486eb8dd382259' into eclair-mr2

* commit 'dc30d28bc8321171fbf4ed92a9486eb8dd382259':
  Honor the mInitialScale set on WebView. This was
2009-11-11 20:15:02 -08:00