Commit Graph

908 Commits

Author SHA1 Message Date
Grace Kloba
fba3197d9e Do not call AlertDialog.show() if the context is not
the focused Activity. In that case, just take the
default cancel.

Change JSAlert to be cancelable like JSConfirm.

Fix http://b/issue?id=2741195
2010-06-04 17:31:33 -07:00
The Android Open Source Project
eefd63e357 am 0a0c57f9: am 7c035d8a: am 2d743fe2: merge from open-source master 2010-06-04 13:02:38 -07:00
The Android Open Source Project
2d743fe2f3 merge from open-source master
Change-Id: Ic9060d92c014d6cbe9d90ce8deca8fa111711471
2010-06-04 11:08:36 -07:00
Derek Sollenberger
627eca9b62 Merge "Update EmbeddedZoomControl to use new ZoomManager methods." 2010-06-03 10:35:04 -07:00
Derek Sollenberger
341e22ffce Refactor zoom logic from WebView to ZoomManager.
This CL is one in a series of CL's intended to remove the zoom
logic from WebView. This CL focuses on refactoring the initialScale
variable as well as the onSizeChanged() and NEW_PICTURE_MSG portions
of the code.

Change-Id: Id44bce50378aa7cdfc1c8110818e18500679c517
http://b/2671604
2010-06-03 09:37:36 -04:00
Derek Sollenberger
af39e4b802 Update EmbeddedZoomControl to use new ZoomManager methods.
Change-Id: Icea2bea36d42ff58a05600ceb4388992bc8979d7
2010-06-02 12:55:40 -04:00
Ben Murdoch
347d50fb1f Merge "Frameworks changes to enable File Reader and blob.slice APIs." 2010-06-02 04:29:39 -07:00
John Eckerdal
dad86349be Add better error handling for savePicture and restorePicture
If an Exception occurs when storing the file treat this as an error
and always fail to try to prevent corrupted pictures to be stored to
the file system.

Close files if they were opened, the caller might want to perform other
file operations on the file and if it is still open these may fail.

Change-Id: Ic68596b5c745bbe413096c22684c388e853a7643
2010-06-02 10:59:46 +02:00
Grace Kloba
ec9a104ce9 If the WebView can't be scaled, don't check for
double tap. This will make the click event on the
non-scalable page much responsive.

Fix http://b/issue?id=2645880
2010-06-01 19:00:23 -07:00
Grace Kloba
6164ef1b78 Expose canZoomIn and canZoomOut for WebView. 2010-06-01 16:09:58 -07:00
Romain Guy
a393a85d2b Fix build warnings about improper ASCII encoding.
Change-Id: I5f26278e74a0a7018059db75ca44a36c42c559f3
2010-06-01 14:06:24 -07:00
Derek Sollenberger
87b17be55e eoving Zoom animation logic from WebView into ZoomManager. This is
pick bad5ede Revert "Refactor the on-screen zoom controls into a separate class."

one part of a series of CL's that is intended to refactor all zoom
logic into the ZoomManager.

Change-Id: I6260c7d2daade4861df1296c9db364ee2a892bd0
http://b/2671604
2010-06-01 15:03:53 -04:00
Ben Murdoch
65b4cdabb0 Frameworks changes to enable File Reader and blob.slice APIs.
Rather than just storing the name of the file that the user chose in the file picker,
store the full path to the file. That way we can open it using the file API and still
extract the filename itself by simply chopping off all but the last path segment.

Change-Id: I25f2fe818deda8ca848f0da02cf45ae97d2127fb
2010-06-01 19:29:38 +01:00
Grace Kloba
e80cbcc051 merge two restore scale to one.
There is a matching CL in external/webkit
2010-05-28 18:07:50 -07:00
Leon Scroggins
acea08d20f Prevent a null pointer exception.
Bug 2721268

Change-Id: I3a9e838ed3f2f9dccdf7b4bf42a0dbad58e62e02
2010-05-27 15:09:32 -04:00
Grace Kloba
178db41234 Experimental feature: use WebKit to find out the selection
highlight.

The new setting, supportTouchOnly(), is currently not
fully implemented. It is overloaded with mLightTouchEnabled
for short term testing. To test the feature, please
use the "Enable Light Touch" in the debug settings.

