Commit Graph

1293 Commits

Author SHA1 Message Date
Huahui Wu
e2975f17cc b/2946595 Remove the touch events filter upon maps.google.com team's request.
Change-Id: I83966bc447f67abdce47a77cb682bc3e834184c3
2010-12-15 15:00:03 -08:00
Cary Clark
861368a307 extract anchor href and image src separately
Long pressing a link may return an anchor, an image, or an
image in an anchor. Sometimes we want one, sometimes the other.

Make both available so the context menu can choose.

Update the documentation in WebView.java

Companion changes are in external/webkit, packages/apps/Browser

bug:3282745
bug:3263340

Change-Id: I9917a2c69d26601a230051f2e95c9464ba6155e9
2010-12-15 15:23:50 -05:00
Huahui Wu
957e9ca26e Merge "b/2864818 Prompt the SSL error dialog to user and proceed or cancel the request. C++ side cl: https://android-git.corp.google.com/g/#change,84529" 2010-12-15 09:42:35 -08:00
Huahui Wu
ad053cebc8 b/2864818 Prompt the SSL error dialog to user and proceed or cancel
the request. C++ side cl: https://android-git.corp.google.com/g/#change,84529

Change-Id: I1f4c69c6ddb92324a1ec3c193018e8d703454f56
2010-12-15 09:38:54 -08:00
Ben Murdoch
92272ab189 Merge "Remove fragment as well as the query from URLs when resolving MIME type" 2010-12-15 09:07:02 -08:00
Leon Scroggins
fcf577665b Make a long press on a textfield work.
Bug:3268584

Even if the WebTextView has not been set up yet.

Change-Id: I8ec2c4ef8146006d6ee84d08e1ddbdb099125047
2010-12-15 09:50:53 -05:00
Ben Murdoch
1870015932 Remove fragment as well as the query from URLs when resolving MIME type
When we try to deduce the MIME type from the file extension of
a URL, strip the fragment off at the same time we are stripping
the query. Otherwise we end up trying to match against some
funny extensions.

Bug:3241908

Change-Id: Ibaa84f0a628f37cd012b6cfbed9a6a666ecae8bb
2010-12-15 11:13:16 +00:00
Leon Scroggins
a60f00ffec Merge "Use black text on white background for dropdowns." 2010-12-13 13:24:42 -08:00
Leon Scroggins
60344deb7c Use black text on white background for dropdowns.
Bug:3249233
Change-Id: I8c400c4ab043409e40a1180d45effd4513d0657c
2010-12-13 16:08:04 -05:00
Adam Powell
e0893a8555 Merge "Smooth out gesture zooming in WebViews." 2010-12-13 10:47:07 -08:00
Kristian Monsen
7400be47b7 Cleanup of private browsing files are now done in webkit
Bug 3243891

Change-Id: I51e63a96bf1c95cd8e675a3d94a4aa210418e216
2010-12-13 17:51:20 +00:00
Patrick Scott
d2f44b7a32 Merge "Suppress scrollbars during layer fling." 2010-12-13 09:30:27 -08:00
Iain Merrick
0f868ca036 Disable CacheManager when using the Chrome HTTP stack.
Currently, cacheDisabled() reports false, but no files are ever
added to the cache. This CL makes the framework more honest and
reports that the cache is disabled.

BUG=3270236

Change-Id: I13c0291ac295d965f71f1e70dbdebc74b95ddce0
2010-12-13 14:28:56 +00:00
Iain Merrick
d1281286f2 Merge "Move useChromiumHttpStack() from CookieManager to JniUtil." 2010-12-13 06:22:49 -08:00
Patrick Scott
5b87e296c5 Suppress scrollbars during layer fling.
Change-Id: Ia6bc1f48e464212d5b9cebef27e4527b0bc93713
2010-12-13 09:20:32 -05:00
Leon Scroggins
c5ab8b331d Merge "Use drawLines to draw the outline of the WebTextView." 2010-12-13 05:56:54 -08:00
Adam Powell
63814df667 Smooth out gesture zooming in WebViews.
Change-Id: I42c1182f82af3ed16cd23efc056d7c9c34e32940
2010-12-11 16:49:05 -08:00
Leon Scroggins
6e9b327d08 Use drawLines to draw the outline of the WebTextView.
Bug:3214760

Optimize drawing the background of the WebTextView.

Change-Id: Iad44839137ffa3b91dd2044885028c283291b491
2010-12-10 17:32:25 -05:00
John Reck
11c1a0be5d Fixes Android HTTP cache permissions
Bug: 3244281

Change-Id: I372475bc2d9bd2f2354ee603f77468df0cb043bf
2010-12-10 10:19:16 -08:00
Iain Merrick
a106993a51 Move useChromiumHttpStack() from CookieManager to JniUtil.
This is a generally useful method, not specific to CookieManager.
I want to use it to modify the behaviour of CacheManager when we're
using the Chrome HTTP stack.

