Commit Graph

1189 Commits

Author SHA1 Message Date
Brian Carlstrom
5d4c6226ca Merge "Correctly parse cookies with spaces after = in attributes" 2010-11-10 08:52:33 -08:00
Brian Carlstrom
87ad930037 Correctly parse cookies with spaces after = in attributes
Bug: 3167208
Change-Id: I8adebf9f9e92967a3250e61ccfbb45e02bbee3f9
2010-11-09 22:03:17 -08:00
Shimeng (Simon) Wang
dbf5ff294a Update textwrap scale when content width changes in overview mode.
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
2010-11-09 17:01:13 -08:00
Ben Murdoch
f7093befbb Calculate memory thresholds that V8 can use to control GC.
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
2010-11-09 10:09:42 +00:00
Leon Scroggins
7f7bd52568 Disallow scroll intercepts while changing text selection.
Bug:3107564
Change-Id: I81d173b3d7b6fdbe335ef351917402fc01a4c52e
2010-11-08 09:36:54 -05:00
Ben Murdoch
01b04e10df Fix potential NPE in WebView
New up and initialise the data structure for tracking autofillable
form fields properly. We should not wait for the first autofill
message from WebCore as we have some special state values we need
to set.

Change-Id: Ic30b9ac69436f784d65e50dcabe6af1ef3326ff4
2010-11-08 10:49:16 +00:00
Jason Chen
db87c0df6f resolved conflicts from merge of c3b112ba to master
Change-Id: I76a5f88849ab617af3316d63378bf3296256e8e1
2010-11-05 20:21:29 -07:00
Cary Clark
4debfcb3d4 Don't draw the selection pointer on long press.
bug:3169375
Change-Id: I76cedf0951213c1ee869ccbaa97938f0c6385942
2010-11-05 14:43:10 -04:00
Jean-Baptiste Queru
c3b112ba20 Merge db2403ff from open-source master
Change-Id: I90dfa2f37db901b62690b6becbf5d0d91468672c
2010-11-05 07:53:24 -07:00
Patrick Scott
f3e5fcc917 Fix the build and scrollable layers gesture.
Change-Id: I06f7c379f187df982ac82c9a52cc643358987085
2010-11-05 10:42:06 -04:00
Ben Murdoch
db8d19c9cb Display the AutoFill preview string in the drop down box.
Native code now provides us with a preview string as well as
an autofill query id. Display the preview string in the
drop down box.

Requires a change in external/webkit:
https://android-git.corp.google.com/g/#change,77132

Change-Id: Ia5e26b98546cda1090142f1720f6a7836be6595c
2010-11-05 12:33:29 +00:00
Ben Murdoch
202a2c974e Merge "Work around race condition in CallBackProxy." 2010-11-05 10:12:21 +00:00
Shimeng (Simon) Wang
619ded23ce Use minPrefWidth instead of viewsize.x.
This is to fix a bug I introduced in one of my last CLs, which is tested
under hw accerlation, and the problem was not there.

issue:3161799
Change-Id: Ic7e7c186d1830c3cbd9359af0e283afbbdfbbac1
2010-11-04 17:58:17 -07:00
Ben Murdoch
0406e48db9 Work around race condition in CallBackProxy.
If WebCore requests two (or more) alert/prompt/confirm dialogs
in quick succeession, we have a race that when the dialog is dismissed
the WebView does not have it's focus restored before the next dialog
is requested to be shown and we early out of displaying the dialog (i.e.
we do not show it).

Work around this by no longer verifying that the Activity has focus as
this check seems to be redundant anyway (see 3166409).

Bug: 3151825, 3166409

Change-Id: I7f650b066ee63da92bc9a620b8e190c91b306d3e
2010-11-04 19:51:06 +00:00
Leon Scroggins
b5ce0e0532 Use the new web email and password variations.
Bug:2460543
Bug:3094312
Bug:2692655
Bug:2710595

Use the NEXT flag when there is a following
textfield.

In TextView, treat the new variations like email and password
variations.

