From 9dd59112365c6368f9d510822009c59f1981d670 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 8 Oct 2010 16:00:21 +0100 Subject: Fix WebCore/WebKit layering violation. Move the call to WebViewCore::updateTextfield() to the PlatformBridge so that WebCore code does not depend on WebKit code to compile. In addition to being a layering violation, the inclusion of WebViewCore.h includes WebCoreJni.h, which in a future change causes LOG to get #undefined when using the chromium net stack. Change-Id: Id88d332624323e03ce82120ef55db200cbabe63b --- WebCore/html/HTMLInputElement.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'WebCore/html/HTMLInputElement.cpp') diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp index 7e01de5..ef7c42f 100644 --- a/WebCore/html/HTMLInputElement.cpp +++ b/WebCore/html/HTMLInputElement.cpp @@ -68,7 +68,7 @@ #include "StepRange.h" #include "TextEvent.h" #ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS -#include "WebViewCore.h" +#include "PlatformBridge.h" #endif #include "WheelEvent.h" #include @@ -885,7 +885,7 @@ void HTMLInputElement::updateType() DeprecatedInputType newType = typeString.isEmpty() ? TEXT : typeMap->get(typeString); #ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS if (newType == PASSWORD && document()->focusedNode() == this) - android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, true, String()); + PlatformBridge::updateTextfield(document()->view(), this, true, String()); #endif // IMPORTANT: Don't allow the type to be changed to FILE after the first @@ -1638,7 +1638,7 @@ void HTMLInputElement::setValue(const String& value, bool sendChangeEvent) unsigned max = m_data.value().length(); #ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS // Make sure our UI side textfield changes to match the RenderTextControl - android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, false, value); + PlatformBridge::updateTextfield(document()->view(), this, false, value); #endif if (document()->focusedNode() == this) InputElement::updateSelectionRange(this, this, max, max); -- cgit v1.1