Changeset 64862 in webkit


Ignore:
Timestamp:
Aug 6, 2010 11:54:12 AM (14 years ago)
Author:
weinig@apple.com
Message:

Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
Unreviewed.

Patch by Jessie Berlin <jberlin@apple.com> on 2010-08-06

  • UIProcess/PageClient.h:
  • UIProcess/VisitedLinkProvider.h:
  • UIProcess/WebContextInjectedBundleClient.h:
  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebHistoryClient.h:
  • UIProcess/WebLoaderClient.h:
  • UIProcess/WebPolicyClient.h:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebUIClient.h:
  • UIProcess/win/WebView.h:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
  • WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
  • WebProcess/Plugins/NPRuntimeObjectMap.h:
  • WebProcess/Plugins/Netscape/NetscapePluginStream.h:
  • WebProcess/Plugins/PluginController.h:
  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebProcess.h:
Location:
trunk/WebKit2
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r64861 r64862  
    2323        * WebProcess/WebPage/WebPage.h:
    2424        * WebProcess/WebProcess.h:
     25
     262010-08-05  Sam Weinig  <sam@webkit.org>
     27
     28        Reviewed by Anders Carlsson.
     29
     30        Add form client for injected bundle code
     31        https://bugs.webkit.org/show_bug.cgi?id=43603
     32
     33        * WebKit2.xcodeproj/project.pbxproj:
     34        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
     35        (WKBundlePageSetFormClient):
     36        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
     37        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: Added.
     38        (WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient):
     39        (WebKit::InjectedBundlePageFormClient::initialize):
     40        (WebKit::InjectedBundlePageFormClient::textFieldDidBeginEditing):
     41        (WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
     42        (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
     43        (WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
     44        * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added.
     45        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
     46        (WebKit::WebEditorClient::textFieldDidBeginEditing):
     47        (WebKit::WebEditorClient::textFieldDidEndEditing):
     48        (WebKit::WebEditorClient::textDidChangeInTextField):
     49        (WebKit::WebEditorClient::textDidChangeInTextArea):
     50        * WebProcess/WebPage/WebPage.cpp:
     51        (WebKit::WebPage::initializeInjectedBundleFormClient):
     52        * WebProcess/WebPage/WebPage.h:
     53        (WebKit::WebPage::injectedBundleFormClient):
     54        * win/WebKit2.vcproj:
    2555
    26562010-08-05  Sam Weinig  <sam@webkit.org>
  • trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r64792 r64862  
    156156                BC14DF9E120B635F00826C0C /* WKBundleScriptWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14DF9C120B635F00826C0C /* WKBundleScriptWorld.cpp */; };
    157157                BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = BC14DF9D120B635F00826C0C /* WKBundleScriptWorld.h */; };
     158                BC14E109120B905E00826C0C /* InjectedBundlePageFormClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14E107120B905E00826C0C /* InjectedBundlePageFormClient.cpp */; };
     159                BC14E10A120B905E00826C0C /* InjectedBundlePageFormClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC14E108120B905E00826C0C /* InjectedBundlePageFormClient.h */; };
    158160                BC177465118B9FF4007D9E9A /* WKPagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BC177464118B9FF4007D9E9A /* WKPagePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    159161                BC17753F118BABF0007D9E9A /* GenericCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = BC17753E118BABF0007D9E9A /* GenericCallback.h */; };
     
    481483                BC14DF9C120B635F00826C0C /* WKBundleScriptWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleScriptWorld.cpp; sourceTree = "<group>"; };
    482484                BC14DF9D120B635F00826C0C /* WKBundleScriptWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleScriptWorld.h; sourceTree = "<group>"; };
     485                BC14E107120B905E00826C0C /* InjectedBundlePageFormClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageFormClient.cpp; sourceTree = "<group>"; };
     486                BC14E108120B905E00826C0C /* InjectedBundlePageFormClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageFormClient.h; sourceTree = "<group>"; };
    483487                BC177464118B9FF4007D9E9A /* WKPagePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPagePrivate.h; sourceTree = "<group>"; };
    484488                BC17753E118BABF0007D9E9A /* GenericCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericCallback.h; sourceTree = "<group>"; };
     
    11381142                                E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */,
    11391143                                E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */,
     1144                                BC14E107120B905E00826C0C /* InjectedBundlePageFormClient.cpp */,
     1145                                BC14E108120B905E00826C0C /* InjectedBundlePageFormClient.h */,
    11401146                                BCA8C6A611E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.cpp */,
    11411147                                BCA8C6A711E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h */,
     
    14331439                                BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */,
    14341440                                BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */,
     1441                                BC14E10A120B905E00826C0C /* InjectedBundlePageFormClient.h in Headers */,
    14351442                        );
    14361443                        runOnlyForDeploymentPostprocessing = 0;
     
    16471654                                BC14DF78120B5B7900826C0C /* InjectedBundleScriptWorld.cpp in Sources */,
    16481655                                BC14DF9E120B635F00826C0C /* WKBundleScriptWorld.cpp in Sources */,
     1656                                BC14E109120B905E00826C0C /* InjectedBundlePageFormClient.cpp in Sources */,
    16491657                        );
    16501658                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp

    r64485 r64862  
    4545}
    4646
     47void WKBundlePageSetFormClient(WKBundlePageRef pageRef, WKBundlePageFormClient* wkClient)
     48{
     49    if (wkClient && !wkClient->version)
     50        toWK(pageRef)->initializeInjectedBundleFormClient(wkClient);
     51}
     52
    4753void WKBundlePageSetLoaderClient(WKBundlePageRef pageRef, WKBundlePageLoaderClient* wkClient)
    4854{
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h

    r64253 r64862  
    9292
    9393// Editor client
    94 // FIXME: Objective-C API provides a WebView pointer in callbacks, what should the injected bundle API do?
    9594typedef bool (*WKBundlePageShouldBeginEditingCallback)(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo);
    9695typedef bool (*WKBundlePageShouldEndEditingCallback)(WKBundlePageRef page, WKBundleRangeRef range, const void* clientInfo);
     
    119118typedef struct WKBundlePageEditorClient WKBundlePageEditorClient;
    120119
     120// Form client
     121typedef void (*WKBundlePageTextFieldDidBeginEditingCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKBundleFrameRef frame, const void* clientInfo);
     122typedef void (*WKBundlePageTextFieldDidEndEditingCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKBundleFrameRef frame, const void* clientInfo);
     123typedef void (*WKBundlePageTextDidChangeInTextFieldCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKBundleFrameRef frame, const void* clientInfo);
     124typedef void (*WKBundlePageTextDidChangeInTextAreaCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlTextAreaElementHandle, WKBundleFrameRef frame, const void* clientInfo);
     125
     126struct WKBundlePageFormClient {
     127    int                                                                 version;
     128    const void *                                                        clientInfo;
     129    WKBundlePageTextFieldDidBeginEditingCallback                        textFieldDidBeginEditing;
     130    WKBundlePageTextFieldDidEndEditingCallback                          textFieldDidEndEditing;
     131    WKBundlePageTextDidChangeInTextFieldCallback                        textDidChangeInTextField;
     132    WKBundlePageTextDidChangeInTextAreaCallback                         textDidChangeInTextArea;
     133};
     134typedef struct WKBundlePageFormClient WKBundlePageFormClient;
     135
    121136WK_EXPORT WKTypeID WKBundlePageGetTypeID();
    122137
    123138WK_EXPORT void WKBundlePageSetEditorClient(WKBundlePageRef page, WKBundlePageEditorClient* client);
     139WK_EXPORT void WKBundlePageSetFormClient(WKBundlePageRef page, WKBundlePageFormClient* client);
    124140WK_EXPORT void WKBundlePageSetLoaderClient(WKBundlePageRef page, WKBundlePageLoaderClient* client);
    125141WK_EXPORT void WKBundlePageSetUIClient(WKBundlePageRef page, WKBundlePageUIClient* client);
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp

    r64020 r64862  
    2929#include "NotImplemented.h"
    3030
     31#include "WebFrameLoaderClient.h"
    3132#include "WebPage.h"
    32 
    3333#include <WebCore/EditCommand.h>
     34#include <WebCore/Frame.h>
     35#include <WebCore/HTMLInputElement.h>
     36#include <WebCore/HTMLNames.h>
     37#include <WebCore/HTMLTextAreaElement.h>
    3438#include <WebCore/KeyboardEvent.h>
     39#include <WebCore/UserTypingGestureIndicator.h>
    3540
    3641using namespace WebCore;
     42using namespace HTMLNames;
    3743
    3844namespace WebKit {
     
    239245}
    240246
    241 void WebEditorClient::textFieldDidBeginEditing(Element*)
    242 {
    243     notImplemented();
    244 }
    245 
    246 void WebEditorClient::textFieldDidEndEditing(Element*)
    247 {
    248     notImplemented();
    249 }
    250 
    251 void WebEditorClient::textDidChangeInTextField(Element*)
    252 {
    253     notImplemented();
     247void WebEditorClient::textFieldDidBeginEditing(Element* element)
     248{
     249    if (!element->hasTagName(inputTag))
     250        return;
     251
     252    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(element->document()->frame()->loader()->client())->webFrame();
     253    m_page->injectedBundleFormClient().textFieldDidBeginEditing(m_page, static_cast<HTMLInputElement*>(element), webFrame);
     254}
     255
     256void WebEditorClient::textFieldDidEndEditing(Element* element)
     257{
     258    if (!element->hasTagName(inputTag))
     259        return;
     260
     261    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(element->document()->frame()->loader()->client())->webFrame();
     262    m_page->injectedBundleFormClient().textFieldDidEndEditing(m_page, static_cast<HTMLInputElement*>(element), webFrame);
     263}
     264
     265void WebEditorClient::textDidChangeInTextField(Element* element)
     266{
     267    if (!element->hasTagName(inputTag))
     268        return;
     269
     270    if (!UserTypingGestureIndicator::processingUserTypingGesture() || UserTypingGestureIndicator::focusedElementAtGestureStart() != element)
     271        return;
     272
     273    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(element->document()->frame()->loader()->client())->webFrame();
     274    m_page->injectedBundleFormClient().textDidChangeInTextField(m_page, static_cast<HTMLInputElement*>(element), webFrame);
     275}
     276
     277void WebEditorClient::textDidChangeInTextArea(Element* element)
     278{
     279    if (!element->hasTagName(textareaTag))
     280        return;
     281
     282    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(element->document()->frame()->loader()->client())->webFrame();
     283    m_page->injectedBundleFormClient().textDidChangeInTextArea(m_page, static_cast<HTMLTextAreaElement*>(element), webFrame);
    254284}
    255285
     
    265295}
    266296
    267 void WebEditorClient::textDidChangeInTextArea(Element*)
    268 {
    269     notImplemented();
    270 }
    271297
    272298#if PLATFORM(MAC)
  • trunk/WebKit2/WebProcess/WebPage/WebPage.cpp

    r64594 r64862  
    142142}
    143143
     144void WebPage::initializeInjectedBundleFormClient(WKBundlePageFormClient* client)
     145{
     146    m_formClient.initialize(client);
     147}
     148
    144149void WebPage::initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient* client)
    145150{
     
    376381}
    377382
    378 
    379383void WebPage::keyEvent(const WebKeyboardEvent& keyboardEvent)
    380384{
  • trunk/WebKit2/WebProcess/WebPage/WebPage.h

    r64861 r64862  
    3030#include "DrawingArea.h"
    3131#include "InjectedBundlePageEditorClient.h"
     32#include "InjectedBundlePageFormClient.h"
    3233#include "InjectedBundlePageLoaderClient.h"
    3334#include "InjectedBundlePageUIClient.h"
     
    9798    // -- InjectedBundle methods
    9899    void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*);
     100    void initializeInjectedBundleFormClient(WKBundlePageFormClient*);
    99101    void initializeInjectedBundleLoaderClient(WKBundlePageLoaderClient*);
    100102    void initializeInjectedBundleUIClient(WKBundlePageUIClient*);
    101103
    102104    InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; }
     105    InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; }
    103106    InjectedBundlePageLoaderClient& injectedBundleLoaderClient() { return m_loaderClient; }
    104107    InjectedBundlePageUIClient& injectedBundleUIClient() { return m_uiClient; }
     
    156159
    157160    InjectedBundlePageEditorClient m_editorClient;
     161    InjectedBundlePageFormClient m_formClient;
    158162    InjectedBundlePageLoaderClient m_loaderClient;
    159163    InjectedBundlePageUIClient m_uiClient;
  • trunk/WebKit2/win/WebKit2.vcproj

    r64791 r64862  
    717717                                </File>
    718718                                <File
     719                                        RelativePath="..\WebProcess\InjectedBundle\InjectedBundlePageFormClient.cpp"
     720                                        >
     721                                </File>
     722                                <File
     723                                        RelativePath="..\WebProcess\InjectedBundle\InjectedBundlePageFormClient.h"
     724                                        >
     725                                </File>
     726                                <File
    719727                                        RelativePath="..\WebProcess\InjectedBundle\InjectedBundlePageLoaderClient.cpp"
    720728                                        >
Note: See TracChangeset for help on using the changeset viewer.