Requires a change in LatinIME so that these fields work propely:
https://android-git.corp.google.com/g/#change,77721

Change-Id: Id6517a016db7d50b77570ff77f2635027796da4a
2010-11-04 14:02:14 -04:00
Kristian Monsen
badf945656 Move more of android file handling in Java
Moving some of the code (finding which kind of file it is and
deleting parts of the url) to Java from C++.

Is needed by the following change in external/webkit:
https://android-git.corp.google.com/g/#change,77383

Change-Id: Ifc6008501eb580a0aaa5e307732b6f49ebd19ac4
2010-11-04 12:05:58 +00:00
Shimeng (Simon) Wang
27c31388e4 Prevent 0 content width.
Sometimes content will be set to 0 from webkit.

issue: 3161799
Change-Id: Ib17322c2e71535105d0f961674cedce63f66a534
2010-11-03 14:18:40 -07:00
Matthias Thomae
bdb0896ba5 Add support for UAProf header in HTTP requests
Each HTTP request sent from a mobile handset is usually required to
include a x-wap-profile header following the UAProf specification. The
value of this header is a URL that points to the location of a
document which specifies relevant capabilities of the phone, e.g.
supported network bearers, video formats or screen size. This change
defines a global string resource that holds this URL, and also adds
the necessary code in the web widget to include this header in HTTP
requests.
2010-11-02 13:26:24 +01:00
Nicolas Roard
fb7bc34b23 Update layers only
Java counterpart to https://android-git.corp.google.com/g/#change,77334

Bug:2975990

Change-Id: I428944c30cedddc47a2c4f8c772167dd4ce2a78d
2010-11-01 16:55:41 -07:00
Leon Scroggins
c826a69355 Merge commit '55381217' into manualmerge
Conflicts:
	core/java/android/webkit/WebView.java

Change-Id: I1e93881a55c1d81c1142db03498c68196649b69c
2010-11-01 18:00:55 -04:00
Leon Scroggins
553812178a am 3073646f: Merge "Update insertion handler for WebTextView." into gingerbread
* commit '3073646f61dcbbfe5c9e65b8e3a1d9266c3f7276':
  Update insertion handler for WebTextView.
2010-11-01 14:51:00 -07:00
Leon Scroggins
5642625cfb Update insertion handler for WebTextView.
Bug:3152629
Change-Id: If2a33eb5456493fb9b3b2c54fcc4f5348fe129e1
2010-11-01 15:45:37 -04:00
Shimeng (Simon) Wang
170d2ee726 Merge "Stabilize reflow, aka, the fit-to-screen option in settings." 2010-10-29 13:58:18 -07:00
Shimeng (Simon) Wang
c55886aee8 Stabilize reflow, aka, the fit-to-screen option in settings.
This change is only for tablet device which has large screen and
good for fixed viewport.

The reflow will only happen in first layout and double tap if the
text wrap scale is not desired.

The initial text wrap scale is set to the reading level, so that if
the web page is in overview mode, after a double tap, the text will
be nicely shown full screen without any reflow.

All the previous reflowing, such as done when zoomed out, are disabled for
tablet device.

issue: 3003933
Change-Id: I8f460704bb27c50d6f5fa259ca2d5007648adfba
2010-10-29 13:53:33 -07:00
Steve Block
19d928e5a5 Merge "Hook up remaining CookieManager methods" 2010-10-29 08:51:09 -07:00
Ben Murdoch
ffcc49eb42 Add a class that stores localised strings used by libchromium.
These are loaded by the first WebView to be instantiated and read
over JNI by libchromium in external/chromium/android/app/l10n_util.cc

Change-Id: I43d6e5a061691689d28cba2697fedcd27548af08
2010-10-29 11:44:42 +01:00
Shimeng (Simon) Wang
767dbefbe0 Fixes "open pages in overview" option.
This option was disabled when doing fixed viewport.
This is fixed with the intention to show at least overview scale,
 which will be also fine with phone.

