diff options
| author | Grace Kloba <klobag@google.com> | 2010-01-18 23:43:43 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-01-18 23:43:43 -0800 |
| commit | 6d849f2b09b0aa503957a037f2e8a276bd6f8041 (patch) | |
| tree | fb42af6f784459f553c0ecde323b62698e4fe66c | |
| parent | db0b7b5024daa8b5481127282f6673b74f9aa77a (diff) | |
| parent | b99dd716b4af0afde074e28b50b7b28ae3c03da7 (diff) | |
| download | external_webkit-6d849f2b09b0aa503957a037f2e8a276bd6f8041.zip external_webkit-6d849f2b09b0aa503957a037f2e8a276bd6f8041.tar.gz external_webkit-6d849f2b09b0aa503957a037f2e8a276bd6f8041.tar.bz2 | |
am b99dd716: DO NOT MERGE
Merge commit 'b99dd716b4af0afde074e28b50b7b28ae3c03da7' into eclair-plus-aosp
* commit 'b99dd716b4af0afde074e28b50b7b28ae3c03da7':
DO NOT MERGE
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index d13abe5..6ebf1df 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -1092,6 +1092,14 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height, bounds = node->getRect(); DBG_NAV_LOGD("ob:(x=%d,y=%d,w=%d,h=%d)", bounds.x(), bounds.y(), bounds.width(), bounds.height()); + // sites like nytimes.com insert a non-standard tag <nyt_text> + // in the html. If it is the HitTestResult, it may have zero + // width and height. In this case, use its parent node. + if (bounds.width() == 0) { + node = node->parent(); + if (node) + bounds = node->getRect(); + } if ((anchorX | anchorY) == 0) { WebCore::IntPoint offset = WebCore::IntPoint( anchorPoint.x() - bounds.x(), anchorPoint.y() |
