Commit Graph

1284 Commits

Author SHA1 Message Date
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
Iain Merrick
c40fc2c31a Add FlushCookieStore() method to CookieManager (Java side)
The browser app will use this to sync cookies to flash when it is
sent to the background. Corresponding C++ code is in Ia9b56f3c.

Bug: 3231371

Change-Id: I04e96affcce335191ee2075d0e160f0d8313bf76
2010-12-01 14:45:38 +00:00
Cary Clark
4a2fe17fef start drag of text selection on initial press
bug:3182813
Change-Id: Id27b1caa31881ce543d395461f0504d894cf0403
2010-12-01 09:16:29 -05:00
Cary Clark
e41bb535a3 pass the x and y to retrieve anchor data
During a long press, the original pointer to the
node and frame may change. Pass the location instead
to attempt to find the anchor.

companion change is in external/webkit

bug:3240869
Change-Id: Id86107c1f8ce8680786163c1030421dbec062036
2010-12-01 07:40:54 -05:00
Ben Murdoch
45991bc13f resolved conflicts for merge of d2607118 to master
Change-Id: Id6092a762af775e9b5db390feaba3e10bd98ef7c
2010-12-01 10:55:18 +00:00
Michael Kolb
f7f07e5762 Fix page scroll during text selection
Bug: 3190609
    Leave embedded title bar in place during text selection CAB mode

Change-Id: I7140241ac7eeb442cfe7665580525d8cdfce220f
2010-11-30 13:59:02 -08:00
Ben Murdoch
d2607118ed am 27e728f2: Merge "Hide plugin views when we start playing HTML5 video" into gingerbread
* commit '27e728f22d954caa7252be6c19a67a9277e1db3b':
  Hide plugin views when we start playing HTML5 video
2010-11-30 11:46:24 -08:00
Cary Clark
b849134c1e use the original hit if the cache is killed
The nav cache may not have a cursor set if it is
rebuilt while the long press timer is running. Use
the original hit test data in this case.

bug:3198707
Change-Id: I795a3afb31de3667b3a69abbe898381912806802
2010-11-30 12:43:17 -05:00
Shimeng (Simon) Wang
96fcb87ae1 Set initial view scale to be at least overview scale.
Some website will have an initial view scale which is less
than the overview scale and the page will display poorly.

This fix sets the initial scale and text wrap scale to be at least
overview scale to make the page looking good at first load.  When a page
is restored, the scale will not be changed.

Also make the reading level scale always bigger than overview
scale for consistency.

issue: 3226625
Change-Id: I8b77cf4fda454a35c3037fa09aaff1aac0c0f664
2010-11-29 13:32:52 -08:00
Cary Clark
6f5dfc6b3c scroll the selection when dragging near the edge
Also move a debug statement so it can report the
extra selection choice.

This does not scrolls overflow divs for now; once
Pat has that code checked in, this can adapt to
work for that as well.

requires a companion change in external/webkit

bug:3186988
Change-Id: I071ecd31d589e9ef715d2ecb12b1768696075686
2010-11-29 09:20:23 -05:00