Commit Graph

2076 Commits

Author SHA1 Message Date
John Reck
9f9fac0ad2 Fix lastVisible/global rects
Bug: 5601629
 References tend to always be equal to the things they are referencing,
 use copies instead.

Change-Id: I0827878e91ef1fa6e0abe2d6499d55f4a211d890
2011-11-10 17:33:24 -08:00
John Reck
843e04d977 Merge "Pause drawing when not visible" into ics-mr1 2011-11-10 09:19:55 -08:00
George Mount
c60baec7a7 Merge "DO NOT MERGE Set the initial scroll position for RTL." into ics-mr1 2011-11-10 08:32:18 -08:00
John Reck
5f1c549132 Pause drawing when not visible
Bug: 5594608
 If onPause is called or if the view or view's window is no longer
 visible, pause webview drawing. Calls to onDraw will continue to work,
 but animations and other continual drawing will stop

Change-Id: I11640f087852d1a9a33b945ff72297fab1d25b94
2011-11-09 17:19:43 -08:00
George Mount
331493085d DO NOT MERGE Set the initial scroll position for RTL.
Bug 5268793
 Webkit knows about the correct initial position for web pages.
 On initial show, scroll to the webkit position.

 Cherry-picked from master CL: I2537b84a

 External WebKit CL: I6a91b97f

Change-Id: I2537b84a30a26a79a8a0f23fe62b9ed757f9c5a4
2011-11-09 15:37:26 -08:00
John Reck
36a7f2a9ad Merge "Fix determining find on page overlap" into ics-mr1 2011-11-09 09:28:11 -08:00
John Reck
d6ac727234 Fix determining find on page overlap
Bug: 5572138

Change-Id: Ie528e1cf9df363307018e01a898e8d9dfff1cd45
2011-11-08 15:00:17 -08:00
Michael Kolb
39036ace76 Remove flicker from WebTextView
Bug: 5522186

   Update LayoutParams when position changed only

Change-Id: I54beb489c261090d7ba258354449501b771fd98e
2011-11-08 14:21:06 -08:00
John Reck
aefc28a1b6 Remove unnecessary memory allocations
Bug: 5581637
 Also delete some dead, unused code

Change-Id: If6efd11f5032141dadbfcd0b3215e89b464e5f35
2011-11-07 17:42:06 -08:00
John Reck
99f7b7b7b2 Remove nativeRecordButtons
Bug: 5572238
 Bug: 5558699

Change-Id: I8e275849f4f04c094a93528dd1fb59683d30e9cc
2011-11-07 14:00:05 -08:00
Mangesh Ghiware
69957172fa Merge "Update fix to restore view and text wrap scales." into ics-mr1 2011-11-03 15:35:23 -07:00
Mangesh Ghiware
e59e301ca0 Update fix to restore view and text wrap scales.
Fixes bug 5544556: All email content is wrapped prematurely.

Previous change (I5a22dd20) didn't take a few other cases of
mViewScale>0 into account.

Change-Id: I4f9578f3558f026c472492ac07d19004416dc228
2011-11-03 13:21:18 -07:00
Teng-Hui Zhu
76b067590b Merge "Create GL texture when it is missing for video layer" into ics-mr1 2011-11-03 11:43:16 -07:00
Teng-Hui Zhu
1f54673381 Create GL texture when it is missing for video layer
In any case that the HTMLVideoView is recreated with no GL texture, we should
recreate the GL texture to make sure we always have a valid texture ID.

bug:5530006
Change-Id: I703a987a7530dbeef74e502f3c9ff329beca8c4e
2011-11-02 15:59:25 -07:00
Mangesh Ghiware
274133dfef Merge "Fix setInitialScale() to take display density into account." into ics-mr1 2011-11-01 14:02:05 -07:00
Mangesh Ghiware
00ef15b98a Merge "Clamp initial scale between minimum and maximum values." into ics-mr1 2011-11-01 11:28:01 -07:00
Mangesh Ghiware
e9841bb45d Fix setInitialScale() to take display density into account.
Reverted changes made to fix bug 4982074 (Book text display is limited
to about half the available screen.) The Books app sets initial scale to
100%, and since display density for Crespo is 1.5, initial scale was
actually being set to a smaller value in Device Independent Pixel units.

The correct fix is to take display density into account. This fixes bug
5477652: webview scale factor wrong on prime in reddit app.

Change-Id: Ie09172629add7fb28ca6b47d0fd8f6450c5df569
2011-11-01 09:55:45 -07:00
Mangesh Ghiware
ca4d54c486 Clamp initial scale between minimum and maximum values.
Fixes bug 5515454: web page is not optimized (gmarket)

Initial scale is used to detect mobile sites
In ICS, mobile site detection based on whether the URL included m.,
mobile., wap., etc. has been removed in exclusive favor of the meta
viewport tag.