Corresponding C++ changes in I78a92cb2

BUG=3270236

Change-Id: I56b0ddcaa93ef340f4ffc3578486c3c96316f2ec
2010-12-10 15:51:36 +00:00
Ben Murdoch
0fa484ac37 Add a "Web Search" option to the WebView select text ActionBar
This change allows selected text in a web view to be used as a search
query.

Bug: 3132422
Change-Id: I9ed2a5913641b37732586f8d8aa8a80c3486b606
2010-12-09 20:02:44 +00:00
Ben Murdoch
e627f55bf8 Merge "Make audio tag cope with live streams" 2010-12-09 11:54:24 -08:00
Leon Scroggins
6b82c26607 Merge "Dismiss IME when pressing Next or Previous." 2010-12-09 11:04:06 -08:00
Leon Scroggins
261f42d64d Dismiss IME when pressing Next or Previous.
Bug:3267230

Change-Id: If4ea2f589c42f7346685a7ce754298dd8e5a00b5
2010-12-09 13:50:00 -05:00
Ben Murdoch
9059f44fee Make audio tag cope with live streams
Live streams seem to take a little while to initialize, so it's feasible
that we might get a play request before transitioned to the PREPARED
state. In that case track that we should start playing when onPrepare
completes.

Change-Id: I66ed0ef3a0905a1c5d4206fb2e7bbcc05a593fc7
2010-12-09 16:20:26 +00:00
Kristian Monsen
8517305521 Make CookieManager.removeSessionCookies async
Webkit loadurl() will wait on the webcore thread until oustanding
cookie operations complete.

Change-Id: I067408fdb9acd2e2d1f1f21eef910d0b26304332
2010-12-09 11:41:02 +00:00
Teng-Hui Zhu
5513337a4c Webview listen to Scroll event to update the viewport
In the case of unchanged layout, like replying in email/gmail,
scrolling should cause a viewport calculation update.
Otherwise, the content will be skewed.

Also, rename the mListener to mGlobalLayoutListener to avoid
confusion with added listener.

bug : 3143829

Change-Id: I7f5ee2e2cc9524e21cfffeef40b8650b6ee9a387
2010-12-08 09:01:41 -08:00
Cary Clark
5e17a1a18c don't scroll past the document bounds
bug:3260869
Change-Id: I255d2b18d738a422bd9d2948621b65e2f54ca0cd
2010-12-08 09:51:27 -05:00
Steve Block
81f19ffb94 Expose WebView.onPause() and onResume() in the public API
Also fixes up captialization of 'JavaScript' to be consistent.

Bug: 3054638
Change-Id: Ib60da17edb818c97013b399b4442f72c3bb386bd
2010-12-08 11:18:10 +00:00
Steve Block
689a342b0f Add WebView.removeJavascriptInterface()
Bug: 3234178
Change-Id: I7136f8d76b20f90a7e9e1c55b6755ffe6c35b77b
2010-12-07 20:16:13 +00:00
Shimeng (Simon) Wang
88ec644d67 Prevent scaling beyond zoom overview scale.
issue: 3243899
Change-Id: I1d6cbb1b1f75c7aadb3b9cc6e82d912217508dc4
2010-12-07 10:27:34 -08:00
Patrick Scott
6231091feb Add fling to scrollable layers.
Requires a change in external/webkit.

Use the normal drag/fling pipeline but handle layers in each of the callbacks.
Record the scrolling range for a layer and use it to compute the fling/drag
ranges.  If the user reaches the edge of a layer, switch to scrolling the main
page unless the user switches direction.

Change-Id: Ifedde8fcf4f76d533586164c75defcebffec16e9
2010-12-07 13:12:44 -05:00
Cary Clark
dc09b5ae89 check for native instance before calling
bug:3258992
Change-Id: Ia9bf7bdbbe2b5566121113174d032d316664f3b1
2010-12-07 10:58:00 -05:00
Leon Scroggins
244d2d4e9d Delay message for <select> choice.
Bug:3230016

Pass the message after the page is set to active, which
calls a focus event, which may modify the page.

Change-Id: I594ba30a7a105595b27bc0356c164c41e48dcd15
2010-12-07 10:53:25 -05:00
Mindy Pereira
3331f2be93 Make webview edges behave the same way abslistview overscroll edges do.
The assets are not scaled to start before the left or after the
right edge of the view.
For the top edge, start the canvas for rendering the glow
after the title bar (if it is visible) or most of the glow
gets cut off.
Change-Id: Ia1a513fda4d1106d671919bb289aa83f8800c2c2
2010-12-06 17:22:42 -08:00
Iain Merrick
768ec6f2be Merge "Call flushCookieStore() from CookieSyncManager." 2010-12-06 05:40:48 -08:00
Iain Merrick
99f39771ab Call flushCookieStore() from CookieSyncManager.
I previously tried to make this a new public API, but I realised
it should actually hang off the existing code in CookieSyncManager.

