diff options
33 files changed, 207 insertions, 170 deletions
@@ -376,11 +376,14 @@ LOCAL_SHARED_LIBRARIES := \ libicuuc \ libicui18n \ libmedia \ - libsurfaceflinger_client \ libEGL \ libGLESv2 \ libgui +ifeq ($(PLATFORM_VERSION),3.1.4.1.5.9.2.6.5) +LOCAL_SHARED_LIBRARIES += libsurfaceflinger_client +endif + ifeq ($(WEBCORE_INSTRUMENTATION),true) LOCAL_SHARED_LIBRARIES += libhardware_legacy endif diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 60d3af1..7ba603b 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -695,10 +695,7 @@ void Document::setDocType(PassRefPtr<DocumentType> docType) if (m_docType && !ownerElement() && m_docType->publicId().startsWith("-//wapforum//dtd xhtml mobile 1.", false)) { // fit mobile sites directly in the screen - if (Frame *f = frame()) - f->settings()->setMetadataSettings("width", "device-width"); - if (FrameView* frameView = view()) - PlatformBridge::updateViewport(frameView); + processViewport("width=device-width"); } #endif } @@ -2729,9 +2726,9 @@ void Document::processArguments(const String& features, void* data, ArgumentsCal #ifdef ANDROID_META_SUPPORT if (frame()) frame()->settings()->setMetadataSettings(keyString, valueString); -#else - callback(keyString, valueString, this, data); #endif + if (callback && data) + callback(keyString, valueString, this, data); } } diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h index 5ab6d77..179293c 100644 --- a/Source/WebCore/dom/Document.h +++ b/Source/WebCore/dom/Document.h @@ -794,11 +794,10 @@ public: void processViewport(const String& features); #ifdef ANDROID_META_SUPPORT - /** - * Handles viewport like <meta name = "viewport" content = "width = device-width"> - * or format-detection like <meta name = "format-detection" content = "telephone=no"> - */ - void processMetadataSettings(const String& content); + /** + * Handles format-detection like <meta name = "format-detection" content = "telephone=no"> + */ + void processMetadataSettings(const String& content); #endif // Returns the owning element in the parent document. diff --git a/Source/WebCore/html/HTMLBodyElement.cpp b/Source/WebCore/html/HTMLBodyElement.cpp index 9cf8730..0c93c95 100644 --- a/Source/WebCore/html/HTMLBodyElement.cpp +++ b/Source/WebCore/html/HTMLBodyElement.cpp @@ -206,13 +206,7 @@ void HTMLBodyElement::insertedIntoDocument() if (settings->viewportWidth() == -1 && (host.startsWith("m.") || host.startsWith("mobile.") || host.startsWith("wap.") || host.contains(".m.") || host.contains(".mobile." || host.contains(".wap.")))) { // fit mobile sites directly in the screen - settings->setMetadataSettings("width", "device-width"); - // update the meta data if it is the top document - if (!ownerElement) { - FrameView* view = document()->view(); - if (view) - PlatformBridge::updateViewport(view); - } + document()->processViewport("width=device-width"); } } #endif diff --git a/Source/WebCore/html/HTMLMetaElement.cpp b/Source/WebCore/html/HTMLMetaElement.cpp index d8d9fb3..cb7f4c0 100644 --- a/Source/WebCore/html/HTMLMetaElement.cpp +++ b/Source/WebCore/html/HTMLMetaElement.cpp @@ -75,30 +75,18 @@ void HTMLMetaElement::process() { if (!inDocument() || m_content.isNull()) return; + if (equalIgnoringCase(name(), "viewport")) + document()->processViewport(m_content); #ifdef ANDROID_META_SUPPORT // TODO: Evaluate whether to take upstreamed meta support - bool updateViewport = false; - if (equalIgnoringCase(name(), "viewport")) { - document()->processMetadataSettings(m_content); - updateViewport = true; - } else if (equalIgnoringCase(name(), "format-detection")) + else if (equalIgnoringCase(name(), "format-detection")) document()->processMetadataSettings(m_content); else if (((equalIgnoringCase(name(), "HandheldFriendly") && equalIgnoringCase(m_content, "true")) || equalIgnoringCase(name(), "MobileOptimized")) && document()->settings() && document()->settings()->viewportWidth() == -1) { // fit mobile sites directly in the screen - document()->settings()->setMetadataSettings("width", "device-width"); - updateViewport = true; + document()->processViewport("width=device-width"); } - // update the meta data if it is the top document - if (updateViewport && !document()->ownerElement()) { - FrameView* view = document()->view(); - if (view) - PlatformBridge::updateViewport(view); - } -#else - if (equalIgnoringCase(name(), "viewport")) - document()->processViewport(m_content); #endif #if ENABLE(ANDROID_INSTALLABLE_WEB_APPS) diff --git a/Source/WebCore/platform/android/ScrollViewAndroid.cpp b/Source/WebCore/platform/android/ScrollViewAndroid.cpp index f54e5ea..87c6a1f 100644 --- a/Source/WebCore/platform/android/ScrollViewAndroid.cpp +++ b/Source/WebCore/platform/android/ScrollViewAndroid.cpp @@ -68,32 +68,36 @@ IntSize ScrollView::platformContentsSize() const return m_contentsSize; } +static float getWebViewCoreScale(const ScrollView* view) { + return android::WebViewCore::getWebViewCore(view)->scale(); +} + int ScrollView::platformActualWidth() const { if (parent()) return width(); - return platformWidget()->visibleWidth(); + return platformWidget()->visibleWidth() * getWebViewCoreScale(this); } int ScrollView::platformActualHeight() const { if (parent()) return height(); - return platformWidget()->visibleHeight(); + return platformWidget()->visibleHeight() * getWebViewCoreScale(this); } int ScrollView::platformActualScrollX() const { if (parent()) return scrollX(); - return platformWidget()->visibleX(); + return platformWidget()->visibleX() * getWebViewCoreScale(this); } int ScrollView::platformActualScrollY() const { if (parent()) return scrollY(); - return platformWidget()->visibleY(); + return platformWidget()->visibleY() * getWebViewCoreScale(this); } void ScrollView::platformSetScrollPosition(const WebCore::IntPoint& pt) diff --git a/Source/WebCore/platform/graphics/android/AndroidAnimation.cpp b/Source/WebCore/platform/graphics/android/AndroidAnimation.cpp index e7d4780..2939cf0 100644 --- a/Source/WebCore/platform/graphics/android/AndroidAnimation.cpp +++ b/Source/WebCore/platform/graphics/android/AndroidAnimation.cpp @@ -83,10 +83,10 @@ AndroidAnimation::AndroidAnimation(AndroidAnimation* anim) , m_iterationCount(anim->m_iterationCount) , m_direction(anim->m_direction) , m_timingFunction(anim->m_timingFunction) + , m_name(anim->name()) , m_type(anim->m_type) , m_operations(anim->m_operations) , m_originalLayer(0) - , m_name(anim->name()) { gDebugAndroidAnimationInstances++; } diff --git a/Source/WebCore/platform/graphics/android/BaseTile.cpp b/Source/WebCore/platform/graphics/android/BaseTile.cpp index 2fa2427..70b98b0 100644 --- a/Source/WebCore/platform/graphics/android/BaseTile.cpp +++ b/Source/WebCore/platform/graphics/android/BaseTile.cpp @@ -54,7 +54,8 @@ namespace WebCore { BaseTile::BaseTile() - : m_page(0) + : m_glWebViewState(0) + , m_page(0) , m_x(-1) , m_y(-1) , m_texture(0) diff --git a/Source/WebCore/platform/graphics/android/BaseTile.h b/Source/WebCore/platform/graphics/android/BaseTile.h index d336ae2..8a812f8 100644 --- a/Source/WebCore/platform/graphics/android/BaseTile.h +++ b/Source/WebCore/platform/graphics/android/BaseTile.h @@ -40,6 +40,7 @@ namespace WebCore { class TextureInfo; class TiledPage; class BaseTileTexture; +class GLWebViewState; /** * An individual tile that is used to construct part of a webpage's BaseLayer of @@ -94,11 +95,16 @@ public: unsigned int lastPaintedPicture() const { return m_lastPaintedPicture; } BaseTileTexture* texture() { return m_texture; } + void setGLWebViewState(GLWebViewState* state) { m_glWebViewState = state; } + // TextureOwner implementation virtual bool removeTexture(BaseTileTexture* texture); virtual TiledPage* page() { return m_page; } + virtual GLWebViewState* state() { return m_glWebViewState; } private: + GLWebViewState* m_glWebViewState; + // these variables are only set when the object is constructed TiledPage* m_page; int m_x; diff --git a/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp b/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp index ee8cebf..4d1dec1 100644 --- a/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp +++ b/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp @@ -147,13 +147,12 @@ bool BaseTileTexture::acquire(TextureOwner* owner, bool force) return setOwner(owner, force); } -bool BaseTileTexture::tryAcquire(TextureOwner* owner, TiledPage* currentPage, TiledPage* nextPage) +bool BaseTileTexture::tryAcquire(TextureOwner* owner) { m_busyLock.lock(); if (!m_busy && m_owner - && m_owner->page() != currentPage - && m_owner->page() != nextPage) { + && m_owner->state() != owner->state()) { m_busyLock.unlock(); return this->acquire(owner); } diff --git a/Source/WebCore/platform/graphics/android/BaseTileTexture.h b/Source/WebCore/platform/graphics/android/BaseTileTexture.h index 0a7534a..5496e66 100644 --- a/Source/WebCore/platform/graphics/android/BaseTileTexture.h +++ b/Source/WebCore/platform/graphics/android/BaseTileTexture.h @@ -86,7 +86,7 @@ public: // returns false if ownership cannot be transferred because the tile is busy bool acquire(TextureOwner* owner, bool force = false); bool release(TextureOwner* owner); - bool tryAcquire(TextureOwner* owner, TiledPage* currentPage, TiledPage* nextPage); + bool tryAcquire(TextureOwner* owner); // set the texture owner if not busy. Return false if busy, true otherwise. bool setOwner(TextureOwner* owner, bool force = false); diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index dda5dee..54176e0 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -116,6 +116,7 @@ GLWebViewState::~GLWebViewState() #ifdef DEBUG_COUNT ClassTracker::instance()->decrement("GLWebViewState"); #endif + TilesManager::instance()->unregisterGLWebViewState(this); } void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const SkRegion& inval, @@ -497,6 +498,7 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect, IntRect& clip, float scale, SkColor color) { glFinish(); + TilesManager::instance()->registerGLWebViewState(this); m_baseLayerLock.lock(); BaseLayerAndroid* baseLayer = m_currentBaseLayer; diff --git a/Source/WebCore/platform/graphics/android/LayerAndroid.h b/Source/WebCore/platform/graphics/android/LayerAndroid.h index 9dfe973..bd6c0ef 100644 --- a/Source/WebCore/platform/graphics/android/LayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/LayerAndroid.h @@ -102,6 +102,7 @@ public: LayerTexture* texture() { return m_reservedTexture; } virtual TiledPage* page() { return 0; } + virtual GLWebViewState* state() { return 0; } void setBackfaceVisibility(bool value) { m_backfaceVisibility = value; } void setTransform(const TransformationMatrix& matrix) { m_transform = matrix; } diff --git a/Source/WebCore/platform/graphics/android/TextureOwner.h b/Source/WebCore/platform/graphics/android/TextureOwner.h index bd3a291..15395bb 100644 --- a/Source/WebCore/platform/graphics/android/TextureOwner.h +++ b/Source/WebCore/platform/graphics/android/TextureOwner.h @@ -30,12 +30,14 @@ namespace WebCore { class TiledPage; class BaseTileTexture; +class GLWebViewState; class TextureOwner { public: virtual ~TextureOwner() { } virtual bool removeTexture(BaseTileTexture* texture) = 0; virtual TiledPage* page() = 0; + virtual GLWebViewState* state() = 0; }; } diff --git a/Source/WebCore/platform/graphics/android/TiledPage.cpp b/Source/WebCore/platform/graphics/android/TiledPage.cpp index 0e1e947..b532d7a 100644 --- a/Source/WebCore/platform/graphics/android/TiledPage.cpp +++ b/Source/WebCore/platform/graphics/android/TiledPage.cpp @@ -171,6 +171,7 @@ void TiledPage::prepareRow(bool goingLeft, int tilesInRow, int firstTileX, int y if (currentTile) { currentTile->setScale(m_scale); + currentTile->setGLWebViewState(m_glWebViewState); // ensure there is a texture associated with the tile and then check to // see if the texture is dirty and in need of repainting diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp index da7e89c..ad4cbd3 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.cpp +++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp @@ -93,6 +93,7 @@ TilesManager::TilesManager() , m_expandedTileBounds(false) , m_generatorReady(false) , m_showVisualIndicator(false) + , m_drawRegistrationCount(0) { XLOG("TilesManager ctor"); m_textures.reserveCapacity(MAX_TEXTURE_ALLOCATION); @@ -168,47 +169,41 @@ BaseTileTexture* TilesManager::getAvailableTexture(BaseTile* owner) } // The heuristic for selecting a texture is as follows: - // 1. return an unused texture if one exists - // 2. return the farthest texture from the viewport (from any tiled page) - // 3. return any texture not used by the tile's page or the page's sibiling - // - // The texture level indicates a tiles closeness to the current viewport + // 1. If usedLevel == -1, break with that one + // 2. Otherwise, select the highest usedLevel available + // 3. Break ties with the lowest LRU(RecentLevel) valued GLWebViewState + BaseTileTexture* farthestTexture = 0; int farthestTextureLevel = 0; + unsigned int lowestDrawCount = ~0; //maximum uint const unsigned int max = m_textures.size(); for (unsigned int i = 0; i < max; i++) { BaseTileTexture* texture = m_textures[i]; + if (texture->usedLevel() == -1) { // found an unused texture, grab it farthestTexture = texture; break; } - if (farthestTextureLevel < texture->usedLevel()) { - farthestTextureLevel = texture->usedLevel(); + + int textureLevel = texture->usedLevel(); + unsigned int textureDrawCount = getGLWebViewStateDrawCount(texture->owner()->state()); + + // if (higher distance or equal distance but less recently rendered) + if (farthestTextureLevel < textureLevel + || ((farthestTextureLevel == textureLevel) && (lowestDrawCount > textureDrawCount))) { farthestTexture = texture; + farthestTextureLevel = textureLevel; + lowestDrawCount = textureDrawCount; } } + if (farthestTexture && farthestTexture->acquire(owner)) { - XLOG("farthest texture, getAvailableTexture(%x) => texture %x (level %d)", - owner, farthestTexture, farthestTexture->usedLevel()); + XLOG("farthest texture, getAvailableTexture(%x) => texture %x (level %d, drawCount %d)", + owner, farthestTexture, farthestTextureLevel, lowestDrawCount); farthestTexture->setUsedLevel(0); return farthestTexture; } - // At this point, all textures are used or we failed to aquire the farthest - // texture. Now let's just grab a texture not in use by either of the two - // tiled pages associated with this view. - TiledPage* currentPage = owner->page(); - TiledPage* nextPage = currentPage->sibling(); - for (unsigned int i = 0; i < max; i++) { - BaseTileTexture* texture = m_textures[i]; - if (texture->tryAcquire(owner, currentPage, nextPage)) { - XLOG("grab a texture that wasn't ours, (%x != %x) at %d => texture %x", - owner->page(), texture->owner()->page(), i, texture); - texture->setUsedLevel(0); - return texture; - } - } - XLOG("Couldn't find an available texture for BaseTile %x (%d, %d) !!!", owner, owner->x(), owner->y()); #ifdef DEBUG @@ -424,6 +419,25 @@ int TilesManager::expandedTileBoundsY() { return m_expandedTileBounds ? EXPANDED_TILE_BOUNDS_Y : 0; } +void TilesManager::registerGLWebViewState(GLWebViewState* state) +{ + m_glWebViewStateMap.set(state, m_drawRegistrationCount); + m_drawRegistrationCount++; + XLOG("now state %p, total of %d states", state, m_glWebViewStateMap.size()); +} + +void TilesManager::unregisterGLWebViewState(GLWebViewState* state) +{ + m_glWebViewStateMap.remove(state); + XLOG("state %p now removed, total of %d states", state, m_glWebViewStateMap.size()); +} + +unsigned int TilesManager::getGLWebViewStateDrawCount(GLWebViewState* state) +{ + XLOG("looking up state %p, contains=%s", state, m_glWebViewStateMap.contains(state) ? "TRUE" : "FALSE"); + return m_glWebViewStateMap.find(state)->second; +} + TilesManager* TilesManager::instance() { if (!gInstance) { diff --git a/Source/WebCore/platform/graphics/android/TilesManager.h b/Source/WebCore/platform/graphics/android/TilesManager.h index 5237c14..2ef9e66 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.h +++ b/Source/WebCore/platform/graphics/android/TilesManager.h @@ -37,6 +37,7 @@ #include "TiledPage.h" #include "VideoLayerManager.h" #include <utils/threads.h> +#include <wtf/HashMap.h> namespace WebCore { @@ -108,6 +109,8 @@ public: static float tileHeight(); int expandedTileBoundsX(); int expandedTileBoundsY(); + void registerGLWebViewState(GLWebViewState* state); + void unregisterGLWebViewState(GLWebViewState* state); void allocateTiles(); @@ -156,6 +159,11 @@ private: ShaderProgram m_shader; VideoLayerManager m_videoLayerManager; + + HashMap<GLWebViewState*, unsigned int> m_glWebViewStateMap; + unsigned int m_drawRegistrationCount; + + unsigned int getGLWebViewStateDrawCount(GLWebViewState* state); }; } // namespace WebCore diff --git a/Source/WebCore/platform/graphics/android/VideoLayerAndroid.h b/Source/WebCore/platform/graphics/android/VideoLayerAndroid.h index 0f3f007..abc1c13 100644 --- a/Source/WebCore/platform/graphics/android/VideoLayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/VideoLayerAndroid.h @@ -44,7 +44,7 @@ namespace WebCore { // Otherwise will draw a static image. // NOTE: These values are matching the ones in HTML5VideoView.java // Please keep them in sync when changed here. -typedef enum {INITIALIZED, PREPARING, PREPARED, PLAYING} PlayerState; +typedef enum {INITIALIZED, PREPARING, PREPARED, PLAYING, RELEASED} PlayerState; class VideoLayerAndroid : public LayerAndroid { diff --git a/Source/WebKit/Android.mk b/Source/WebKit/Android.mk index 7a5fabf..3a47909 100644 --- a/Source/WebKit/Android.mk +++ b/Source/WebKit/Android.mk @@ -133,5 +133,5 @@ LOCAL_SRC_FILES += \ android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp \ android/WebCoreSupport/autofill/FormFieldAndroid.cpp \ android/WebCoreSupport/autofill/FormManagerAndroid.cpp \ - android/WebCoreSupport/autofill/WebAutoFill.cpp + android/WebCoreSupport/autofill/WebAutofill.cpp endif # ENABLE_AUTOFILL == true diff --git a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp index 1fd8ee9..7ff5b19 100644 --- a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp +++ b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp @@ -347,6 +347,22 @@ void ChromeClientAndroid::scrollbarsModeDidChange() const notImplemented(); } +void ChromeClientAndroid::dispatchViewportDataDidChange(const ViewportArguments& input) const { +#ifdef ANDROID_META_SUPPORT + const ViewportArguments emptyArgument; + if (input == emptyArgument) { + // Empty Argument is for a page with no viewport meta tag; so reset everything. + m_webFrame->page()->settings()->resetMetadataSettings(); + } + Document* doc = m_webFrame->page()->mainFrame()->document(); + if (!doc->ownerElement()) { + FrameView* view = doc->view(); + if (view) + PlatformBridge::updateViewport(view); + } +#endif +} + void ChromeClientAndroid::mouseDidMoveOverElement(const HitTestResult&, unsigned int) {} void ChromeClientAndroid::setToolTip(const String&, TextDirection) {} void ChromeClientAndroid::print(Frame*) {} diff --git a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.h b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.h index acb7792..36576e6 100644 --- a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.h +++ b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.h @@ -124,6 +124,8 @@ namespace android { virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const; // End methods used by HostWindow. + virtual void dispatchViewportDataDidChange(const ViewportArguments&) const; + virtual void scrollbarsModeDidChange() const; virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned int); diff --git a/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h b/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h index 1636405..670b307 100644 --- a/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h +++ b/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h @@ -91,7 +91,7 @@ #include <base/utf_string_conversions.h> #include <chrome/browser/autofill/autofill_host.h> #include <chrome/browser/profiles/profile.h> -#include <chrome/browser/tab_contents/tab_contents.h> +#include <content/browser/tab_contents/tab_contents.h> #include <webkit/glue/form_data.h> #endif diff --git a/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp index 2667b71..785f0a8 100644 --- a/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp +++ b/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp @@ -270,10 +270,10 @@ void EditorClientAndroid::willSetInputMethodState() void EditorClientAndroid::requestCheckingOfString(SpellChecker*, int, TextCheckingTypeMask, const String&) {} #if ENABLE(WEB_AUTOFILL) -WebAutoFill* EditorClientAndroid::getAutoFill() +WebAutofill* EditorClientAndroid::getAutofill() { if (!m_autoFill) - m_autoFill.set(new WebAutoFill()); + m_autoFill.set(new WebAutofill()); return m_autoFill.get(); } diff --git a/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.h b/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.h index 9bf6e1f..385d75c 100644 --- a/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.h +++ b/Source/WebKit/android/WebCoreSupport/EditorClientAndroid.h @@ -32,7 +32,7 @@ #include "EditorClient.h" #include "Page.h" #include "TextCheckerClient.h" -#include "autofill/WebAutoFill.h" +#include "autofill/WebAutofill.h" #include <wtf/OwnPtr.h> @@ -124,14 +124,14 @@ public: void setShouldChangeSelectedRange(bool shouldChangeSelectedRange) { m_shouldChangeSelectedRange = shouldChangeSelectedRange; } void setUiGeneratedSelectionChange(bool uiGenerated) { m_uiGeneratedSelectionChange = uiGenerated; } #if ENABLE(WEB_AUTOFILL) - WebAutoFill* getAutoFill(); + WebAutofill* getAutofill(); #endif private: Page* m_page; bool m_shouldChangeSelectedRange; bool m_uiGeneratedSelectionChange; #if ENABLE(WEB_AUTOFILL) - OwnPtr<WebAutoFill> m_autoFill; + OwnPtr<WebAutofill> m_autoFill; #endif }; diff --git a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 99f34d5..88ab4a3 100644 --- a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -76,7 +76,7 @@ #include "WebFrameView.h" #include "WebViewClientError.h" #include "WebViewCore.h" -#include "autofill/WebAutoFill.h" +#include "autofill/WebAutofill.h" #include "android_graphics.h" #include <utils/AssetManager.h> @@ -301,7 +301,7 @@ void FrameLoaderClientAndroid::dispatchDidCommitLoad() { #if ENABLE(WEB_AUTOFILL) if (m_frame == m_frame->page()->mainFrame()) { EditorClientAndroid* editorC = static_cast<EditorClientAndroid*>(m_frame->page()->editorClient()); - WebAutoFill* autoFill = editorC->getAutoFill(); + WebAutofill* autoFill = editorC->getAutofill(); autoFill->reset(); } #endif diff --git a/Source/WebKit/android/WebCoreSupport/WebRequestContext.cpp b/Source/WebKit/android/WebCoreSupport/WebRequestContext.cpp index f51ba53..43f5eb1 100644 --- a/Source/WebKit/android/WebCoreSupport/WebRequestContext.cpp +++ b/Source/WebKit/android/WebCoreSupport/WebRequestContext.cpp @@ -61,15 +61,15 @@ WebRequestContext::WebRequestContext(bool isPrivateBrowsing) } WebCache* cache = WebCache::get(m_isPrivateBrowsing); - host_resolver_ = cache->hostResolver(); - http_transaction_factory_ = cache->cache(); + set_host_resolver(cache->hostResolver()); + set_http_transaction_factory(cache->cache()); WebCookieJar* cookieJar = WebCookieJar::get(m_isPrivateBrowsing); - cookie_store_ = cookieJar->cookieStore(); - cookie_policy_ = cookieJar; + set_cookie_store(cookieJar->cookieStore()); + set_cookie_policy(cookieJar); // Also hardcoded in FrameLoader.java - accept_charset_ = "utf-8, iso-8859-1, utf-16, *;q=0.7"; + set_accept_charset("utf-8, iso-8859-1, utf-16, *;q=0.7"); } WebRequestContext::~WebRequestContext() diff --git a/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp b/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp index 5bc4c92..d2dc201 100644 --- a/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp +++ b/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.cpp @@ -26,26 +26,26 @@ #include "config.h" #include "AutoFillHostAndroid.h" -#include "autofill/WebAutoFill.h" +#include "autofill/WebAutofill.h" namespace android { -AutoFillHostAndroid::AutoFillHostAndroid(WebAutoFill* autoFill) - : mAutoFill(autoFill) +AutoFillHostAndroid::AutoFillHostAndroid(WebAutofill* autofill) + : mAutofill(autofill) { } void AutoFillHostAndroid::AutoFillSuggestionsReturned(const std::vector<string16>& names, const std::vector<string16>& labels, const std::vector<string16>& icons, const std::vector<int>& uniqueIds) { // TODO: what do we do with icons? - if (mAutoFill) - mAutoFill->querySuccessful(names[0], labels[0], uniqueIds[0]); + if (mAutofill) + mAutofill->querySuccessful(names[0], labels[0], uniqueIds[0]); } void AutoFillHostAndroid::AutoFillFormDataFilled(int queryId, const webkit_glue::FormData& form) { - if (mAutoFill) - mAutoFill->fillFormInPage(queryId, form); + if (mAutofill) + mAutofill->fillFormInPage(queryId, form); } } diff --git a/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h b/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h index 9677b46..31767d5 100644 --- a/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h +++ b/Source/WebKit/android/WebCoreSupport/autofill/AutoFillHostAndroid.h @@ -35,19 +35,19 @@ class FormData; } namespace android { -class WebAutoFill; +class WebAutofill; -// This class receives the callbacks from the AutoFillManager in the Chromium code. +// This class receives the callbacks from the AutofillManager in the Chromium code. class AutoFillHostAndroid : public AutoFillHost { public: - AutoFillHostAndroid(WebAutoFill* autoFill); + AutoFillHostAndroid(WebAutofill* autofill); virtual ~AutoFillHostAndroid() { } virtual void AutoFillSuggestionsReturned(const std::vector<string16>& names, const std::vector<string16>& labels, const std::vector<string16>& icons, const std::vector<int>& uniqueIds); virtual void AutoFillFormDataFilled(int queryId, const webkit_glue::FormData&); private: - WebAutoFill* mAutoFill; + WebAutofill* mAutofill; }; } diff --git a/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp index 1fdb671..ff4f593 100644 --- a/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.cpp @@ -24,7 +24,7 @@ */ #include "config.h" -#include "WebAutoFill.h" +#include "WebAutofill.h" #if ENABLE(WEB_AUTOFILL) @@ -48,7 +48,7 @@ namespace android { -WebAutoFill::WebAutoFill() +WebAutofill::WebAutofill() : mQueryId(1) , mWebViewCore(0) , mLastSearchDomVersion(0) @@ -58,34 +58,34 @@ WebAutoFill::WebAutoFill() setEmptyProfile(); } -void WebAutoFill::init() +void WebAutofill::init() { - if (mAutoFillManager) + if (mAutofillManager) return; mFormManager = new FormManager(); // We use the WebView's WebRequestContext, which may be a private browsing context. ASSERT(mWebViewCore); - mAutoFillManager = new AutoFillManager(mTabContents.get()); - mAutoFillHost = new AutoFillHostAndroid(this); + mAutofillManager = new AutofillManager(mTabContents.get()); + mAutofillHost = new AutoFillHostAndroid(this); mTabContents->SetProfileRequestContext(new AndroidURLRequestContextGetter(mWebViewCore->webRequestContext(), WebUrlLoaderClient::ioThread())); - mTabContents->SetAutoFillHost(mAutoFillHost.get()); + mTabContents->SetAutoFillHost(mAutofillHost.get()); } -WebAutoFill::~WebAutoFill() +WebAutofill::~WebAutofill() { cleanUpQueryMap(); mUniqueIdMap.clear(); } -void WebAutoFill::cleanUpQueryMap() +void WebAutofill::cleanUpQueryMap() { - for (AutoFillQueryFormDataMap::iterator it = mQueryMap.begin(); it != mQueryMap.end(); it++) + for (AutofillQueryFormDataMap::iterator it = mQueryMap.begin(); it != mQueryMap.end(); it++) delete it->second; mQueryMap.clear(); } -void WebAutoFill::searchDocument(WebCore::Frame* frame) +void WebAutofill::searchDocument(WebCore::Frame* frame) { if (!enabled()) return; @@ -100,41 +100,41 @@ void WebAutoFill::searchDocument(WebCore::Frame* frame) mQueryId = 1; ASSERT(mFormManager); - ASSERT(mAutoFillManager); + ASSERT(mAutofillManager); - mAutoFillManager->Reset(); + mAutofillManager->Reset(); mFormManager->Reset(); mFormManager->ExtractForms(frame); mFormManager->GetFormsInFrame(frame, FormManager::REQUIRE_AUTOCOMPLETE, &mForms); - // Needs to be done on a Chrome thread as it will make a URL request to the AutoFill server. + // Needs to be done on a Chrome thread as it will make a URL request to the Autofill server. // TODO: Use our own Autofill thread instead of the IO thread. // TODO: For now, block here. Would like to make this properly async. base::Thread* thread = WebUrlLoaderClient::ioThread(); mParsingForms = true; - thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &WebAutoFill::formsSeenImpl)); + thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &WebAutofill::formsSeenImpl)); while (mParsingForms) mFormsSeenCondition.wait(mFormsSeenMutex); } // Called on the Chromium IO thread. -void WebAutoFill::formsSeenImpl() +void WebAutofill::formsSeenImpl() { MutexLocker lock(mFormsSeenMutex); - mAutoFillManager->OnFormsSeenWrapper(mForms); + mAutofillManager->OnFormsSeenWrapper(mForms); mParsingForms = false; mFormsSeenCondition.signal(); } -void WebAutoFill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldElement) +void WebAutofill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldElement) { ASSERT(formFieldElement); Document* doc = formFieldElement->document(); Frame* frame = doc->frame(); - // FIXME: AutoFill only works in main frame for now. Should consider + // FIXME: Autofill only works in main frame for now. Should consider // child frames. if (frame != frame->page()->mainFrame()) return; @@ -166,7 +166,7 @@ void WebAutoFill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldEle mFormManager->FindFormWithFormControlElement(formFieldElement, FormManager::REQUIRE_AUTOCOMPLETE, form); mQueryMap[mQueryId] = new FormDataAndField(form, formField); - bool suggestions = mAutoFillManager->OnQueryFormFieldAutoFillWrapper(*form, *formField); + bool suggestions = mAutofillManager->OnQueryFormFieldAutoFillWrapper(*form, *formField); mQueryId++; if (!suggestions) { @@ -177,7 +177,7 @@ void WebAutoFill::formFieldFocused(WebCore::HTMLFormControlElement* formFieldEle } } -void WebAutoFill::querySuccessful(const string16& value, const string16& label, int uniqueId) +void WebAutofill::querySuccessful(const string16& value, const string16& label, int uniqueId) { if (!enabled()) return; @@ -187,10 +187,10 @@ void WebAutoFill::querySuccessful(const string16& value, const string16& label, mUniqueIdMap[mQueryId] = uniqueId; ASSERT(mWebViewCore); - mWebViewCore->setWebTextViewAutoFillable(mQueryId, mAutoFillProfile->Label()); + mWebViewCore->setWebTextViewAutoFillable(mQueryId, mAutofillProfile->Label()); } -void WebAutoFill::fillFormFields(int queryId) +void WebAutofill::fillFormFields(int queryId) { if (!enabled()) return; @@ -200,23 +200,23 @@ void WebAutoFill::fillFormFields(int queryId) ASSERT(form); ASSERT(field); - AutoFillQueryToUniqueIdMap::iterator iter = mUniqueIdMap.find(queryId); + AutofillQueryToUniqueIdMap::iterator iter = mUniqueIdMap.find(queryId); if (iter == mUniqueIdMap.end()) { - // The user has most likely tried to AutoFill the form again without + // The user has most likely tried to Autofill the form again without // refocussing the form field. The UI should protect against this // but stop here to be certain. return; } - mAutoFillManager->OnFillAutoFillFormDataWrapper(queryId, *form, *field, iter->second); + mAutofillManager->OnFillAutoFillFormDataWrapper(queryId, *form, *field, iter->second); mUniqueIdMap.erase(iter); } -void WebAutoFill::fillFormInPage(int queryId, const webkit_glue::FormData& form) +void WebAutofill::fillFormInPage(int queryId, const webkit_glue::FormData& form) { if (!enabled()) return; - // FIXME: Pass a pointer to the Node that triggered the AutoFill flow here instead of 0. + // FIXME: Pass a pointer to the Node that triggered the Autofill flow here instead of 0. // The consquence of passing 0 is that we should always fail the test in FormManader::ForEachMathcingFormField():169 // that says "only overwrite an elements current value if the user triggered autofill through that element" // for elements that have a value already. But by a quirk of Android text views we are OK. We should still @@ -224,58 +224,58 @@ void WebAutoFill::fillFormInPage(int queryId, const webkit_glue::FormData& form) mFormManager->FillForm(form, 0); } -bool WebAutoFill::enabled() const +bool WebAutofill::enabled() const { Page* page = mWebViewCore->mainFrame()->page(); return page ? page->settings()->autoFillEnabled() : false; } -void WebAutoFill::setProfile(const string16& fullName, const string16& emailAddress, const string16& companyName, +void WebAutofill::setProfile(const string16& fullName, const string16& emailAddress, const string16& companyName, const string16& addressLine1, const string16& addressLine2, const string16& city, const string16& state, const string16& zipCode, const string16& country, const string16& phoneNumber) { - if (!mAutoFillProfile) - mAutoFillProfile.set(new AutoFillProfile()); + if (!mAutofillProfile) + mAutofillProfile.set(new AutoFillProfile()); // Update the profile. - // Constants for AutoFill field types are found in external/chromium/chrome/browser/autofill/field_types.h. - mAutoFillProfile->SetInfo(AutoFillType(NAME_FULL), fullName); - mAutoFillProfile->SetInfo(AutoFillType(EMAIL_ADDRESS), emailAddress); - mAutoFillProfile->SetInfo(AutoFillType(COMPANY_NAME), companyName); - mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_LINE1), addressLine1); - mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_LINE2), addressLine2); - mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_CITY), city); - mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_STATE), state); - mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_ZIP), zipCode); - mAutoFillProfile->SetInfo(AutoFillType(ADDRESS_HOME_COUNTRY), country); - mAutoFillProfile->SetInfo(AutoFillType(PHONE_HOME_WHOLE_NUMBER), phoneNumber); + // Constants for Autofill field types are found in external/chromium/chrome/browser/autofill/field_types.h. + mAutofillProfile->SetInfo(AutofillType(NAME_FULL), fullName); + mAutofillProfile->SetInfo(AutofillType(EMAIL_ADDRESS), emailAddress); + mAutofillProfile->SetInfo(AutofillType(COMPANY_NAME), companyName); + mAutofillProfile->SetInfo(AutofillType(ADDRESS_HOME_LINE1), addressLine1); + mAutofillProfile->SetInfo(AutofillType(ADDRESS_HOME_LINE2), addressLine2); + mAutofillProfile->SetInfo(AutofillType(ADDRESS_HOME_CITY), city); + mAutofillProfile->SetInfo(AutofillType(ADDRESS_HOME_STATE), state); + mAutofillProfile->SetInfo(AutofillType(ADDRESS_HOME_ZIP), zipCode); + mAutofillProfile->SetInfo(AutofillType(ADDRESS_HOME_COUNTRY), country); + mAutofillProfile->SetInfo(AutofillType(PHONE_HOME_WHOLE_NUMBER), phoneNumber); std::vector<AutoFillProfile> profiles; - profiles.push_back(*mAutoFillProfile); + profiles.push_back(*mAutofillProfile); updateProfileLabel(); mTabContents->profile()->GetPersonalDataManager()->SetProfiles(&profiles); } -bool WebAutoFill::updateProfileLabel() +bool WebAutofill::updateProfileLabel() { std::vector<AutoFillProfile*> profiles; - profiles.push_back(mAutoFillProfile.get()); + profiles.push_back(mAutofillProfile.get()); return AutoFillProfile::AdjustInferredLabels(&profiles); } -void WebAutoFill::clearProfiles() +void WebAutofill::clearProfiles() { - if (!mAutoFillProfile) + if (!mAutofillProfile) return; // For now Chromium only ever knows about one profile, so we can just // remove it. If we support multiple profiles in the future // we need to remove them all here. - std::string profileGuid = mAutoFillProfile->guid(); + std::string profileGuid = mAutofillProfile->guid(); mTabContents->profile()->GetPersonalDataManager()->RemoveProfile(profileGuid); setEmptyProfile(); } -void WebAutoFill::setEmptyProfile() +void WebAutofill::setEmptyProfile() { // Set an empty profile. This will ensure that when autofill is enabled, // we will still search the document for autofillable forms and inform @@ -285,7 +285,7 @@ void WebAutoFill::setEmptyProfile() // Chromium code will strip the values sent into the profile so we need them to be // at least one non-whitespace character long. We need to set all fields of the // profile to a non-empty string so that any field type can trigger the autofill - // suggestion. AutoFill will not detect form fields if the profile value for that + // suggestion. Autofill will not detect form fields if the profile value for that // field is an empty string. static const string16 empty = string16(ASCIIToUTF16("a")); setProfile(empty, empty, empty, empty, empty, empty, empty, empty, empty, empty); diff --git a/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h b/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.h index 4dbd8ba..a2f56a2 100644 --- a/Source/WebKit/android/WebCoreSupport/autofill/WebAutoFill.h +++ b/Source/WebKit/android/WebCoreSupport/autofill/WebAutofill.h @@ -36,7 +36,7 @@ #include <wtf/OwnPtr.h> #include <wtf/ThreadingPrimitives.h> -class AutoFillManager; +class AutofillManager; class AutoFillProfile; class AutoFillHost; @@ -66,12 +66,12 @@ private: OwnPtr<webkit_glue::FormField> mField; }; -class WebAutoFill +class WebAutofill { - WTF_MAKE_NONCOPYABLE(WebAutoFill); + WTF_MAKE_NONCOPYABLE(WebAutofill); public: - WebAutoFill(); - virtual ~WebAutoFill(); + WebAutofill(); + virtual ~WebAutofill(); void formFieldFocused(WebCore::HTMLFormControlElement*); void fillFormFields(int queryId); void querySuccessful(const string16& value, const string16& label, int uniqueId); @@ -96,19 +96,19 @@ private: void cleanUpQueryMap(); OwnPtr<FormManager> mFormManager; - OwnPtr<AutoFillManager> mAutoFillManager; - OwnPtr<AutoFillHost> mAutoFillHost; + OwnPtr<AutofillManager> mAutofillManager; + OwnPtr<AutoFillHost> mAutofillHost; OwnPtr<TabContents> mTabContents; - OwnPtr<AutoFillProfile> mAutoFillProfile; + OwnPtr<AutoFillProfile> mAutofillProfile; typedef std::vector<webkit_glue::FormData, std::allocator<webkit_glue::FormData> > FormList; FormList mForms; - typedef std::map<int, FormDataAndField*> AutoFillQueryFormDataMap; - AutoFillQueryFormDataMap mQueryMap; + typedef std::map<int, FormDataAndField*> AutofillQueryFormDataMap; + AutofillQueryFormDataMap mQueryMap; - typedef std::map<int, int> AutoFillQueryToUniqueIdMap; - AutoFillQueryToUniqueIdMap mUniqueIdMap; + typedef std::map<int, int> AutofillQueryToUniqueIdMap; + AutofillQueryToUniqueIdMap mUniqueIdMap; int mQueryId; WebViewCore* mWebViewCore; @@ -122,7 +122,7 @@ private: } -DISABLE_RUNNABLE_METHOD_REFCOUNT(android::WebAutoFill); +DISABLE_RUNNABLE_METHOD_REFCOUNT(android::WebAutofill); #endif // ENABLE(WEB_AUTOFILL) #endif // WebAutoFill_h diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp index fb558c6..bdb502e 100644 --- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -124,7 +124,7 @@ #endif #if ENABLE(WEB_AUTOFILL) -#include "autofill/WebAutoFill.h" +#include "autofill/WebAutofill.h" #endif using namespace JSC::Bindings; @@ -1334,7 +1334,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss WebViewCore* webViewCore = new WebViewCore(env, javaview, frame); #if ENABLE(WEB_AUTOFILL) - editorC->getAutoFill()->setWebViewCore(webViewCore); + editorC->getAutofill()->setWebViewCore(webViewCore); #endif // Create a FrameView diff --git a/Source/WebKit/android/jni/WebSettings.cpp b/Source/WebKit/android/jni/WebSettings.cpp index 6f18695..589615d 100644 --- a/Source/WebKit/android/jni/WebSettings.cpp +++ b/Source/WebKit/android/jni/WebSettings.cpp @@ -293,7 +293,7 @@ inline string16 getStringFieldAsString16(JNIEnv* env, jobject autoFillProfile, j return str ? jstringToString16(env, str) : string16(); } -void syncAutoFillProfile(JNIEnv* env, jobject autoFillProfile, WebAutoFill* webAutoFill) +void syncAutoFillProfile(JNIEnv* env, jobject autoFillProfile, WebAutofill* webAutofill) { string16 fullName = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileFullName); string16 emailAddress = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileEmailAddress); @@ -306,7 +306,7 @@ void syncAutoFillProfile(JNIEnv* env, jobject autoFillProfile, WebAutoFill* webA string16 country = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfileCountry); string16 phoneNumber = getStringFieldAsString16(env, autoFillProfile, gFieldIds->mAutoFillProfilePhoneNumber); - webAutoFill->setProfile(fullName, emailAddress, companyName, addressLine1, addressLine2, city, state, zipCode, country, phoneNumber); + webAutofill->setProfile(fullName, emailAddress, companyName, addressLine1, addressLine2, city, state, zipCode, country, phoneNumber); } #endif @@ -554,16 +554,16 @@ public: if (flag) { EditorClientAndroid* editorC = static_cast<EditorClientAndroid*>(pFrame->page()->editorClient()); - WebAutoFill* webAutoFill = editorC->getAutoFill(); - // Set the active AutoFillProfile data. + WebAutofill* webAutofill = editorC->getAutofill(); + // Set the active AutofillProfile data. jobject autoFillProfile = env->GetObjectField(obj, gFieldIds->mAutoFillProfile); if (autoFillProfile) - syncAutoFillProfile(env, autoFillProfile, webAutoFill); + syncAutoFillProfile(env, autoFillProfile, webAutofill); else { // The autofill profile is null. We need to tell Chromium about this because // this may be because the user just deleted their profile but left the // autofill feature setting enabled. - webAutoFill->clearProfiles(); + webAutofill->clearProfiles(); } } #endif diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 96045c6..966a540 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -117,7 +117,7 @@ #include "WebFrameView.h" #include "WindowsKeyboardCodes.h" #include "android_graphics.h" -#include "autofill/WebAutoFill.h" +#include "autofill/WebAutofill.h" #include "htmlediting.h" #include "markup.h" @@ -3279,7 +3279,7 @@ bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* node #if ENABLE(WEB_AUTOFILL) if (renderer->isTextField()) { EditorClientAndroid* editorC = static_cast<EditorClientAndroid*>(framePtr->page()->editorClient()); - WebAutoFill* autoFill = editorC->getAutoFill(); + WebAutofill* autoFill = editorC->getAutofill(); autoFill->formFieldFocused(static_cast<HTMLFormControlElement*>(focusNode)); } #endif @@ -4566,7 +4566,7 @@ static void AutoFillForm(JNIEnv* env, jobject obj, jint queryId) WebCore::Frame* frame = viewImpl->mainFrame(); if (frame) { EditorClientAndroid* editorC = static_cast<EditorClientAndroid*>(frame->page()->editorClient()); - WebAutoFill* autoFill = editorC->getAutoFill(); + WebAutofill* autoFill = editorC->getAutofill(); autoFill->fillFormFields(queryId); } #endif |