Commit Graph

695 Commits

Author SHA1 Message Date
Grace Kloba
d7625dd281 Adding over scroll to webview. We will always apply
over scroll vertically. In horizontal direction, if
the page can't be zoomed and the current content just
fit, we will not do over scroll.

Per UI request, only draw the shadow when title bar
is not visible.
2010-03-05 11:51:02 -08:00
Ben Murdoch
9a823c4d81 Merge "It is possible that we may get a call from WebCore that the first layout has completed before we've successfully syncd the webview dimensions from Java to native and in this case, we end up syncing a height of 0 to WebKit. This causes hit detection to fail, as WebKit thinks we have a 0-height visible area. This patch fixes this scenario by syncing the height of the webview back to WebKit in the case that the first layout comes back before we've sent our dimensions." 2010-03-05 09:42:06 -08:00
Ben Murdoch
d1bee05d64 It is possible that we may get a call from WebCore that the first layout has
completed before we've successfully syncd the webview dimensions from Java to
native and in this case, we end up syncing a height of 0 to WebKit. This causes
hit detection to fail, as WebKit thinks we have a 0-height visible area. This
patch fixes this scenario by syncing the height of the webview back to WebKit
in the case that the first layout comes back before we've sent our dimensions.

Fix for b/2449863

Change-Id: Id72c37b17411f3409edc7104d83ca5ffd17ab09b
2010-03-05 17:25:44 +00:00
Shimeng (Simon) Wang
1c02c6a7d8 Squashed commit of the following:
commit 35ade1c72b5fe34c177712108ccbc070eab11a87
Author: Shimeng (Simon) Wang <swang@google.com>
Date:   Thu Mar 4 16:29:01 2010 -0800

    Alternative way to fix the history picture drawing issue.

    Disable zoom part for history picture mode.

    Bug: 2462039

commit 1a27acaa36c60546e5e6b2e1caf4ce5488dad14b
Author: Shimeng (Simon) Wang <swang@google.com>
Date:   Thu Mar 4 16:06:41 2010 -0800

    Use the screen width to derive the desired scale.

    This is to fix the history picture draw issue.  Since the mActualScale
    will be changed in some other places.

    Bug: 2462039
2010-03-05 09:22:41 -08:00
Mike Reed
189e7355e6 return false if any exception is thrown from savePicture 2010-03-05 10:12:29 -05:00
Cary Clark
966641a8da add comment for public function
http://b/242036
2010-03-04 08:58:33 -05:00
Leon Scroggins
75a36c2bc7 Remove an overzealous call to setDefaultSelection.
This was added to try and fix an earlier bug,
http://b/issue?id=2431351  However, it results in all
touches setting to the default selection, which
is incorrect.

Fix for http://b/issue?id=2486721
2010-03-04 08:44:56 -05:00
Grace Kloba
f6bd0ba630 Don't send ACTION_MOVE to webkit until the distance
is confirmed to be a drag.

Always send touch events to webkit if a subview, plugin,
is in full screen mode.

Fix http://b/issue?id=2478701
2010-03-03 10:28:55 -08:00
Leon Scroggins
c833119c14 Merge "Remove the TAB key from <textarea>s." 2010-03-03 09:21:14 -08:00
Leon Scroggins
7af1b837ff Remove the TAB key from <textarea>s.
Do not use flag for web edit, so that the IME does not have the
TAB key.

Fix for http://b/issue?id=2484101
2010-03-03 12:09:45 -05:00
Cary Clark
3403eb3156 refactor find state and scrolling
Separate out state when find is up and is empty.
Request a scroll when setting a match, rather than when drawing.
Don't draw if there's no match.

Companion fix in external/webkit and packages/apps/Browser

http://b/2370069
2010-03-03 11:12:33 -05:00
Cary Clark
de023c1ddd refactor find state and scrolling
Separate out state when find is up and is empty.
Request a scroll when setting a match, rather than when drawing.
Don't draw if there's no match.

Companion fix in external/webkit and packages/apps/Browser

http://b/2370069
2010-03-03 10:42:45 -05:00
Patrick Scott
0b2e84b32a Add a client for WebBackForwardList operations.
Provide a custom data slot in WebHistoryItem to store application data in the
history item. A client of WebBackForwardList can insert their custom data into
the item when created. In onIndexChanged, the custom data can be read by the
client.
2010-03-02 14:28:07 -05:00
Grace Kloba
4addf9b5d8 When titlebar's visible height changed, it means the
WebKit viewsize need to be updated.

Fix http://b/issue?id=2470621
2010-03-02 10:28:13 -08:00
Leon Clarke
43242d02e9 am ba74d7cc: am e861b8f9: Merge " Fix issue with authentication with flash" into eclair-mr2
Merge commit 'ba74d7ccadc34d09d57886120e9d412d9edbc4d7'