Change-Id: Ic44334008266bad5ba1245cf674350a4c10712ce
2010-12-06 13:29:42 +00:00
Ben Murdoch
961d55fe00 Prevent autofilling directly after autofilling.
Clear the WebTextView's data adapter after autofill fills
out the form. This ensures that the dropdown disappears.

Change-Id: I2fd1e8b5d249f6ff3943d0a0b5d2f2b55beac70a
2010-12-06 10:37:22 +00:00
Shimeng (Simon) Wang
3712754941 Make sure the returned web view width is at least 0.
This will fix issue 3241963; since in WebViewCore.java there's a way
to deal with a 0-width view, but not with negative width.

issue: 3241963
Change-Id: I177bee48e53ba5108889bc2c06aebffbc6cb44c6
2010-12-03 16:34:00 -08:00
Teng-Hui Zhu
c99821d01a Fix the stretching issue when viewport change.
When native webkit code ask java to provide the visibleRect,
the calculation should not take the overscrolling into concern.

The original change was added for this issue, http://b/issue?id=2496502,
and we don't have overscroll any more, so it should be safe to
revert the original change.

bug:3212547

Change-Id: I57e3353b3277f83302ccfd9916a38aa691fa15c7
2010-12-03 10:59:19 -08:00
Dianne Hackborn
189ee18d6c Implement smarter sizing of WRAP_CONTENT windows.
This extends the view hierarchy's measure pass to allow view to
propagate up to their parent additional information besides just
their measured size.  They can now report that their measured width
and/or height should be larger than the size their parent is
limiting them to (even though by definition they need to contrain
their reported measurements to the limits imposed by the parent).

ViewRoot uses this information to determine if it should remeasure
the window with a larger size limit to try to make it fit.

Change-Id: I90af3b7a8ec45d0a5c003fb009857025209d83eb
2010-12-03 10:46:18 -08:00
Cary Clark
32820249ad abandon long press on scroll; clear hit on keydown
If the application scrolls the webview without allowing
WebView.java to receive the motion event, stop any long
press timer in progress. This prevents select text from
appearing in applications that host webviews and do their
own flinging.

If the cursor is moved with the dpad or trackball,
reset the hit test state used by long press. This allows
cts tests to run reliably; they emulate key presses
to move between links.

bug:3250291 (app fling)
bug:3241830 (cts fail)
Change-Id: Ida364051ffa090455ddc6c3c3dd41baea5615293
2010-12-03 10:52:07 -05:00
Patrick Scott
2f492277ea Attempt to scroll layers everytime the user drags.
This allows the user to continue scrolling a layer even after reaching the end
of it.  Only pin the fling velocity in the direction of the fling.  This is
preparation for flinging layers.

Record the inval region when updating layers so that the new layer will draw.

TODO: Keep track of whether the user started on a layer to prevent scrolling a
layer if the user drags across one.

Bug: 3022562

Change-Id: I25f84497a67dfb1e0fc424207f6c97817715501c
2010-12-03 10:32:57 -05:00
Steve Block
544295eebc Update WebView.addJavascriptInterface() to ignore null instances
Bug: 3247571
Change-Id: If6a108fe926e45dc3e298f197f6534c575c560e2
2010-12-02 18:40:06 +00:00
Teng-Hui Zhu
a7f76874f5 Use the globalLayout to notify the GlViewport change
Given the fact that our optimization is enforced to avoid sending
the onLayout message down to webView, utilizing the globalLayoutChange
message seems like the best solution here.

http://b/issue?id=3103077

Change-Id: I9a2d5576454641802019a5eeb64908026b40dd9b
2010-12-01 14:11:10 -08:00
Teng-Hui Zhu
e6fb0f1d7c Properly set the viewport for WebView when using GL
This is the first step, get the calculation right.
We still need to get the right message handling to get
the correct animation in Gmail .

http://b/issue?id=3103077

Change-Id: I3ed186b62ddb285e92a71d3ba5c02d4965068282
2010-12-01 14:11:10 -08:00
Leon Scroggins
2ac445cbb7 Do not remove the embedded title bar when starting Find.
Bug:2927138
Change-Id: I97adb4431aedca172a5951d727ad559de5101924
2010-12-01 16:34:00 -05:00
Patrick Scott
4b90378af0 Allow one finger to scroll layers.
TODO: Add velocity.
Change-Id: I548ef6332b260a2aecc39422012523cb6f8e2523
2010-12-01 12:42:30 -05:00
Cary Clark
61c6ddbb0b Merge "start drag of text selection on initial press" 2010-12-01 08:34:58 -08:00
Iain Merrick
557092f26a Merge "Add FlushCookieStore() method to CookieManager (Java side)" 2010-12-01 06:46:48 -08:00