Within meta viewport tag, mobile site detection uses width (set to
device-width), initial-scale (set to 1.0 or default scale), etc. Make
this logic more robust by clamping initial scale between minimum and
maximum values, if specified.

Change-Id: I663c50ce20b35279d37a8c812e91d6bc4c16c1d3
2011-10-31 14:41:38 -07:00
Marco Nelissen
d763c2cbe8 Make MediaController use low profile system UI
This makes the MediaController iused by the full screen html5 video
view copy the system ui visibility of its owner. Some issues remain.
b/5494143

Change-Id: I6b157226974befbee5ba685d42d1ef72c113664d
2011-10-31 08:34:24 -07:00
Mangesh Ghiware
ade26e2e38 Merge "Fix restore of view and text wrap scales." into ics-mr1 2011-10-27 16:11:32 -07:00
Mangesh Ghiware
f0e96d54b6 Fix restore of view and text wrap scales.
Fixes bug 5507881: Open pages in overview doesn't stick on initial
browser load.

Update the fix for bug 5230909: Zoom not restored on Back.

Added a boolean to indicate that scales have been restored. In the case
of restored scales (view and text wrap) being zero, set them to overview
and reading level respectively.

Change-Id: I5a22dd2040a22ee3b48c5903b586a65a4fa320f2
2011-10-27 15:20:49 -07:00
John Reck
effabe8d8b Keep text handles in sync with native touch targets
Bug: 5522153
 Also add some slop to the handle targets, cleaned
 up the JNI and improved debugging.

Change-Id: I9ac637d793f2bd88d5315aa1483a4513d2496716
2011-10-27 11:32:55 -07:00
John Reck
c0e9fb91c8 Fix rebuildWebTextView issues
Bug: 5488135
 Cherry pick from MR0

Change-Id: I2df047b6de42dbe716008f69d720fa5fad3fe19d
2011-10-21 15:31:33 -07:00
George Mount
930b5654a3 Merge "Fixed spell check failing to change word." 2011-10-21 13:02:05 -07:00
Mangesh Ghiware
760bf7de06 Merge "Fix issue# 5492404: Reading level check thread error." 2011-10-21 12:45:30 -07:00
Mangesh Ghiware
bb99e28cd6 Fix issue# 5492404: Reading level check thread error.
Remove access to WebSettings from getReadingLevelScale() by saving the
double-tap zoom scale factor in ZoomManager. WebSettings can only be
accessed in the UI thread.

Change-Id: Ic7289bf3c14d800797f2e85546a088a9071e0468
2011-10-21 10:53:29 -07:00
Kristian Monsen
43abfe1be2 Merge "WebView part of fix for bug 5307956" 2011-10-21 04:48:22 -07:00
George Mount
f23e1679a2 Fixed spell check failing to change word.
Bug 5387838
 On WebView.rebuildWebTextView, setTextAndKeepSelection was
 being called, erasing the selections. Changed it so that
 when text is replaced with the exact same value, no replace
 is done. Also, on the Google search, when a spelling change
 was made, the final character was placed improperly. When
 a single character is added, the javascript events for the
 character are sent. When multiple characters are changed,
 the entire value is replaced with no javascript key events
 sent.

Change-Id: I791eeb3c96354cfe3cbfda7e8d05c81fcdeb152f
2011-10-19 10:38:32 -07:00
Kristian Monsen
0d491c1dce WebView part of fix for bug 5307956
JniUtil now returns empty string instead of crashing
when the OS can't find/create a cache directory. Have only
seen this happen when the whole file system was broken.

Change-Id: I867017d62dce83cae3e83959eac9e974433bbdc9
2011-10-19 11:48:06 +01:00
Mangesh Ghiware
29a15a237a am 2bd3c2f7: Merge "Fix null ptr exception in getReadingLevelScale()" into ics-mr0
* commit '2bd3c2f7e89eb02f2b240672631c57bc912a9575':
  Fix null ptr exception in getReadingLevelScale()
2011-10-18 10:32:36 -07:00
Mangesh Ghiware
1698d45ef8 Fix null ptr exception in getReadingLevelScale()
Handle the case where WebView settings might be null.

Bug: 5472493
Change-Id: I6b1c2e5e5e56a517910a330ae9d40a4adc99d75a
2011-10-18 09:32:36 -07:00
John Reck
08eaa9de76 am 7788c51d: Merge "Fix onFirstLayout path for saved pages" into ics-mr0
* commit '7788c51d82963a8645655675c675424db694ad85':
  Fix onFirstLayout path for saved pages
2011-10-17 17:50:39 -07:00
John Reck
23a446cf27 Fix onFirstLayout path for saved pages
Bug: 5464993
 Saved pages are taking the onFirstLayout path in
 onConfigurationChange incorrectly. Fix that by clearing out the
 view state after actual first layout.

