diff options
author | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-06-17 12:12:20 -0700 |
commit | 5f1ab04193ad0130ca8204aadaceae083aca9881 (patch) | |
tree | 5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebKit/android/WebCoreSupport | |
parent | 194315e5a908cc8ed67d597010544803eef1ac59 (diff) | |
download | external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2 |
Get WebKit r44544.
Diffstat (limited to 'WebKit/android/WebCoreSupport')
6 files changed, 37 insertions, 21 deletions
diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp index 6e97ae5..39bc004 100644 --- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp @@ -145,7 +145,7 @@ void ChromeClientAndroid::setResizable(bool) { notImplemented(); } // This function is called by the JavaScript bindings to print usually an error to // a message console. Pass the message to the java side so that the client can // handle it as it sees fit. -void ChromeClientAndroid::addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID) { +void ChromeClientAndroid::addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID) { android::WebViewCore::getWebViewCore(m_webFrame->page()->mainFrame()->view())->addMessageToConsole(message, lineNumber, sourceID); } @@ -168,7 +168,7 @@ void ChromeClientAndroid::closeWindowSoon() mainFrame->loader()->stopAllLoaders(); // Remove all event listeners so that no javascript can execute as a result // of mouse/keyboard events. - mainFrame->document()->removeAllEventListenersFromAllNodes(); + mainFrame->document()->removeAllEventListeners(); // Close the window. m_webFrame->closeWindow(android::WebViewCore::getWebViewCore(mainFrame->view())); } @@ -249,13 +249,16 @@ PlatformWidget ChromeClientAndroid::platformWindow() const { return viewBridge; } -// new to webkit4 (Feb 27, 2009) void ChromeClientAndroid::contentsSizeChanged(Frame*, const IntSize&) const { notImplemented(); } -// new to webkit4 (Feb 27, 2009) +void ChromeClientAndroid::scrollRectIntoView(const IntRect&, const ScrollView*) const +{ + notImplemented(); +} + void ChromeClientAndroid::formStateDidChange(const Node*) { notImplemented(); @@ -309,8 +312,13 @@ void ChromeClientAndroid::exceededDatabaseQuota(Frame* frame, const String& name } #endif -// new to change 38068 (Nov 6, 2008) +void ChromeClientAndroid::requestGeolocationPermissionForFrame(Frame*, Geolocation*) { notImplemented(); } void ChromeClientAndroid::runOpenPanel(Frame*, PassRefPtr<FileChooser>) { notImplemented(); } +bool ChromeClientAndroid::setCursor(PlatformCursorHandle) +{ + notImplemented(); + return false; +} void ChromeClientAndroid::wakeUpMainThreadWithNewQuota(long newQuota) { MutexLocker locker(m_quotaThreadLock); diff --git a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h index 00c45b9..966d5c7 100644 --- a/WebKit/android/WebCoreSupport/ChromeClientAndroid.h +++ b/WebKit/android/WebCoreSupport/ChromeClientAndroid.h @@ -77,7 +77,7 @@ namespace android { virtual void setResizable(bool); - virtual void addMessageToConsole(const String& message, unsigned int lineNumber, const String& sourceID); + virtual void addMessageToConsole(MessageSource, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID); virtual bool canRunBeforeUnloadConfirmPanel(); virtual bool runBeforeUnloadConfirmPanel(const String& message, Frame* frame); @@ -100,6 +100,7 @@ namespace android { virtual IntRect windowToScreen(const IntRect&) const; virtual PlatformWidget platformWindow() const; virtual void contentsSizeChanged(Frame*, const IntSize&) const; + virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const; // End methods used by HostWindow. virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned int); @@ -110,12 +111,16 @@ namespace android { #if ENABLE(DATABASE) virtual void exceededDatabaseQuota(Frame*, const String&); #endif + virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*); virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>); + virtual bool setCursor(PlatformCursorHandle); // Notification that the given form element has changed. This function // will be called frequently, so handling should be very fast. virtual void formStateDidChange(const Node*); + virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; } + // Android-specific void setWebFrame(android::WebFrame* webframe); void wakeUpMainThreadWithNewQuota(long newQuota); diff --git a/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp b/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp index 8629731..4918ee9 100644 --- a/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/EditorClientAndroid.cpp @@ -219,6 +219,7 @@ void EditorClientAndroid::getGuessesForWord(String const&, WTF::Vector<String>&) bool EditorClientAndroid::spellingUIIsShowing() { return false; } void EditorClientAndroid::checkGrammarOfString(unsigned short const*, int, WTF::Vector<GrammarDetail>&, int*, int*) {} void EditorClientAndroid::checkSpellingOfString(unsigned short const*, int, int*, int*) {} +String EditorClientAndroid::getAutoCorrectSuggestionForMisspelledWord(const String&) { return String(); } void EditorClientAndroid::textFieldDidEndEditing(Element*) {} void EditorClientAndroid::textDidChangeInTextArea(Element*) {} void EditorClientAndroid::textDidChangeInTextField(Element*) {} diff --git a/WebKit/android/WebCoreSupport/EditorClientAndroid.h b/WebKit/android/WebCoreSupport/EditorClientAndroid.h index 763b097..9697d66 100644 --- a/WebKit/android/WebCoreSupport/EditorClientAndroid.h +++ b/WebKit/android/WebCoreSupport/EditorClientAndroid.h @@ -94,6 +94,7 @@ public: virtual void ignoreWordInSpellDocument(const String&); virtual void learnWord(const String&); virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength); + virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWorld); virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength); virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail& detail); virtual void updateSpellingUIWithMisspelledWord(const String&); diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 274280e..0f0509d 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -191,6 +191,10 @@ bool FrameLoaderClientAndroid::dispatchDidLoadResourceFromMemoryCache(DocumentLo return false; } +void FrameLoaderClientAndroid::dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString&) { + return; +} + void FrameLoaderClientAndroid::dispatchDidHandleOnloadEvents() { } @@ -226,10 +230,12 @@ void FrameLoaderClientAndroid::dispatchDidReceiveIcon() { WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL( url, WebCore::IntSize(16, 16)); // If the request fails, try the original request url. - if (!icon) + if (!icon) { + DocumentLoader* docLoader = m_frame->loader()->activeDocumentLoader(); + KURL originalURL = docLoader->originalRequest().url(); icon = WebCore::iconDatabase()->iconForPageURL( - m_frame->loader()->originalRequestURL().string(), - WebCore::IntSize(16, 16)); + originalURL, WebCore::IntSize(16, 16)); + } // There is a bug in webkit where cancelling an icon load is treated as a // failure. When this is fixed, we can ASSERT again that we have an icon. if (icon) { @@ -746,8 +752,7 @@ void FrameLoaderClientAndroid::didFinishLoad() { } void FrameLoaderClientAndroid::prepareForDataSourceReplacement() { - ASSERT(m_frame); - m_frame->loader()->detachChildren(); + verifiedOk(); } PassRefPtr<DocumentLoader> FrameLoaderClientAndroid::createDocumentLoader( @@ -790,19 +795,16 @@ void FrameLoaderClientAndroid::transitionToCommittedForNewPage() { m_frame->setView(NULL); // Create a new FrameView and associate it with the saved webFrameView - FrameView* view = new FrameView(m_frame); - webFrameView->setView(view); + RefPtr<FrameView> view = FrameView::create(m_frame); + webFrameView->setView(view.get()); Release(webFrameView); // Give the new FrameView to the Frame m_frame->setView(view); - // Deref since FrameViews are created with a ref of 1 - view->deref(); - if (m_frame->ownerRenderer()) - m_frame->ownerRenderer()->setWidget(view); + m_frame->ownerRenderer()->setWidget(view.get()); m_frame->view()->initScrollbars(); @@ -834,15 +836,13 @@ WTF::PassRefPtr<WebCore::Frame> FrameLoaderClientAndroid::createFrame(const KURL parent->tree()->appendChild(newFrame); newFrame->tree()->setName(name); // Create a new FrameView and WebFrameView for the child frame to draw into. - FrameView* frameView = new WebCore::FrameView(newFrame); - WebFrameView* webFrameView = new WebFrameView(frameView, + RefPtr<FrameView> frameView = FrameView::create(newFrame); + WebFrameView* webFrameView = new WebFrameView(frameView.get(), WebViewCore::getWebViewCore(parent->view())); // frameView Retains webFrameView, so call Release for webFrameView Release(webFrameView); // Attach the frameView to the newFrame. newFrame->setView(frameView); - // setView() refs the frameView so call deref on the frameView - frameView->deref(); newFrame->init(); newFrame->selection()->setFocused(true); LOGV("::WebCore:: createSubFrame returning %p", newFrame); diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h index 2816c78..d491750 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.h @@ -71,6 +71,7 @@ namespace android { virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier); virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&); virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length); + virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const ScriptString&); virtual void dispatchDidHandleOnloadEvents(); virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); |