When supportTouchOnly is true, we are not using nav
cache to display the yellow ring. Instead we show 
the gray rectangle(s) based on the calculation from
WebKit. When short press happens, we current use 0
for mMoveGeneration so that it will trigger WebKit
to use the same point when it calculates the highlight.

If you turn on NavDump in the debug settings, it will
also draw the fat point where you tap on the screen.

Known issues, it is not fully synced with IME. If you
tap a text input box also in focus, the yellow ring
will show up. If you leave the text input field, the
IME is not dismissed. If this passes the user tests,
we will make a special mode and fix all these issues.

There is another matching CL in external/webkit
2010-05-27 09:22:42 -07:00
Ben Murdoch
a3f055e205 Fix layout test failure with fast/events/touch/touch-stale-node-crash.html
This layout test is currently failing due to timing out in DRT.

The issue is that the test sends a down, up, down sequence quickly. For
each down event, we post a PREVENT_DEFAULT_TIMEOUT message to the
WebView's message handler. WebCore responds to the first touch event and
we update the mPreventDefault state variable correctly. The second touch down
resets mPreventDefault as it's the start of a new touch sequence and a second touch down is posted
to the WebCore thread.

At this point we still have the first TIMEOUT message in the WebView queue. The problem occurs
when the WebView processes this timeout message before the WebCore thread processes the second
touch down message. In this case the WebView clears the WebCore thread's message queue and instead posts
touch cancel events, erroneously removing the second touch event. This timeout message should not have been
processed as it was associated with the first touch down that had already been completed. Without the
second touch the test never completes.

The fix is to remove PREVENT_DEFAULT_TIMEOUT messages from the queue before starting
a new touch sequence.

Change-Id: Ief054239529d710a79a0e58a589bd7a92434dbf2
2010-05-27 10:41:55 +01:00
Derek Sollenberger
03e4891571 Refactoring more webview zoom code into ZoomManager.
This CL is #2 of multiple CL's to remove the zoom code
from webview and place it into webkit.ZoomManager. Each
commit is only part of the entire refactoring so there
are many ZoomManager.* variables still referenced from
WebView.

Change-Id: I21f6517dff46b65a277bc67120ffabe043098e5e
http://b/2671604
2010-05-25 18:04:06 -04:00
Leon Scroggins
eb51f3e340 Check for null before using Layout.
Bug 2713024

Change-Id: Iaad5c774fa1e16c341d481104f8fd38f7add3082
2010-05-25 11:33:03 -04:00
Ben Murdoch
fa296a4c90 Add a string for the no file chosen label, shown on a file upload control when the user has not yet picked a file.
Requires external/webkit change.

Change-Id: Idb1039a7c39b18249579794df523afb6144fba47
2010-05-21 10:18:35 +01:00
Ben Murdoch
4ae32f5f11 Allow passing of accept types from WebCore to Java for the file picker.
Requires a change in external/webkit and packages/apps/Browser.

Change-Id: I0fe5f0edb00be0f329f07e42e84f88aced543d17
2010-05-21 10:18:35 +01:00
Ben Murdoch
cc749dee63 Add a method on the JavaBridge to resolve filenames from content URIs.
Requires an external/webkit change.

Change-Id: I7cc9a1c9c544546ca4fe8a212d3d60183ad99c36
2010-05-21 10:18:35 +01:00
Scott Main
5ddfac4239 am 68cc7187: am 8473259d: am 74e151c5: am 5f1d1002: Merge "docs: fix markup error" into froyo 2010-05-18 09:12:37 -07:00
Scott Main
74e151c54c am 5f1d1002: Merge "docs: fix markup error" into froyo
Merge commit '5f1d100298dfafbd996b6deff457e6d1de4008a0' into froyo-plus-aosp

* commit '5f1d100298dfafbd996b6deff457e6d1de4008a0':
  docs: fix markup error