Change-Id: I61578f35ee6be349df49a63c464f532e0a87df28
2011-10-17 17:06:09 -07:00
Bart Sears
b29553e5b0 am b227cce3: Merge "Check MediaPlayer state, do not teardown() from UI thread." into ics-mr0
* commit 'b227cce31641c39a1a586739561b4776019945a4':
  Check MediaPlayer state, do not teardown() from UI thread.
2011-10-17 11:30:52 -07:00
Steve Block
b22a69f2ca Build fix
Fix after https://android-git.corp.google.com/g/#/c/125775

Bug: 5461416
Change-Id: Ifee29b287c9fcd2a35b0b676db00ef2a4fc8c5a8
2011-10-17 12:25:00 +01:00
Steve Block
cfece91c1e Merge "Improve documentation for WebChromeClient.onCreateWindow()" 2011-10-17 02:30:41 -07:00
Steve Block
3593414863 Merge "Clean up documentation for WebView.loadUrl()" 2011-10-17 02:30:00 -07:00
Steve Block
f71dea025a Clean up documentation for WebView.loadUrl()
Bug: 5461416
Change-Id: I3bb6ac4abab7def8e06de087c5ae7be906bc962e
2011-10-17 10:29:03 +01:00
Bart Sears
b227cce316 Merge "Check MediaPlayer state, do not teardown() from UI thread." into ics-mr0 2011-10-14 16:09:46 -07:00
Ben Murdoch
817d6d5e8e Check MediaPlayer state, do not teardown() from UI thread.
The teardown() function should only be called from the native
thread when WebCore is happy for us to release the media player.

When we lose audio focus, simply stop playback. Also be careful
not to check the playing state of the MediaPlayer if we are in
the error state.

Bug: 5461143

Change-Id: Iba03bdad5c39b104b3071129430d7ef2177e9358
2011-10-14 22:11:26 +01:00
John Reck
61d3449d1a am d82cc1de: Merge "Fixup JNI" into ics-mr0
* commit 'd82cc1de848a678fa4bcaefdbc763307f3df4a75':
  Fixup JNI
2011-10-14 10:12:14 -07:00
John Reck
d82cc1de84 Merge "Fixup JNI" into ics-mr0 2011-10-14 10:10:07 -07:00
Steve Block
89e00a90d5 Improve documentation for WebChromeClient.onCreateWindow()
Bug: 5461416
Change-Id: I9beac56374fb3ce97da4b20fa5646b5b5f05bad9
2011-10-14 16:29:01 +01:00
John Reck
b61bfed7b1 Fixup JNI
Bug: 5459736

Change-Id: Iefb5daaf52eb56f2a4c3aaeedc977a16a1cfa086
2011-10-13 19:07:50 -07:00
Bart Sears
0272df8506 am bcfe4152: Merge "Improve JavaDoc for WebView.loadData()" into ics-mr0
* commit 'bcfe41529b7bd9f572a2eff31375dc9fdf35b518':
  Improve JavaDoc for WebView.loadData()
2011-10-13 16:27:16 -07:00
Steve Block
33f962b22e Improve JavaDoc for WebView.loadData()
Make clear that the charset specified in the mediatype portion of a data URL
overrides that specified in the HTML or XML document itself.

Bug: 5418915
Change-Id: Iff7305b6ac9e656d0fb7ed1b2ffe6fd0e21be49b
2011-10-13 15:32:13 -07:00
Ben Murdoch
64f93d4f91 Merge "Don't redraw when not scrolling, even if finger is held down." 2011-10-13 10:17:57 -07:00
Mangesh Ghiware
a6708c6a46 Merge "Add setting for configuring zoom level on double-tap." into ics-mr0 2011-10-13 09:17:10 -07:00
Ben Murdoch
fd8d3dede2 Don't redraw when not scrolling, even if finger is held down.
Signal the native side that we are not scrolling when a drag is
held motionless to stop screen updates.

Additionally, in the case that a drag is being held motionless,
send a timed message to keep the scroll bars on screen otherwise
they fade in and out, again causing repaints that shouldn't be
necessary.

Bug: 5440335
Change-Id: I94db0323879885fa48924b41d29e8af03e3b5e7f
2011-10-13 13:23:29 +01:00
Mangesh Ghiware
edb528ef52 Add setting for configuring zoom level on double-tap.
In overview mode, text wrap is done at reading level scale. If user
changes double-tap zoom in overview mode, reflow text at the new scale.
In any other mode, a double-tap will take user to overview mode, at
which point, the text will be reflowed at the updated reading level
scale.

Bug: 5312461
Change-Id: I29be34a32246019101a9a875e1758e22b5af2bd3
2011-10-12 15:24:29 -07:00