diff options
| author | Cary Clark <cary@android.com> | 2009-12-07 10:36:50 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2009-12-07 10:56:46 -0500 |
| commit | 34bca311c8205ee40379adac2ef4da01e401600e (patch) | |
| tree | e7c8953b36817fe68bb9a569371289fb904ee51a /WebKit/android | |
| parent | dcbb033aafed2abc472f0d88520869a6b1f1945b (diff) | |
| download | external_webkit-34bca311c8205ee40379adac2ef4da01e401600e.zip external_webkit-34bca311c8205ee40379adac2ef4da01e401600e.tar.gz external_webkit-34bca311c8205ee40379adac2ef4da01e401600e.tar.bz2 | |
fix crash reading readonly node state
Something about rebuildTextView() invalidates the current cached
frame -- reading the last obtained frame after calling it may
crash. Why, I don't know. Until I figure that out, read the
cached state first.
Also remove some tests for null frame and node since the null
case has already been handled earlierin motionUp().
fixes http://b/2307964
Diffstat (limited to 'WebKit/android')
| -rw-r--r-- | WebKit/android/nav/WebView.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index d59fdeb..af9227d 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -941,15 +941,15 @@ bool motionUp(int x, int y, int slop) bool syntheticLink = result->isSyntheticLink(); if (!syntheticLink) { sendMotionUp( - frame ? (WebCore::Frame*) frame->framePointer() : 0, - result ? (WebCore::Node*) result->nodePointer() : 0, rx, ry); + (WebCore::Frame*) frame->framePointer(), + (WebCore::Node*) result->nodePointer(), rx, ry); } viewInvalidate(); if (result->isTextInput()) { + bool isReadOnly = frame->textInput(result)->isReadOnly(); rebuildWebTextView(true); - if (!frame->textInput(result)->isReadOnly()) { + if (!isReadOnly) displaySoftKeyboard(true); - } } else { clearTextEntry(); setFollowedLink(true); |