issue:3131279
Change-Id: I2e65d40a90a04f2ca72882fec8096dd8a0d81cb0
2010-10-28 10:43:36 -07:00
Steve Block
93e5e14240 Hook up remaining CookieManager methods
hasCookies(), removeExpiredCookie(), removeSessionCookie() and setCookie()

Requires a change to external/webkit ...
https://android-git.corp.google.com/g/76897

Bug: 3116410
Change-Id: I46603be60e2a6b0e8bac9ca506b56d78643a3658
2010-10-28 15:37:33 +01:00
Derek Sollenberger
7e6bf6ff0f Rename some variable to make it clear what data is being stored.
The object that carries drawing data between WebViewCore and WebView
uses ambiguous variable names that do not fully convey the meaning
of the values.  This change updates those names to make it clear to
the reader what the intention of those values is.

Change-Id: I5a403d44881e1fad366f3ec9930ee59134eccd88
2010-10-28 10:11:25 -04:00
Steve Block
f3bac948e4 Merge "Hook up CookieManager.getCookie() for Chromium HTTP stack" 2010-10-27 12:29:03 -07:00
Steve Block
0d4fd36709 Merge "Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium HTTP stack" 2010-10-27 11:47:45 -07:00
Steve Block
dcd2d0dee9 Hook up CookieManager.getCookie() for Chromium HTTP stack
Requires a change to external/webkit ...
https://android-git.corp.google.com/g/76603

Bug: 3116410
Change-Id: Id0cd5871fd13f952d4f2aa963576a4e610459a18
2010-10-27 17:13:48 +01:00
Leon Scroggins
81bd788ecf Make sure nativeMotionUp is called.
If someone sets mLogEvent to false to prevent logging,
nativeMotionUp will not be called, so touches to WebView
will no longer work.  Make sure this does not happen.

Change-Id: Ie79ccc68677cea2f686f7c7da734bf719910f583
2010-10-27 10:31:05 -04:00
Steve Block
b5ac9de4b5 Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium HTTP stack
Also requires a change to external/webkit ...
https://android-git.corp.google.com/g/76066

Bug: 3116410
Change-Id: If8562468708e7d68c5be53db3860647687ebf3bd
2010-10-27 14:06:54 +01:00
Steve Block
82d9816136 Update Chromium HTTP stack to get database and cache paths from CookieSyncManager
Currently these paths are obtained from the BrowserFrame via JNI.
However, the paths are not synced to the BrowserFrame until the
WebCore thread has started up. This means that if the
WebRequestContext is created on the IO thread, the paths may not be
available.

This change moves the paths from BrowserFrame to CookieSyncManager to
avoid the need to wait for the WebCore thread.

Note that the new methods may be called on either the UI or WebCore
threads, so are synchronised.

Requires a change to external/webkit ...
https://android-git.corp.google.com/g/76579

Change-Id: I8e910ee209c570e90181bd308a78d1987b4d120c
2010-10-27 14:06:53 +01:00
Iain Merrick
2bcd292da9 Strip off MIME types when loading content URLs.
Matching behaviour that has been in ContentLoader.java since
approximately day 0. Without this, we can't load Gmail attachments
with the Chrome HTTP stack because of permission errors -- we have
to load exactly the URL Gmail tells us.

See http://b/issue?id=3125650

Change-Id: I764036efd428299b2fcd611b62dc046a40d80a55
2010-10-27 12:33:09 +01:00
Iain Merrick
2723d06033 Merge "Only AV formats should be handled by MediaPlayer (Java side)" 2010-10-27 03:31:01 -07:00
Iain Merrick
4e7665d2b9 Only AV formats should be handled by MediaPlayer (Java side)
Must be submitted with corresponding C++ change (I50da7599).

When opening a text file in the browser, WebKit was attempting to
display it as a movie. This is because the media player now reports
that it can handle various document formats, including plain text.

See http://b/issue?id=3132917

