summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav/WebView.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-01-10 14:08:23 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-10 14:08:23 -0800
commit73d556e0cf543c9fb1b0fcc39a9db25937ae0573 (patch)
tree1922c5168515debe2734429ec505e9ce488f9b8b /Source/WebKit/android/nav/WebView.cpp
parent3fd1c792f86fedfb8075a7ccccd213f5b2d4cb71 (diff)
parent6dd76b804786ec760bb04b137a6bf017064226dc (diff)
downloadexternal_webkit-73d556e0cf543c9fb1b0fcc39a9db25937ae0573.zip
external_webkit-73d556e0cf543c9fb1b0fcc39a9db25937ae0573.tar.gz
external_webkit-73d556e0cf543c9fb1b0fcc39a9db25937ae0573.tar.bz2
Merge "Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE"
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 71cad9a..64ab9d9 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -92,7 +92,7 @@ static jfieldID gWebViewField;
static jmethodID GetJMethod(JNIEnv* env, jclass clazz, const char name[], const char signature[])
{
jmethodID m = env->GetMethodID(clazz, name, signature);
- LOG_ASSERT(m, "Could not find method %s", name);
+ ALOG_ASSERT(m, "Could not find method %s", name);
return m;
}
@@ -173,7 +173,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir,
env->DeleteLocalRef(clazz);
jclass rectClass = env->FindClass("android/graphics/Rect");
- LOG_ASSERT(rectClass, "Could not find Rect class");
+ ALOG_ASSERT(rectClass, "Could not find Rect class");
m_javaGlue.m_rectLeft = env->GetFieldID(rectClass, "left", "I");
m_javaGlue.m_rectTop = env->GetFieldID(rectClass, "top", "I");
m_javaGlue.m_rectWidth = GetJMethod(env, rectClass, "width", "()I");
@@ -181,7 +181,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir,
env->DeleteLocalRef(rectClass);
jclass rectClassF = env->FindClass("android/graphics/RectF");
- LOG_ASSERT(rectClassF, "Could not find RectF class");
+ ALOG_ASSERT(rectClassF, "Could not find RectF class");
m_javaGlue.m_rectFLeft = env->GetFieldID(rectClassF, "left", "F");
m_javaGlue.m_rectFTop = env->GetFieldID(rectClassF, "top", "F");
m_javaGlue.m_rectFWidth = GetJMethod(env, rectClassF, "width", "()F");
@@ -242,7 +242,7 @@ WebViewCore* getWebViewCore() const {
float getTextHandleScale()
{
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (!javaObject.get())
@@ -511,7 +511,7 @@ bool drawGL(WebCore::IntRect& viewRect, WebCore::IntRect* invalRect,
&treesSwapped, &newTreeHasAnim);
if (treesSwapped && (m_pageSwapCallbackRegistered || newTreeHasAnim)) {
m_pageSwapCallbackRegistered = false;
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (javaObject.get()) {
@@ -733,7 +733,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer)
&& newFocus->isTextInput()
&& newFocus != m_frameCacheUI->currentCursor()) {
// The focus has changed. We may need to update things.
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (javaObject.get()) {
@@ -749,7 +749,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer)
int getScaledMaxXScroll()
{
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (!javaObject.get())
@@ -761,7 +761,7 @@ int getScaledMaxXScroll()
int getScaledMaxYScroll()
{
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (!javaObject.get())
@@ -774,7 +774,7 @@ int getScaledMaxYScroll()
IntRect getVisibleRect()
{
IntRect rect;
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (!javaObject.get())
@@ -1256,7 +1256,7 @@ void sendMoveMouse(WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int
void sendMoveMouseIfLatest(bool clearTextEntry, bool stopPaintingCaret)
{
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
if (!javaObject.get())
@@ -1268,7 +1268,7 @@ void sendMoveMouseIfLatest(bool clearTextEntry, bool stopPaintingCaret)
void sendMotionUp(WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int y)
{
DBG_NAV_LOGD("m_generation=%d framePtr=%p nodePtr=%p x=%d y=%d", m_generation, framePtr, nodePtr, x, y);
- LOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
@@ -1314,7 +1314,7 @@ int currentMatchIndex()
bool scrollBy(int dx, int dy)
{
- LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
+ ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!");
JNIEnv* env = JSC::Bindings::getJNIEnv();
AutoJObject javaObject = m_javaGlue.object(env);
@@ -1409,7 +1409,7 @@ int moveGeneration()
LayerAndroid* compositeRoot() const
{
- LOG_ASSERT(!m_baseLayer || m_baseLayer->countChildren() == 1,
+ ALOG_ASSERT(!m_baseLayer || m_baseLayer->countChildren() == 1,
"base layer can't have more than one child %s", __FUNCTION__);
if (m_baseLayer && m_baseLayer->countChildren() == 1)
return static_cast<LayerAndroid*>(m_baseLayer->getChild(0));
@@ -1662,7 +1662,7 @@ static bool nativeCacheHitIsPlugin(JNIEnv *env, jobject obj)
static void nativeClearCursor(JNIEnv *env, jobject obj)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
view->clearCursor();
}
@@ -1849,7 +1849,7 @@ static void nativeDebugDump(JNIEnv *env, jobject obj)
{
#if DUMP_NAV_CACHE
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
view->debugDump();
#endif
}
@@ -1972,7 +1972,7 @@ static bool nativeHasContent(JNIEnv *env, jobject obj)
static jobject nativeImageURI(JNIEnv *env, jobject obj, jint x, jint y)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
WTF::String uri = view->imageURI(x, y);
return wtfStringToJstring(env, uri);
}
@@ -2133,21 +2133,21 @@ static jint nativeFocusNodePointer(JNIEnv *env, jobject obj)
static bool nativeCursorWantsKeyEvents(JNIEnv* env, jobject jwebview) {
WebView* view = GET_NATIVE_VIEW(env, jwebview);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
return view->cursorWantsKeyEvents();
}
static void nativeHideCursor(JNIEnv *env, jobject obj)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
view->hideCursor();
}
static void nativeSelectBestAt(JNIEnv *env, jobject obj, jobject jrect)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
WebCore::IntRect rect = jrect_to_webrect(env, jrect);
view->selectBestAt(rect);
}
@@ -2155,7 +2155,7 @@ static void nativeSelectBestAt(JNIEnv *env, jobject obj, jobject jrect)
static void nativeSelectAt(JNIEnv *env, jobject obj, jint x, jint y)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
WebCore::IntRect rect = IntRect(x, y , 1, 1);
view->selectBestAt(rect);
if (view->hasCursorNode())
@@ -2218,7 +2218,7 @@ static bool nativeMotionUp(JNIEnv *env, jobject obj,
int x, int y, int slop)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
return view->motionUp(x, y, slop);
}
@@ -2237,14 +2237,14 @@ static bool nativeMoveCursor(JNIEnv *env, jobject obj,
{
WebView* view = GET_NATIVE_VIEW(env, obj);
DBG_NAV_LOGD("env=%p obj=%p view=%p", env, obj, view);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
return view->moveCursor(key, count, ignoreScroll);
}
static void nativeSetFindIsUp(JNIEnv *env, jobject obj, jboolean isUp)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
view->setFindIsUp(isUp);
}
@@ -2261,18 +2261,18 @@ static void nativeShowCursorTimed(JNIEnv *env, jobject obj)
static void nativeSetHeightCanMeasure(JNIEnv *env, jobject obj, bool measure)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in nativeSetHeightCanMeasure");
+ ALOG_ASSERT(view, "view not set in nativeSetHeightCanMeasure");
view->setHeightCanMeasure(measure);
}
static jobject nativeGetCursorRingBounds(JNIEnv *env, jobject obj)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
jclass rectClass = env->FindClass("android/graphics/Rect");
- LOG_ASSERT(rectClass, "Could not find Rect class!");
+ ALOG_ASSERT(rectClass, "Could not find Rect class!");
jmethodID init = env->GetMethodID(rectClass, "<init>", "(IIII)V");
- LOG_ASSERT(init, "Could not find constructor for Rect");
+ ALOG_ASSERT(init, "Could not find constructor for Rect");
WebCore::IntRect webRect;
view->cursorRingBounds(&webRect);
jobject rect = env->NewObject(rectClass, init, webRect.x(),
@@ -2301,7 +2301,7 @@ static int nativeFindAll(JNIEnv *env, jobject obj, jstring findLower,
return 0;
}
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in nativeFindAll");
+ ALOG_ASSERT(view, "view not set in nativeFindAll");
CachedRoot* root = view->getFrameCache(WebView::AllowNewer);
if (!root) {
env->ReleaseStringChars(findLower, findLowerChars);
@@ -2354,21 +2354,21 @@ static int nativeFindAll(JNIEnv *env, jobject obj, jstring findLower,
static void nativeFindNext(JNIEnv *env, jobject obj, bool forward)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in nativeFindNext");
+ ALOG_ASSERT(view, "view not set in nativeFindNext");
view->findNext(forward);
}
static int nativeFindIndex(JNIEnv *env, jobject obj)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in nativeFindIndex");
+ ALOG_ASSERT(view, "view not set in nativeFindIndex");
return view->currentMatchIndex();
}
static void nativeUpdateCachedTextfield(JNIEnv *env, jobject obj, jstring updatedText, jint generation)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in nativeUpdateCachedTextfield");
+ ALOG_ASSERT(view, "view not set in nativeUpdateCachedTextfield");
CachedRoot* root = view->getFrameCache(WebView::DontAllowNewer);
if (!root)
return;
@@ -2385,7 +2385,7 @@ static jint nativeGetBlockLeftEdge(JNIEnv *env, jobject obj, jint x, jint y,
jfloat scale)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
if (!view)
return -1;
return view->getBlockLeftEdge(x, y, scale);
@@ -2395,7 +2395,7 @@ static void nativeDestroy(JNIEnv *env, jobject obj)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
ALOGD("nativeDestroy view: %p", view);
- LOG_ASSERT(view, "view not set in nativeDestroy");
+ ALOG_ASSERT(view, "view not set in nativeDestroy");
delete view;
}
@@ -2489,7 +2489,7 @@ static void nativeExtendSelection(JNIEnv *env, jobject obj, int x, int y)
static jobject nativeGetSelection(JNIEnv *env, jobject obj)
{
WebView* view = GET_NATIVE_VIEW(env, obj);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
String selection = view->getSelection();
return wtfStringToJstring(env, selection);
}
@@ -2630,7 +2630,7 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl)
{
#ifdef ANDROID_DUMP_DISPLAY_TREE
WebView* view = GET_NATIVE_VIEW(env, jwebview);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
if (view && view->getWebViewCore()) {
FILE* file = fopen(DISPLAY_TREE_LOG_FILE, "w");
@@ -2670,7 +2670,7 @@ static int nativeScrollableLayer(JNIEnv* env, jobject jwebview, jint x, jint y,
jobject rect, jobject bounds)
{
WebView* view = GET_NATIVE_VIEW(env, jwebview);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
SkIRect nativeRect, nativeBounds;
int id = view->scrollableLayer(x, y, &nativeRect, &nativeBounds);
if (rect)
@@ -2702,7 +2702,7 @@ static bool nativeScrollLayer(JNIEnv* env, jobject obj, jint layerId, jint x,
static void nativeSetIsScrolling(JNIEnv* env, jobject jwebview, jboolean isScrolling)
{
WebView* view = GET_NATIVE_VIEW(env, jwebview);
- LOG_ASSERT(view, "view not set in %s", __FUNCTION__);
+ ALOG_ASSERT(view, "view not set in %s", __FUNCTION__);
view->setIsScrolling(isScrolling);
}
@@ -2951,9 +2951,9 @@ static JNINativeMethod gJavaWebViewMethods[] = {
int registerWebView(JNIEnv* env)
{
jclass clazz = env->FindClass("android/webkit/WebView");
- LOG_ASSERT(clazz, "Unable to find class android/webkit/WebView");
+ ALOG_ASSERT(clazz, "Unable to find class android/webkit/WebView");
gWebViewField = env->GetFieldID(clazz, "mNativeClass", "I");
- LOG_ASSERT(gWebViewField, "Unable to find android/webkit/WebView.mNativeClass");
+ ALOG_ASSERT(gWebViewField, "Unable to find android/webkit/WebView.mNativeClass");
env->DeleteLocalRef(clazz);
return jniRegisterNativeMethods(env, "android/webkit/WebView", gJavaWebViewMethods, NELEM(gJavaWebViewMethods));