2010-05-18 09:02:09 -07:00
Scott Main
e3b9f8b9b2 docs: fix markup error
Change-Id: I59a42f47483d76b6a3220b1d88e9d6bd96f83daf
2010-05-18 08:43:11 -07:00
Steve Block
5de72739b7 Merge "Make sure Geolocation is robust to location providers being absent on the device." 2010-05-18 08:28:42 -07:00
Steve Block
3d9e066ab3 Make sure Geolocation is robust to location providers being absent on the device.
Bug: 2692830
Change-Id: I19f88e20f00fe7ecfb77c06197213d273bd80411
2010-05-18 15:16:55 +01:00
Grace Kloba
5e02c431a3 If we can't scroll any more, stop the animation and
resume update. Otherwise, we can't touch select until
the scroller animation is done.

Fix http://b/issue?id=2666473
2010-05-17 20:38:21 -07:00
Grace Kloba
3c19d99042 If the new fling is much slower (less than 1/5 of
the previous fling), don't accelerate it.

Fix http://b/issue?id=2672074
2010-05-17 20:34:08 -07:00
Scott Main
b3976bb395 am 0583ac4c: am 9719fe11: am fbb285e6: am e64256d6: Merge "docs: revise webview description and add info for targeting screen densities" into froyo 2010-05-17 18:07:55 -07:00
Scott Main
fbb285e67f am e64256d6: Merge "docs: revise webview description and add info for targeting screen densities" into froyo
Merge commit 'e64256d610ec5ea3df5db8a24333a6ce98b83d49' into froyo-plus-aosp

* commit 'e64256d610ec5ea3df5db8a24333a6ce98b83d49':
  docs: revise webview description and add info for targeting screen densities
2010-05-17 18:01:28 -07:00
Scott Main
8b3cea01bf docs: revise webview description and add info for targeting screen densities
Change-Id: Ib0293b497adef23330ee3f5f71904ad78a55a3a3
2010-05-17 17:48:30 -07:00
Grace Kloba
20ca117770 Update the mLatestProgress of CallbackProxy even
mWebChromeClient is null as WebView needs it.

Fix http://b/issue?id=2685989
2010-05-17 13:08:05 -07:00
Derek Sollenberger
90b6e48793 Refactor the on-screen zoom controls into a separate class.
This CL is the first in a series of CL's that will extract the
zoom code from WebView and put it into ZoomManager.  This initial
CL only extracts the on-screen zoom controls and required variables
into the ZoomManager.  Since the on-screen controls are well defined
I put them into their own class called ZoomControls.

All of WebView's zoom interactions are handled by the ZoomManager.
The ZoomManager can then handle the request internally or as in the
case of on-screen controls pass the request to another class.

Change-Id: Icfc91ed0456c88d633249c26b9afc7dd216f75a1
http://b/2671604
2010-05-17 13:49:40 -04:00
Svetoslav Ganov
da35551845 Adding accessibility content provider responsible for user script injection. Adding support for injecting accessibility in WebViews with disabled JavaScript.
Change-Id: I1576238a0f855bb54e25d19404b8404d7d0f6037
2010-05-15 12:10:13 -07:00
Grace Kloba
f0cec93f69 am d4ef2973: am 2fb3b394: am bfc63c7b: am 336d7dcb: The default AlertDialog allows cancel. But the default JSConfim doesn\'t have a cancel listener. So when user cancel the dialog, we do not wake up the WebCoreThread. The same code is already done for JSPrompt dialog 2010-05-12 15:39:26 -07:00
Grace Kloba
bfc63c7b83 am 336d7dcb: The default AlertDialog allows cancel. But the default JSConfim doesn\'t have a cancel listener. So when user cancel the dialog, we do not wake up the WebCoreThread. The same code is already done for JSPrompt dialog correctly.
Merge commit '336d7dcb105a43ee4de51fd0f26f277c63662f02' into froyo-plus-aosp

* commit '336d7dcb105a43ee4de51fd0f26f277c63662f02':
  The default AlertDialog allows cancel. But the default
2010-05-12 15:33:30 -07:00
Grace Kloba
336d7dcb10 The default AlertDialog allows cancel. But the default
JSConfim doesn't have a cancel listener. So when
user cancel the dialog, we do not wake up the WebCoreThread.
The same code is already done for JSPrompt dialog correctly.

Fix http://b/issue?id=2679139
2010-05-12 14:28:07 -07:00
Leon Scroggins
2c8e051508 Remove text options when longpressing off a textfield.
Bug 2676172