* commit 'ba74d7ccadc34d09d57886120e9d412d9edbc4d7':
  Fix issue with authentication with flash
2010-03-02 08:44:48 -08:00
Cary Clark
f79a819f24 Merge "account for find dialog height when positioning layers" 2010-03-02 08:37:18 -08:00
Leon Clarke
e861b8f95d Merge " Fix issue with authentication with flash" into eclair-mr2 2010-03-02 08:33:10 -08:00
Grace Kloba
c2ca936700 Merge "Start the synchronous load in the WebCore thread." 2010-03-02 08:21:22 -08:00
Cary Clark
72ab9980cb account for find dialog height when positioning layers
The Find dialog draws on top of the WebView, including any
layers attached to the bottom of the screen. Adjust the view
dimenions returned to the layer code by the height of the Find
dialog if visible.

http://b/2453769
2010-03-02 10:59:44 -05:00
Leon Clarke
cb01dba348 Fix issue with authentication with flash 2010-03-02 14:43:03 +00:00
Derek Sollenberger
2705c8f099 Merge "DO NOT MERGE. force plugins to render on top of browser content." into eclair-mr2 2010-03-02 06:33:32 -08:00
Patrick Scott
0245e09fa7 Merge "Store the LoadListener in the SslErrorHandler passed to the client." 2010-03-02 05:40:09 -08:00
Grace Kloba
5f38e1aaa1 Start the synchronous load in the WebCore thread.
Fix http://b/issue?id=2480606
2010-03-01 23:10:10 -08:00
Grace Kloba
3ff7cecd3d Merge "DO NOT MERGE" into eclair-mr2 2010-03-01 16:02:12 -08:00
Grace Kloba
12f807091d am 3ca122df: am cfb50c66: Merge "If we get TOUCH_UP before getting the WebCore\'s response for TOUCH_DOWN, remove the pending TOUCH_EVENT before proceeding to fling." into eclair-mr2
Merge commit '3ca122df9e9a25f7ed1c39ef18c5c4ba2e316fe8'

* commit '3ca122df9e9a25f7ed1c39ef18c5c4ba2e316fe8':
  If we get TOUCH_UP before getting the WebCore's
2010-03-01 13:16:46 -08:00
Grace Kloba
a752a949af If we get TOUCH_UP before getting the WebCore's
response for TOUCH_DOWN, remove the pending TOUCH_EVENT
before proceeding to fling.

This is partial fix for 
http://b/issue?id=2450534
2010-03-01 12:29:11 -08:00
Derek Sollenberger
6078399d29 DO NOT MERGE. force plugins to render on top of browser content. 2010-03-01 15:26:43 -05:00
Grace Kloba
b3d0cc5ca9 If zoom scale is set to minimum, treat it as in overview
mode.

When view size changed, we will adjust scale factor,
which should update the zoom button states afterwards.
 
http://b/issue?id=2477282
2010-03-01 12:25:29 -08:00
Grace Kloba
ef962fc34c DO NOT MERGE
Manual merge part of https://android-git.corp.google.com/g/#change,42462
from master to mr2 for Adobe.

Fix http://b/issue?id=2475242
2010-03-01 12:13:01 -08:00
Grace Kloba
5e747dd602 Merge "Add a new WebCoreWorker thread to handle the tasks which should not block either UI or WebKit. It handles local file access, cache access and trim cache." 2010-03-01 10:58:01 -08:00
Grace Kloba
2036dbab17 Add a new WebCoreWorker thread to handle the tasks
which should not block either UI or WebKit. It handles
local file access, cache access and trim cache.

Move createCache, saveCache and most of getCache out
of WebCore thread so that slow IO and database will
not affect loading performance. getCache can be still
called from WebCore thread in the uncommon cases
like redirect and POST validation.

Move cache ticker from WebCore thread to WebViewWorkerThread.

Move setCookie from WebCore thread to WebViewWorkerThread.

Remove the unreferenced files in the cache directory
while trim cache.

Confirmed with our SQL expert, Vasu, there is no need
to wrap clearCache with end/startTransaction any more.

http://b/issue?id=2414792
http://b/issue?id=2475242
2010-03-01 10:36:15 -08:00
Leon Scroggins
1be4098528 Make nativeMoveCursorToNextInput return a boolean and use it.
If nativeMoveCursorToNextTextInput does not succeed, do not set the
default selection or perform the other actions which assumed that the
move worked.

Part of fix for http://b/issue?id=2478052