This CL updates WebViewCore.supportsMimeType() to explicitly check
for audio and video formats only. This is called from WebKit via
JNI, and doesn't seem to be used elsewhere, so it should be a safe
change to make. Renamed to isSupportedMediaMimeType() for clarity.

Test: push a text file to /sdcard/foo.txt, and open it in the
browser (as file:///sdcard/foo.txt).

Change-Id: Id39b770b05ced7c976d8043649845f26115b24c9
2010-10-27 11:28:30 +01:00
Shimeng (Simon) Wang
346f97f82f Fix the viewport height to view height when title bar is visible.
issue: 3097787
Change-Id: Ie685a94262cecd94f32dbb94991fea76ceb43b94
2010-10-25 13:33:31 -07:00
Steve Block
16b7a1b967 Merge "Add a JNI method to determine which HTTP stack is in use" 2010-10-25 04:44:41 -07:00
Shimeng (Simon) Wang
8117e760ee Let double tap reflow text.
In case when the text wrap scale is out of sync of the zoom scale.

issue:3122512
Change-Id: I9619cc603226503b96e3a0766620bc2884ec1805
2010-10-22 14:16:28 -07:00
Shimeng (Simon) Wang
9c64bae134 Ignore viewport viewScale in fixed viewport mode.
This is to solve macworld.com, which has 900 as viewport but actual
content width is more 1000.

issue: 3003933
Change-Id: I2db3f66828fd00c8be62131599395eb82752b4a2
2010-10-22 10:57:44 -07:00
Shimeng (Simon) Wang
50b1034d35 Pass whether a scroll is user-scrolled or not to webkit.
This is to eliminate false scrollEvent to webkit.  And the side effect
is that the history scroll position will be correctly restored;
otherwise, webkit think there's user scrolled and not send back history
scroll position.

Particulary for NEW_PICTURE_MSG from webkit, the scroll event because of
it are not user-scrolled.

issue: 3063945
Change-Id: I9fdbfcb8baf07baf2331e2c4eed66f88aea744ef
2010-10-22 10:29:19 -07:00
Leon Scroggins
f8ca2d71d5 Do not call WebTextView.requestFocus if WebView is not focused.
Bug:3118097
Bug:3039912

Change-Id: I4c43f394c9dc3c9db58fb744d588dfb36f3221f4
2010-10-22 10:47:36 -04:00
Steve Block
2d80ede01a Add a JNI method to determine which HTTP stack is in use
This will be required when hooking up CookieManager to the Chromium
stack, as we need to decide in Java whether or not to call into native
code.

Bug: 3116410
Change-Id: Ibe2f7687655a93993b19f4fb9b4fed137b3b9466
2010-10-22 13:49:52 +01:00
Steve Block
3b860faec7 Merge "Hook up CookieManager.removeAllCookie() for the Chromium HTTP stack" 2010-10-22 03:56:58 -07:00
Shimeng (Simon) Wang
8db525a9ad Let restored scale be in effect.
This change reverts some previous change to solve macworld.com scale issue.

issue: 3117312
Change-Id: Id822c7f9c196522a24c0b7657225560dcd0e51e4
2010-10-21 14:20:50 -07:00
Steve Block
1c9ca4f1fa Hook up CookieManager.removeAllCookie() for the Chromium HTTP stack
Requires a change to external/webkit ...
https://android-git.corp.google.com/g/75473

Bug: 3086308
Change-Id: I01274b3b1384a6947d5a56a51b0b93b1898ddebc
2010-10-21 17:53:20 +01:00
Ben Murdoch
be00398005 Merge "Set the unique id of the AutoFill profile WebKit can read it" 2010-10-20 11:35:47 -07:00
Ben Murdoch
b1b82a8df8 Set the unique id of the AutoFill profile WebKit can read it
After the recent Chromium merge to 7.0.540.0, it seems that we are no
longer allowed to use a profile unique id of 0. Set the unique id
in the AutoFillProfile class so that WebKit can access it.

Change-Id: I88cd1e91b8c6043c732a1709a89fda4a3c9f921f
2010-10-20 18:56:23 +01:00