Change-Id: Ib1eff9a6e7a8ff3e83897a89b6bb4fab9bb7b0c4
2010-05-12 14:45:49 -04:00
Leon Scroggins
810f5ccb99 Remove unnecessary calls to rebuildWebTextView.
Bug 2674635

Change-Id: Ib33a5486b880868de7182c36a22f204383c58149
2010-05-11 15:20:13 -04:00
Nicolas Roard
9863ba94f0 resolved conflicts for merge of bfd6805a to master
Change-Id: Ie975e4cd7391d62949c563453358aa999c8a4b45
2010-05-11 10:40:11 -07:00
Nicolas Roard
373b4913ab am f78acacb: Fix the \'wobbling fixed elements\' bug. Cherry-picked from master. This CL has a corresponding C++ counterpart (https://android-git.corp.google.com/g/#change,51149)
Merge commit 'f78acacb0d7a8e4d9e85a1cd6eed0f6bb38d6776' into froyo-plus-aosp

* commit 'f78acacb0d7a8e4d9e85a1cd6eed0f6bb38d6776':
  Fix the 'wobbling fixed elements' bug.
2010-05-11 10:18:59 -07:00
Nicolas Roard
f78acacb0d Fix the 'wobbling fixed elements' bug.
Cherry-picked from master.
This CL has a corresponding C++ counterpart (https://android-git.corp.google.com/g/#change,51149)

Bug:2665696
Change-Id: I0a044661ff21ef601ba34782db8acdc9531f98e7
2010-05-10 19:31:54 -07:00
Nicolas Roard
46318cf9bf Fix the 'wobbling fixed elements' bug.
This CL has a corresponding C++ counterpart (https://android-git.corp.google.com/g/#change,51149)

Bug:2665696
Change-Id: I28516005d03afa866efed2677197120ac6e2d579
2010-05-10 16:35:52 -07:00
Nicolas Roard
4b71913ea7 Add the HTML5Audio class, to support the audio tag.
The corresponding webkit C++ CL is https://android-git.corp.google.com/g/#change,41405

Change-Id: Ia4169c353cde8cd8ee5786b874ff466897e3553e
2010-05-07 12:01:43 -07:00
Leon Scroggins
6a367f5cb0 Provide a getter to tell the index of the current found match.
Part of fix for bug 2663680

Requires a change to external/webkit.

Change-Id: I1279963cf219eb365dd72262710f87c83acd8c4d
2010-05-07 09:11:09 -04:00
Leon Scroggins III
26723fc89d Adjustments to accommodate changes in Find dialog.
Remove mFindHeight, and the associated adjustements. It
is no longer needed because the FindDialog is no longer
on top of the WebView; instead, the WebView is resized to
accommodate it.
Do not take focus if the user touches the WebView while
Find is up.
Add a (hidden) getter to check to see if Find is showing.

Requires a change to packages/apps/Browser

Change-Id: I08cedb02d29eeeaac6860aa0933ccab43ed5c39f
2010-05-06 11:42:28 -04:00
The Android Open Source Project
108817f3d8 am 8b270a7a: am 579e08e6: am f7896449: merge from open-source master 2010-05-05 18:16:31 -07:00
The Android Open Source Project
f78964490d merge from open-source master
Change-Id: Ia9e1f4e049f5870386ea29ddb6e3ef028ea918da
2010-05-05 15:57:42 -07:00
Leon Scroggins
9ab32b6642 Enable contentEditable.
WebView.java:
If the cursor and focus are on a contentEditable element, allow it
to handle navigation keys and shift rather than the navigation system.
Also rename method for its new more general use.

WebViewCore.java:
Change the name of MOVE_OUT_OF_PLUGIN to a more generic name, and
fix a bug in the message being sent.

Bug 1788820

Requires a change to external/webkit

Caveats:
Does not ensure that the caret remains on screen.  Frame::revealSelection
is called, but we ignore it for other reasons.  Need to investigate that.
The cursor will blink if the contentEditable node has focus, even if the
user has not clicked on it or has moved to a different input field. Further,
while in this state, the user can input text.

Change-Id: Iaa935363fd324925a1e338418d32f362f58c4494
2010-05-05 14:56:41 -04:00