Requires a change to external/webkit.
2010-03-01 12:50:12 -05:00
Derek Sollenberger
247c7275a1 Merge "force plugins to render on top of browser content." 2010-03-01 05:35:21 -08:00
Derek Sollenberger
2120cd663f force plugins to render on top of browser content. 2010-03-01 08:31:28 -05:00
Andrei Popescu
8aab46abca VideoPlayer::onPrepared() can be called after the user pressed back in the VideoView.
This can cass a NPE since our Timer would have been destroyed by then.

Add call to VideoView.stopPlayback() when the view is dismissed by the user.

Fix b: 2476002, 2475786, 2475786
2010-02-27 16:14:04 +00:00
Patrick Scott
f8599bf814 Store the LoadListener in the SslErrorHandler passed to the client.
This ensures that the loader will not be null when passing the message to the
main handler.

Bug: 2474087
2010-02-26 15:23:36 -05:00
Ben Murdoch
b5e15690dc Merge "Keep track of when the HTML5 database path has been set, so that we don't inadvertantly sync it to the native side before it has been set by the client." 2010-02-26 02:11:18 -08:00
Cary Clark
018ff891a0 don't draw layers with history
The history picture and the layers drawn may be out of sync,
so for now, don't draw the layers when the history picture is
drawn.

Also, remove native class check from drawExtras() since it
is already checked by the caller.

fixes http://b/2457350
fixes http://b/2453780
2010-02-25 15:08:07 -05:00
Dianne Hackborn
2269d1572e Re-arrange android-common so framework no longer links with it.
This is the framework part, moving classes around so the framework
no longer needs to link to android-common.  Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
2010-02-25 11:39:33 -08:00
Ben Murdoch
18773afa64 Keep track of when the HTML5 database path has been set, so that we don't inadvertantly sync it to the native side before it
has been set by the client.

Change-Id: Idcf604060e5208ec28610dd13e9858adcf44165e
2010-02-25 18:41:56 +00:00
Leon Scroggins
0aa341f0d1 When opening the IME or sending a key to a non-cursored textfield, set the default selection.
Fix for http://b/issue?id=2431351
2010-02-25 12:49:29 -05:00
Cary Clark
2ec30697c6 refactor drawing to support layers
Drawing elements that appear atop or below layers need to be
drawn both in the proper order and with the correct canvas to
respect clipping and the matrix.

The logic of what to draw is still in WebView.java, but the
actual drawing calls are now triggered inside the layer code.

This still draws layers incorrectly after drawing the history;
will fix this in a future CL.

Move drawing to WebView.cpp.
Use inverseScale to simplify viewPort metrics.
Remove root layer; let WebView.cpp handle it exclusively.

Requires companion fix in external/webkit.

http://b/2457316
http://b/2454127
http://b/2454149
2010-02-25 08:38:48 -05:00
Patrick Scott
6a4472f4d5 Allow cookies with no name.
Cookies like "foo; path=/;" should be evaluated to have just a name. This makes
it easier to compare cookies when looking for duplicates.

Bug: 2333747
2010-02-25 08:08:32 -05:00
Grace Kloba
a406fb9080 DO NOT MERGE
If mPreventDrag is cancelled due to time out, remove
the pending TOUCH_EVENTS and then send an ACTION_CANCEL
and skip the rest of touch events.

This should address the drag problem Flash plugin has.

Fix http://b/issue?id=245053
2010-02-24 18:24:48 -08:00
Grace Kloba
93f5831ef2 If mPreventDrag is cancelled due to time out, remove
the pending TOUCH_EVENTS and then send an ACTION_CANCEL
and skip the rest of touch events.

This should address the drag problem Flash plugin has.

Fix http://b/issue?id=245053
2010-02-24 14:31:44 -08:00
Leon Scroggins
58cf334ff4 Merge "Focus the IME on WebView when no textfield is in focus." 2010-02-24 12:17:35 -08:00
Grace Kloba
6870eba19f Temp disable plugin's signature checking.
Filed http://b/issue?id=2465450 to re-enable later.
2010-02-23 16:25:21 -08:00
Leon Scroggins
e3844eeb34 Focus the IME on WebView when no textfield is in focus.
This is to fix a particular case where the navigation cache
does not recognize that a textfield is now in focus.  A message
was sent from the WebCore thread telling us to open the IME on
the textfield.  Open it with the WebView as the served view.

Fix for http://b/issue?id=2457459
2010-02-23 16:38:46 -05:00
Leon Scroggins
4379dca2f4 Change the text for the browser downloads and history views.
Fix for http://b/issue?id=2450232
2010-02-22 09:13:57 -05:00
Steve Block
eac461cf7c Merge "Makes sure GeolocationPermissions is fully robust to calls being made before the message handler is initialized" 2010-02-19 08:38:56 -08:00