OSDN Git Service

Couple of fixes for viewport.
authorGrace Kloba <klobag@google.com>
Tue, 18 Aug 2009 17:10:51 +0000 (10:10 -0700)
committerGrace Kloba <klobag@google.com>
Tue, 18 Aug 2009 17:10:51 +0000 (10:10 -0700)
commit7a02d6e457073bd7f00546ff4b5b442937724651
tree01a764b3900521e8d654f8f758874df5e23f1d92
parent8df8b2b405c60cacf7a66c4e2ca078dd3d7ec7bd
Couple of fixes for viewport.

http://b/issue?id=2053685. This is a tricky one. When Browser is restarted,
we may get first layout even before viewport tag is parsed. This is rare,
but it happens to Google Reader site. So we need to setup the viewport explicitly
if it happens after first layout. There is a pairing webkit change.

http://b/issue?id=2054131. When Google talk is loaded, it goes through an auth
redirect site which means first layout is called with standardLoad as false.
In this case, even the final site uses viewport tag to get mobile experience,
the intermediate one doesn't. To make sure most of the mobile sites, who
define their viewport width as device width, work correctly, we always update
the mRestoreState when we set viewport.

http://b/issue?id=2054121. When Browser is first started or restarted, the
mCurrentViewWidth is 0 as we don't know the WebView's width yet. As we can't
send VIEW_SIZE_CHANGED message directly, we reset WebView's mLastWidthSent
so that VIEW_SIZE_CHANGED will be sent from WebView when it's width is available.
core/java/android/webkit/WebViewCore.java