1. 09 Dec, 2010 2 commits
    • beidson@apple.com's avatar
      <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777 · 4b0f5936
      beidson@apple.com authored
      WebKit2 ContextMenuClient support
      
      Reviewed by Anders Carlsson.
      
      WebCore: 
      
      Export some symbols and headers needed by WebKit2 Mac:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      WebKit2: 
      
      Implement google search in a cross platform manner, and add a FIXME for download support:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      (WebKit::WebContextMenuClient::downloadURL):
      (WebKit::WebContextMenuClient::searchWithGoogle):
      
      Mac implementations for speaking and searching:
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: Added.
      (WebKit::WebContextMenuClient::lookUpInDictionary): Add a FIXME for now.
      (WebKit::WebContextMenuClient::isSpeaking):
      (WebKit::WebContextMenuClient::speak):
      (WebKit::WebContextMenuClient::stopSpeaking):
      (WebKit::WebContextMenuClient::searchWithSpotlight):
      
      Stubs for Win and Qt:
      * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Added.
      (WebKit::WebContextMenuClient::lookUpInDictionary):
      (WebKit::WebContextMenuClient::isSpeaking):
      (WebKit::WebContextMenuClient::speak):
      (WebKit::WebContextMenuClient::stopSpeaking):
      * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Added.
      (WebKit::WebContextMenuClient::lookUpInDictionary):
      (WebKit::WebContextMenuClient::isSpeaking):
      (WebKit::WebContextMenuClient::speak):
      (WebKit::WebContextMenuClient::stopSpeaking):
      
      Project file stuffs:
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b0f5936
    • beidson@apple.com's avatar
      <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191 · 67dc2b25
      beidson@apple.com authored
      WebKit2 Authentication Support
      
      Reviewed by Maciej Stachowiak.
      
      WebCore: 
      
      * WebCore.exp.in:
      
      WebKit2: 
      
      Implement authentication-related coders:
      * Shared/WebCoreArgumentCoders.h:
      
      Allow the ResourceResponse coders to handle null responses:
      * Shared/mac/WebCoreArgumentCodersMac.mm:
      (CoreIPC::encodeResourceResponse):
      (CoreIPC::decodeResourceResponse):
      
      Add new API and Impl casts for ProtectionSpace and Credential enums:
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toAPI):
      (WebKit::toCredentialPersistence):
      
      Move the DecisionListener to be accessed off the challenge itself, and fill in other
      necessary API:
      * UIProcess/API/C/WKAuthenticationChallenge.cpp:
      (WKAuthenticationChallengeGetDecisionListener):
      (WKAuthenticationChallengeGetProtectionSpace):
      (WKAuthenticationChallengeGetProposedCredential):
      (WKAuthenticationChallengeGetPreviousFailureCount):
      * UIProcess/API/C/WKAuthenticationChallenge.h:
      * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
      (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
      (WebKit::AuthenticationChallengeProxy::proposedCredential):
      (WebKit::AuthenticationChallengeProxy::protectionSpace):
      * UIProcess/Authentication/AuthenticationChallengeProxy.h:
      (WebKit::AuthenticationChallengeProxy::previousFailureCount):
      
      Fill in some credential API:
      * UIProcess/API/C/WKCredential.cpp:
      (WKCredentialCreate):
      (WKCredentialCopyUser):
      * UIProcess/API/C/WKCredential.h:
      * UIProcess/API/C/WKCredentialTypes.h: Added.
      * UIProcess/Authentication/WebCredential.cpp:
      (WebKit::WebCredential::WebCredential):
      (WebKit::WebCredential::user):
      * UIProcess/Authentication/WebCredential.h:
      (WebKit::WebCredential::create):
      
      Fill in some protection space API:
      * UIProcess/API/C/WKProtectionSpace.cpp:
      (WKProtectionSpaceCopyHost):
      (WKProtectionSpaceGetPort):
      (WKProtectionSpaceCopyRealm):
      (WKProtectionSpaceGetIsProxy):
      (WKProtectionSpaceGetServerType):
      (WKProtectionSpaceGetReceivesCredentialSecurely):
      (WKProtectionSpaceGetAuthenticationScheme):
      * UIProcess/API/C/WKProtectionSpace.h:
      * UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
      * UIProcess/Authentication/WebProtectionSpace.cpp:
      (WebKit::WebProtectionSpace::WebProtectionSpace):
      (WebKit::WebProtectionSpace::host):
      (WebKit::WebProtectionSpace::port):
      (WebKit::WebProtectionSpace::realm):
      (WebKit::WebProtectionSpace::isProxy):
      (WebKit::WebProtectionSpace::serverType):
      (WebKit::WebProtectionSpace::receivesCredentialSecurely):
      (WebKit::WebProtectionSpace::authenticationScheme):
      * UIProcess/Authentication/WebProtectionSpace.h:
      
      Change the authentication challenge callback to reflect the new ownership of
      the DecisionListener:
      * UIProcess/API/C/WKPage.h:
      * UIProcess/WebLoaderClient.cpp:
      (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67dc2b25
  2. 07 Dec, 2010 2 commits
  3. 06 Dec, 2010 1 commit
    • weinig@apple.com's avatar
      Generalize didChangeLocationWithinPageForFrame for all same document navigations · a7fa4376
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50584
      
      Reviewed by Anders Carlsson.
      
      WebKit2: 
      
        - Rename didChangeLocationWithinPageForFrame callbacks to didSameDocumentNavigationForFrame
        - Add WKSameDocumentNavigationType to didChangeLocationWithinPageForFrame.
        - Call didSameDocumentNavigationForFrame for HTML session state changes.
      
      * Shared/API/c/WKPageLoadTypes.h: Added.
      * Shared/API/c/WKSharedAPICast.h:
      (WebKit::toAPI):
      Moved WKFrameNavigationType here from WKPage.h and add WKSameDocumentNavigationType.
      
      * Shared/SameDocumentNavigationType.h: Added.
      * UIProcess/API/C/WKAPICast.h:
      Moved WKFrameNavigationType conversion from here.
      
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage):
      Update comment.
      
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::didSameDocumentNavigation):
      * UIProcess/WebFrameProxy.h:
      * UIProcess/WebLoaderClient.cpp:
      (WebKit::WebLoaderClient::didSameDocumentNavigationForFrame):
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
      (WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
      * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
      Pipe new name through.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
      (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
      (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
      (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
      Call didChangeLocationWithinPageForFrame for session state changes.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      Add new files.
      
      WebKitTools: 
      
      * MiniBrowser/mac/BrowserWindowController.m:
      (didSameDocumentNavigationForFrame):
      (-[BrowserWindowController awakeFromNib]):
      (-[BrowserWindowController didSameDocumentNavigationForFrame:]):
      * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp:
      (TestWebKitAPI::didSameDocumentNavigationForFrame):
      (TestWebKitAPI::TEST):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::InjectedBundlePage):
      (WTR::InjectedBundlePage::didSameDocumentNavigationForFrame):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::initialize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7fa4376
  4. 03 Dec, 2010 2 commits
    • beidson@apple.com's avatar
      Groundwork for <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191 · 18c0c1ad
      beidson@apple.com authored
      WebKit2 Authentication Support
      
      Reviewed by Anders Carlsson.
      
      WebCore: 
      
      * WebCore.exp.in:
      
      Expose the AuthenticationClient for WK2 platforms (Windows already does this):
      * platform/network/mac/AuthenticationChallenge.h:
      * platform/network/mac/AuthenticationMac.mm:
      (-[WebCoreAuthenticationClientAsChallengeSender client]):
      (WebCore::AuthenticationChallenge::authenticationClient):
      
      * platform/network/qt/AuthenticationChallenge.h:
      (WebCore::AuthenticationChallenge::authenticationClient):
      
      WebKit2: 
      
      With this patch in place, authentication challenges are sent up from WebCore and shipped over the IPC layer.
      Client apps can implement the related client methods to attempt to continue without credentials or cancel a
      challenge.
      
      There's not yet API to inspect a challenge or create a credential to use in reply - that will come later.
      
      Build-system changes:
      * DerivedSources.make:
      * DerivedSources.pro:
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Common.vsprops:
      
      Messages and casts for IPC and APIs:
      * Platform/CoreIPC/MessageID.h:
      * Shared/API/c/WKBase.h:
      * Shared/APIObject.h:
      * Shared/WebCoreArgumentCoders.h:
      * UIProcess/API/C/WKAPICast.h:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::didReceiveMessage):
      
      Stub out the AuthenticationChallenge class family:
      * UIProcess/API/C/WKAuthenticationChallenge.cpp: Added.
      (WKAuthenticationChallengeGetTypeID):
      * UIProcess/API/C/WKAuthenticationChallenge.h: Added.
      * UIProcess/API/C/WKCredential.cpp: Added.
      (WKCredentialGetTypeID):
      * UIProcess/API/C/WKCredential.h: Added.
      * UIProcess/API/C/WKProtectionSpace.cpp: Added.
      (WKProtectionSpaceGetTypeID):
      * UIProcess/API/C/WKProtectionSpace.h: Added.
      
      Add an Authentication listener for the client app to respond to:
      * UIProcess/API/C/WKAuthenticationDecisionListener.cpp: Added.
      (WKAuthenticationDecisionListenerGetTypeID):
      (WKAuthenticationDecisionListenerUseCredential):
      (WKAuthenticationDecisionListenerCancel):
      * UIProcess/API/C/WKAuthenticationDecisionListener.h: Added.
      
      Add Authentication related methods to the page loader client:
      * UIProcess/API/C/WKPage.h:
      
      Add empty implementations of the new API objects:
      * UIProcess/Authentication: Added.
      * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: Added.
      (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
      (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
      (WebKit::AuthenticationChallengeProxy::useCredential):
      (WebKit::AuthenticationChallengeProxy::cancel):
      * UIProcess/Authentication/AuthenticationChallengeProxy.h: Added.
      (WebKit::AuthenticationChallengeProxy::create):
      (WebKit::AuthenticationChallengeProxy::listener):
      (WebKit::AuthenticationChallengeProxy::type):
      
      * UIProcess/Authentication/WebCredential.cpp: Added.
      (WebKit::WebCredential::core):
      * UIProcess/Authentication/WebCredential.h: Added.
      (WebKit::WebCredential::create):
      (WebKit::WebCredential::type):
      * UIProcess/Authentication/WebProtectionSpace.cpp: Added.
      (WebKit::WebProtectionSpace::WebProtectionSpace):
      * UIProcess/Authentication/WebProtectionSpace.h: Added.
      (WebKit::WebProtectionSpace::create):
      (WebKit::WebProtectionSpace::type):
      
      Add implementation of the Authentication decision listener:
      * UIProcess/Authentication/AuthenticationDecisionListener.cpp: Added.
      (WebKit::AuthenticationDecisionListener::AuthenticationDecisionListener):
      (WebKit::AuthenticationDecisionListener::useCredential):
      (WebKit::AuthenticationDecisionListener::cancel):
      (WebKit::AuthenticationDecisionListener::detachChallenge):
      * UIProcess/Authentication/AuthenticationDecisionListener.h: Added.
      (WebKit::AuthenticationDecisionListener::create):
      (WebKit::AuthenticationDecisionListener::type):
      
      WebPage and PageLoaderClient glue:
      * UIProcess/WebLoaderClient.cpp:
      (WebKit::WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
      (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
      (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      
      Add a manager to map the actual platform authentication challenges to a challenge ID,
      as at least some platforms require the object identity to persist:
      * WebProcess/Authentication: Added.
      * WebProcess/Authentication/AuthenticationManager.cpp: Added.
      (WebKit::generateAuthenticationChallengeID):
      (WebKit::AuthenticationManager::shared):
      (WebKit::AuthenticationManager::AuthenticationManager):
      (WebKit::AuthenticationManager::didReceiveMessage):
      (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
      (WebKit::AuthenticationManager::useCredentialForChallenge):
      (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
      (WebKit::AuthenticationManager::cancelChallenge):
      * WebProcess/Authentication/AuthenticationManager.h: Added.
      * WebProcess/Authentication/AuthenticationManager.messages.in: Added.
      
      Hand off Authentication challenges to the manager to be sent over IPC:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
      (WebKit::WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace):
      
      * UIProcess/API/qt/qwkpage.cpp:
      
      WebKitTools: 
      
      Keep these builds working:
      * MiniBrowser/mac/BrowserWindowController.m:
      (-[BrowserWindowController awakeFromNib]):
      
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::initialize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18c0c1ad
    • jberlin@webkit.org's avatar
      Need a WebKit2 Equivalent of WebSecurityOrigin · b6d662bc
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=50170
      
      Reviewed by Sam Weinig.
      
      WebCore: 
      
      * WebCore.exp.in:
      Export the symbol for SecurityOrigin::createFromDatabaseIdentifier.
      
      WebKit2: 
      
      * Shared/API/c/WKBase.h:
      Add the WKSecurityOriginRef typedef.
      
      * Shared/APIObject.h:
      Add the SecurityOrigin type as a Shared type.
      
      * Shared/API/c/WKSharedAPICast.h::
      Add the mapping between WKSecurityOriginRef and WebSecurityOrigin.
      
      * UIProcess/API/C/WKSecurityOrigin.cpp: Added.
      (WKSecurityOriginGetTypeID):
      (WKSecurityOriginCreate):
      (WKSecurityOriginGetProtocol):
      (WKSecurityOriginGetHost):
      (WKSecurityOriginGetPort):
      * UIProcess/API/C/WKSecurityOrigin.h: Added.
      
      * UIProcess/WebSecurityOrigin.h: Added.
      (WebKit::WebSecurityOrigin::create):
      Create based on the database identifier, which contains the protocol, host and port.
      (WebKit::WebSecurityOrigin::protocol):
      (WebKit::WebSecurityOrigin::host):
      (WebKit::WebSecurityOrigin::port):
      (WebKit::WebSecurityOrigin::databaseIdentifier):
      (WebKit::WebSecurityOrigin::WebSecurityOrigin):
      (WebKit::WebSecurityOrigin::type):
      
      * WebKit2.pro:
      Add WKSecurityOrigin.cpp/.h.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add the WebSecurityOrigin.h and WKSecurityOrigin.cpp/.h.
      
      * win/WebKit2Generated.make:
      Make sure WKSecurityOrigin.h file gets copied over to the WebKitBuild directory on Windows.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6d662bc
  5. 02 Dec, 2010 1 commit
    • weinig@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=50368 · df25d143
      weinig@apple.com authored
      Overhaul WebKit2 preferences code
      
      Reviewed by Anders Carlsson.
      
      - Reduces the number of places you have to touch to add a new preference
        (From 9 down to 4, but with a bit of elbow grease, we should get that
         down to 2 or 3).
      - Add hooks so that platforms can initialize the preferences based on an
        identifier. This is currently only used on the Mac to initialize a
        preference store from NSUserDefaults and autosave the changes to disk.
        It is not yet enabled due to no way to set the identifier from client
        code.
      
      * Shared/WebPageCreationParameters.cpp:
      Add necessary #include of WebCoreArgumentCoders.h which is now needed
      due to cleanup in WebPreferencesStore.h.
      
      * Shared/WebPreferencesStore.cpp:
      (WebKit::WebPreferencesStore::WebPreferencesStore):
      (WebKit::WebPreferencesStore::encode):
      (WebKit::WebPreferencesStore::decode):
      (WebKit::defaultValueForKey):
      (WebKit::setValueForKey):
      (WebKit::valueForKey):
      (WebKit::WebPreferencesStore::setStringValueForKey):
      (WebKit::WebPreferencesStore::getStringValueForKey):
      (WebKit::WebPreferencesStore::setBoolValueForKey):
      (WebKit::WebPreferencesStore::getBoolValueForKey):
      (WebKit::WebPreferencesStore::setUInt32ValueForKey):
      (WebKit::WebPreferencesStore::getUInt32ValueForKey):
      * Shared/WebPreferencesStore.h:
      Complete overhaul of this class to store the preferences as
      a set of HashMaps and use macros to define the keys and default
      values.
      
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesGetFontSmoothingLevel):
      Add cast to keep conversion function working.
      
      * UIProcess/WebPreferences.cpp:
      (WebKit::WebPreferences::WebPreferences): Add identifier constructor.
      (WebKit::WebPreferences::updateStringValueForKey):
      (WebKit::WebPreferences::updateBoolValueForKey):
      (WebKit::WebPreferences::updateUInt32ValueForKey):
      Add type based updaters. These currently give hooks to the platform and
      call the generic update, but in the future, we can use this to optimize
      updating preferences to not send the entire store for each change.
      
      * UIProcess/WebPreferences.h:
      Generate the getters and setters via macro instantiation.
      
      * UIProcess/cf/WebPreferencesCF.cpp: Added.
      (WebKit::WebPreferences::platformInitializeStore):
      (WebKit::WebPreferences::platformUpdateStringValueForKey):
      (WebKit::WebPreferences::platformUpdateBoolValueForKey):
      (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
      Stubbed out.
      
      * UIProcess/mac/WebPreferencesMac.mm: Added.
      (WebKit::makeKey):
      (WebKit::setStringValueIfInUserDefaults):
      (WebKit::setBoolValueIfInUserDefaults):
      (WebKit::setUInt32ValueIfInUserDefaults):
      (WebKit::WebPreferences::platformInitializeStore):
      (WebKit::WebPreferences::platformUpdateStringValueForKey):
      (WebKit::WebPreferences::platformUpdateBoolValueForKey):
      (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
      Use the platform hooks to initialize and update the store from
      NSUserDefaults.
              
      * UIProcess/qt/WebPreferencesQt.cpp: Added.
      (WebKit::WebPreferences::platformInitializeStore):
      (WebKit::WebPreferences::platformUpdateStringValueForKey):
      (WebKit::WebPreferences::platformUpdateBoolValueForKey):
      (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
      Stubbed out.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      * WebProcess/WebPage/win/WebPageWin.cpp:
      (WebKit::WebPage::platformPreferencesDidChange):
      Update to pull the value using the new type based getters.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df25d143
  6. 01 Dec, 2010 1 commit
    • weinig@apple.com's avatar
      Add PageGrouping to WebKit2 API · 40a04ca9
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50332
      
      Reviewed by Anders Carlsson.
      
      WebKit2: 
      
      - Adds WKPageGroupRef and WKBundlePageGroupRef API objects
        (backed by WebPageGroup and WebPageGroupProxy respectively).
      - Moves visibleToInjectedBundle from page to PageGroup.
      - Make userScript/userStyleSheet functions take a page group parameter.
      
      * Shared/API/c/WKBase.h:
      * Shared/APIObject.h:
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
      * Shared/WebPageGroupData.cpp: Added.
      (WebKit::WebPageGroupData::encode):
      (WebKit::WebPageGroupData::decode):
      * Shared/WebPageGroupData.h: Added.
      * UIProcess/API/C/WKAPICast.h:
      * UIProcess/API/C/WKPage.cpp:
      (WKPageGetPageGroup):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/C/WKPageGroup.cpp: Added.
      (WKPageGroupGetTypeID):
      (WKPageGroupCreateWithIdentifier):
      (WKPageGroupCopyIdentifier):
      * UIProcess/API/C/WKPageGroup.h: Added.
      * UIProcess/API/C/WebKit2.h:
      * UIProcess/API/C/win/WKView.cpp:
      (WKViewCreate):
      * UIProcess/API/C/win/WKView.h:
      * UIProcess/API/mac/WKView.h:
      * UIProcess/API/mac/WKView.mm:
      (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]):
      (-[WKView initWithFrame:pageNamespaceRef:]):
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPagePrivate::QWKPagePrivate):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::createWebPage):
      * UIProcess/WebContext.h:
      * UIProcess/WebContextUserMessageCoders.h:
      (WebKit::WebContextUserMessageEncoder::encode):
      (WebKit::WebContextUserMessageDecoder::decode):
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::inspectorPageGroup):
      * UIProcess/WebInspectorProxy.h:
      * UIProcess/WebPageGroup.cpp: Added.
      (WebKit::generatePageGroupID):
      (WebKit::webPageGroupMap):
      (WebKit::WebPageGroup::create):
      (WebKit::WebPageGroup::get):
      (WebKit::WebPageGroup::WebPageGroup):
      (WebKit::WebPageGroup::~WebPageGroup):
      * UIProcess/WebPageGroup.h: Added.
      (WebKit::WebPageGroup::identifier):
      (WebKit::WebPageGroup::pageGroupID):
      (WebKit::WebPageGroup::data):
      (WebKit::WebPageGroup::type):
      * UIProcess/WebPageNamespace.cpp:
      (WebKit::WebPageNamespace::createWebPage):
      * UIProcess/WebPageNamespace.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::create):
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::creationParameters):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::pageGroup):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::createWebPage):
      * UIProcess/WebProcessProxy.h:
      * UIProcess/mac/WebInspectorProxyMac.mm:
      (WebKit::WebInspectorProxy::platformCreateInspectorPage):
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::WebView):
      * UIProcess/win/WebView.h:
      (WebKit::WebView::create):
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
      (WKBundleAddUserScript):
      (WKBundleAddUserStyleSheet):
      (WKBundleRemoveUserScript):
      (WKBundleRemoveUserStyleSheet):
      (WKBundleRemoveUserScripts):
      (WKBundleRemoveUserStyleSheets):
      (WKBundleRemoveAllUserContent):
      (WKBundleOverrideXSSAuditorEnabledForTestRunner):
      * WebProcess/InjectedBundle/API/c/WKBundle.h:
      * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      (WKBundlePageGetPageGroup):
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp: Added.
      (WKBundlePageGroupGetTypeID):
      (WKBundlePageGroupCopyIdentifier):
      * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.h: Added.
      * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
      (WebKit::InjectedBundle::addUserScript):
      (WebKit::InjectedBundle::addUserStyleSheet):
      (WebKit::InjectedBundle::removeUserScript):
      (WebKit::InjectedBundle::removeUserStyleSheet):
      (WebKit::InjectedBundle::removeUserScripts):
      (WebKit::InjectedBundle::removeUserStyleSheets):
      (WebKit::InjectedBundle::removeAllUserContent):
      (WebKit::InjectedBundle::didInitializePageGroup):
      * WebProcess/InjectedBundle/InjectedBundle.h:
      * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
      (WebKit::InjectedBundleClient::didInitializePageGroup):
      * WebProcess/InjectedBundle/InjectedBundleClient.h:
      * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
      (WebKit::InjectedBundleUserMessageEncoder::encode):
      (WebKit::InjectedBundleUserMessageDecoder::decode):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::create):
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::close):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::pageGroup):
      * WebProcess/WebPage/WebPageGroupProxy.cpp: Added.
      (WebKit::WebPageGroupProxy::create):
      (WebKit::WebPageGroupProxy::~WebPageGroupProxy):
      * WebProcess/WebPage/WebPageGroupProxy.h: Added.
      (WebKit::WebPageGroupProxy::identifier):
      (WebKit::WebPageGroupProxy::pageGroupID):
      (WebKit::WebPageGroupProxy::isVisibleToInjectedBundle):
      (WebKit::WebPageGroupProxy::WebPageGroupProxy):
      (WebKit::WebPageGroupProxy::type):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::webPageGroup):
      * WebProcess/WebProcess.h:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      
      WebKitTools: 
      
      - Update testing harnesses to deal with new PageGroup API.
      
      * MiniBrowser/mac/WebBundle/WebBundleMain.m:
      (WKBundleInitialize):
      * TestWebKitAPI/InjectedBundleController.cpp:
      (TestWebKitAPI::InjectedBundleController::initialize):
      (TestWebKitAPI::InjectedBundleController::didInitializePageGroup):
      (TestWebKitAPI::InjectedBundleController::initializeTestNamed):
      * TestWebKitAPI/InjectedBundleController.h:
      * TestWebKitAPI/InjectedBundleTest.h:
      (TestWebKitAPI::InjectedBundleTest::initialize):
      (TestWebKitAPI::InjectedBundleTest::didInitializePageGroup):
      * TestWebKitAPI/PlatformUtilities.cpp:
      (TestWebKitAPI::Util::createContextForInjectedBundleTest):
      * TestWebKitAPI/PlatformUtilities.h:
      * TestWebKitAPI/PlatformWebView.h:
      * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp:
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp:
      (TestWebKitAPI::DocumentStartUserScriptAlertCrashTest::initialize):
      * TestWebKitAPI/mac/PlatformWebViewMac.mm:
      (TestWebKitAPI::PlatformWebView::PlatformWebView):
      * TestWebKitAPI/win/PlatformWebViewWin.cpp:
      (TestWebKitAPI::PlatformWebView::PlatformWebView):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::didInitializePageGroup):
      (WTR::InjectedBundle::initialize):
      (WTR::InjectedBundle::beginTesting):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (WTR::InjectedBundle::pageGroup):
      * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
      (WTR::LayoutTestController::addUserScript):
      (WTR::LayoutTestController::addUserStyleSheet):
      (WTR::LayoutTestController::setXSSAuditorEnabled):
      * WebKitTestRunner/TestController.cpp:
      * WebKitTestRunner/win/PlatformWebViewWin.cpp:
      (WTR::PlatformWebView::PlatformWebView):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40a04ca9
  7. 29 Nov, 2010 2 commits
    • mitz@apple.com's avatar
      JavaScriptCore: WTF support for <rdar://problem/8650085> adding word-prefix... · 7258a696
      mitz@apple.com authored
      JavaScriptCore: WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
      https://bugs.webkit.org/show_bug.cgi?id=50038
      
      Reviewed by Darin Adler.
      
      * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
      
      WebCore: WebCore part of <rdar://problem/8650085> adding word-prefix search options to the text search API.
      https://bugs.webkit.org/show_bug.cgi?id=50038
      
      Reviewed by Darin Adler.
      
      Test: editing/text-iterator/findString.html
      
      * GNUmakefile.am: Added FindOptions.h.
      * WebCore.exp.in: Export the new methods that take FindOptions.
      * WebCore.gypi: Added FindOptions.h.
      * WebCore.pro: Added FindOptions.h and TextBoundaries.{cpp,h}.
      * WebCore.vcproj/WebCore.vcproj: Added FindOptions.h.
      * WebCore.xcodeproj/project.pbxproj: Added FindOptions.h and TextBoundaries.cpp.
      * editing/Editor.cpp:
      (WebCore::Editor::firstVisibleRange): Changed to use FindOptions.
      (WebCore::Editor::lastVisibleRange): Ditto.
      (WebCore::Editor::nextVisibleRange): Ditto.
      (WebCore::Editor::findString): Ditto.
      (WebCore::Editor::countMatchesForText): Ditto.
      * editing/Editor.h: Added a version of findString() that takes FindOptions. Changed
      countMatchesForText() to take FindOptions. Made nextVisibleRange() private and changed it
      and firstVisibleRange() and lastVisibleRange() to take FindOptions.
      * editing/FindOptions.h: Added.
      * editing/TextIterator.cpp:
      Augmented SearchBuffer with an optional prefix, which is not searched, but provides context
      for determining word boundaries.
      (WebCore::isSeparator): Added. Identifies a class of characters used to determine where
      “words” are embedded in a word.
      (WebCore::SearchBuffer::SearchBuffer): Changed to take FindOptions. Added initialization of
      m_options, m_prefixLength and m_needsMoreContext.
      (WebCore::SearchBuffer::append): Adjust m_prefixLength as part of the prefix gets pushed out
      of the buffer.
      (WebCore::SearchBuffer::needsMoreContext): Added.
      (WebCore::SearchBuffer::prependContext): Added.
      (WebCore::SearchBuffer::isWordStartMatch): Added.
      (WebCore::SearchBuffer::search): Changed to account for the context prefix. When searching
      only for word prefix matches, maintains enough context before a tentative match when moving
      it to the beginning of the buffer. Reject matches that are not at word starts if requested.
      Adjust m_prefixLength when pushing characters out of the buffer.
      (WebCore::findPlainText): Changed to work with FindOptions. Feed the search buffer with context
      if and as long as it requires more of it.
      * editing/TextIterator.h: Added a version of findPlainText() that takes FindOptions.
      * editing/visible_units.cpp: Moved {end,start}Of{First,Last}WordBoundary to TextBoundaries.cpp.
      * page/Page.cpp:
      (WebCore::Page::findString): Changed to work with FindOptions.
      (WebCore::Page::markAllMatchesForText): Ditto.
      * page/Page.h: Added FindOptions-based findString() and markAllMatchesForText().
      * platform/text/TextBoundaries.cpp:
      (WebCore::endOfFirstWordBoundaryContext): Moved here from visible_units.cpp.
      (WebCore::startOfLastWordBoundaryContext): Ditto.
      * platform/text/TextBoundaries.h:
      
      WebKit/mac: WebKit Mac part of <rdar://problem/8650085> adding word-prefix search options to the text search API.
      https://bugs.webkit.org/show_bug.cgi?id=50038
      Based on a patch from Darin Adler.
      
      Reviewed by Darin Adler.
      
      * WebView/WebDocumentInternal.h: Removed -markAllMatchesForText:caseSensitive:limit: and
      replaced -countMatchesForText:caseSensitive:limit:markMatches: with a WebFindOptions-based
      method. Declared a WebDocumentOptionsSearching protocol with a new -findString:options:
      method. Made WebHTMLView conform to the new protocol.
      * WebView/WebHTMLView.mm:
      (coreOptions): Added. Converts WebFindOptions to WebCore FindOptions.
      (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Changed to use
      -findString:options:.
      (-[WebHTMLView countMatchesForText:options:limit:markMatches:]): Changed to use WebFindOptions.
      (-[WebHTMLView findString:options:]): Added. Calls through to WebCore::Editor::findString().
      * WebView/WebPDFView.mm:
      (-[WebPDFView countMatchesForText:options:limit:markMatches:]): Changed to use WebFindOptions.
      * WebView/WebView.mm:
      (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]): Now calls through to
      -countMatchesForText:options:highlight:limit:markMatches.
      (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]): Ditto.
      (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]): Now calls through to
      -findString:options:.
      (incrementFrame): Changed to use WebFindOptions.
      (findString): Added this helper method that performs the search using the best supported
      method for the document view.
      (-[WebView findString:options:]): Changed -searchFor::::: into this.
      (-[WebView canMarkAllTextMatches]):
      (-[WebView countMatchesForText:options:highlight:limit:markMatches:]): Updated to use
      WebFindOptions.
      (-[WebView unmarkAllTextMatches]): Updated for change to incrementFrame.
      (-[WebView rectsForTextMatches]): Ditto.
      * WebView/WebViewPrivate.h: Added WebFindOptions, -findString:options:, and WebFindOptions version
      of countMatchesForText:.
      
      WebKit2: WebKit2 part of <rdar://problem/8650085> adding word-prefix search options to the text search API.
      https://bugs.webkit.org/show_bug.cgi?id=50038
      Based on a patch from Darin Adler.
      
      Reviewed by Darin Adler.
      
      * Shared/WebFindOptions.h: Renamed FindOptions.h to this to account for WebCore’s new private
      FindOptions.h. Added and reordered FindOptions and rolled FindDirection into FindOptions.
      * UIProcess/API/C/WKAPICast.h: Removed toFindDirection().
      (WebKit::toFindOptions): Updated for new values.
      * UIProcess/API/C/WKPage.cpp:
      (WKPageFindString): Removed separate WKFindDirection.
      (WKPageCountStringMatches): Replaces caseInsensitive boolean with WKFindOptions.
      * UIProcess/API/C/WKPage.h: Removed WKFindDirection and updated WKFindOptions.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::findString): Removed separate FindDirection.
      (WebKit::WebPageProxy::countStringMatches): Replaced caseInsensitive boolean with FindOptions.
      * UIProcess/WebPageProxy.h:
      * WebKit2.xcodeproj/project.pbxproj: Updated for the header rename.
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::core): Added. Converts WebKit2 FindOptions to WebCore FindOptions.
      (WebKit::FindController::countStringMatches): Changed to use FindOptions.
      (WebKit::FindController::findString): Ditto.
      * WebProcess/WebPage/FindController.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::findString): Ditto.
      (WebKit::WebPage::countStringMatches): Ditto.
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in: Ditto.
      
      WebKitTools: DumpRenderTree changes for testing the text search API.
      https://bugs.webkit.org/show_bug.cgi?id=50038
      
      Reviewed by Darin Adler.
      
      * DumpRenderTree/LayoutTestController.cpp:
      (findStringCallback):
      (LayoutTestController::staticFunctions):
      * DumpRenderTree/LayoutTestController.h:
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::findString):
      * MiniBrowser/mac/BrowserWindowController.m:
      (-[BrowserWindowController find:]):
      
      LayoutTests: Added text search tests, in particular testing word-prefix search.
      https://bugs.webkit.org/show_bug.cgi?id=50038
      
      Reviewed by Darin Adler.
      
      * editing/text-iterator/findString-expected.txt: Added.
      * editing/text-iterator/findString.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7258a696
    • laszlo.1.gombos@nokia.com's avatar
      2010-11-29 Laszlo Gombos <laszlo.1.gombos@nokia.com> · e3841fc1
      laszlo.1.gombos@nokia.com authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] Allow pre-generation for package builds for WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=50139
      
              Use a build variable for the generated directory path and set the
              value based on CONFIG just like for WebKit1.
      
              For non-package builds use a relative base path for the
              genrated directory just like for WebKit1.
      
              * DerivedSources.pro:
              * WebKit2.pro:
      2010-11-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] Allow pre-generation for package builds for WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=50139
      
              Use a build variable for the generated directory path and set the
              value based on CONFIG just like for WebKit1.
      
              For non-package builds use a relative base path for the
              genrated directory just like for WebKit1.
      
              * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
              * WebKitTestRunner/qt/WebKitTestRunner.pro:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3841fc1
  8. 16 Nov, 2010 2 commits
    • weinig@apple.com's avatar
      WebKit2: Support enabling site-specific quirks · e3220628
      weinig@apple.com authored
      <rdar://problem/8451371>
      https://bugs.webkit.org/show_bug.cgi?id=46076
      
      Reviewed by Adam Roben.
      
      * Shared/WebPreferencesStore.cpp:
      (WebKit::WebPreferencesStore::WebPreferencesStore):
      (WebKit::WebPreferencesStore::encode):
      (WebKit::WebPreferencesStore::decode):
      * Shared/WebPreferencesStore.h:
      Add needsSiteSpecificQuirks;
      
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toFontSmoothingLevel):
      (WebKit::toAPI):
      Move FontSmoothing conversion functions here.
      
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetFontSmoothingLevel):
      (WKPreferencesGetFontSmoothingLevel):
      (WKPreferencesSetAcceleratedCompositingEnabled):
      (WKPreferencesGetAcceleratedCompositingEnabled):
      (WKPreferencesSetCompositingBordersVisible):
      (WKPreferencesGetCompositingBordersVisible):
      (WKPreferencesSetCompositingRepaintCountersVisible):
      (WKPreferencesGetCompositingRepaintCountersVisible):
      (WKPreferencesSetNeedsSiteSpecificQuirks):
      (WKPreferencesGetNeedsSiteSpecificQuirks):
      Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks
      and move implementations from WKPreferencesPrivate.cpp here.
      
      * UIProcess/API/C/WKPreferencesPrivate.cpp: Removed.
      
      * UIProcess/API/C/WKPreferencesPrivate.h:
      Add Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks.
      
      * UIProcess/WebPreferences.cpp:
      (WebKit::WebPreferences::setNeedsSiteSpecificQuirks):
      (WebKit::WebPreferences::needsSiteSpecificQuirks):
      * UIProcess/WebPreferences.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      Pipe through needsSiteSpecificQuirks.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebKit2.pro:
      * win/WebKit2.vcproj:
      Update for removed files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3220628
    • hausmann@webkit.org's avatar
      [Qt] Trivial build fix for building WebKit2 inside Qt Creator · dcb0f430
      hausmann@webkit.org authored
      Rubber-stamped by Andreas Kling.
      
      Similar to WebCore.pro, define a fallback for OUTPUT_DIR.
      
      * WebKit2.pro:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dcb0f430
  9. 15 Nov, 2010 2 commits
    • beidson@apple.com's avatar
      Finish off <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720 · 0cc69dcd
      beidson@apple.com authored
      Customizable context menu support in WebKit2.
      
      Reviewed by Sam Weinig.
      
      - Adds an API-level WKContextMenuItem.
      - Round trips through both the InjectedBundle client and the new PageContextMenuClient before
        actually displaying the menu.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      
      * Shared/API/c/WKBase.h:
      * Shared/API/c/WKContextMenuItem.cpp: Added.
      (WKContextMenuItemGetTypeID):
      (WKContextMenuItemCreateAsAction):
      (WKContextMenuItemCreateAsCheckableAction):
      (WKContextMenuItemCreateAsSubmenu):
      (WKContextMenuItemSeparatorItem):
      (WKContextMenuItemGetTag):
      (WKContextMenuItemGetType):
      (WKContextMenuItemCopyTitle):
      (WKContextMenuItemGetEnabled):
      (WKContextMenuItemGetChecked):
      (WKContextMenuCopySubmenuItems):
      * Shared/API/c/WKContextMenuItem.h: Added.
      * Shared/API/c/WKContextMenuItemTypes.h: Added.
      
      * Shared/API/c/WKSharedAPICast.h:
      (WebKit::toAPI):
      (WebKit::toImpl):
      
      * Shared/WebContextMenuItem.cpp:
      (WebKit::WebContextMenuItem::create):
      (WebKit::WebContextMenuItem::separatorItem):
      (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
      * Shared/WebContextMenuItem.h:
      
      * UIProcess/API/C/WKPage.cpp:
      (WKPageSetPageContextMenuClient):
      (WKPageSetPageFindClient):
      (WKPageSetPageLoaderClient):
      (WKPageSetPagePolicyClient):
      (WKPageSetPageUIClient):
      * UIProcess/API/C/WKPage.h:
      
      * UIProcess/WebPageContextMenuClient.cpp: Added.
      (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
      * UIProcess/WebPageContextMenuClient.h: Added.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::initializeContextMenuClient):
      (WebKit::WebPageProxy::showContextMenu):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
      (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
      * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
      
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems):
      * WebProcess/WebPage/WebContextMenu.cpp:
      (WebKit::WebContextMenu::show):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0cc69dcd
    • andreas.kling@nokia.com's avatar
      2010-11-15 Andreas Kling <andreas.kling@nokia.com> · 8be26126
      andreas.kling@nokia.com authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [WK2][Qt] WebKit2 implementation of tiled backing store
              https://bugs.webkit.org/show_bug.cgi?id=49526
      
              Basic opt-in tiling implementation for WebKit2/Qt.
      
              Original patch by Antti Koivisto.
      
              * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
              New messages: RequestTileUpdate and CancelTileUpdate.
      
              * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
              New messages: Invalidate, TileUpdated, AllTileUpdatesProcessed.
      
              * Shared/DrawingAreaBase.h:
              New area type: TiledDrawingAreaType.
      
              * UIProcess/API/qt/qgraphicswkview.h:
              * UIProcess/API/qt/qgraphicswkview.cpp:
              (QGraphicsWKView::QGraphicsWKView):
              (QGraphicsWKView::setGeometry):
              (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
              (QGraphicsWKView::prepareScaleChange):
              (QGraphicsWKView::commitScaleChange):
              (QGraphicsWKViewPrivate::onScaleChanged):
              (QGraphicsWKViewPrivate::commitScale):
              Support for tiled backing store.
      
              * UIProcess/TiledDrawingAreaProxy.cpp: Added.
              (WebKit::TiledDrawingAreaProxy::create):
              (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
              (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
              (WebKit::TiledDrawingAreaProxy::setSize):
              (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
              (WebKit::TiledDrawingAreaProxy::didSetSize):
              (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
              (WebKit::TiledDrawingAreaProxy::didReceiveSyncMessage):
              (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
              (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
              (WebKit::TiledDrawingAreaProxy::createTile):
              (WebKit::TiledDrawingAreaProxy::setTileSize):
              (WebKit::TiledDrawingAreaProxy::setTileCreationDelay):
              (WebKit::TiledDrawingAreaProxy::setKeepAndCoverAreaMultipliers):
              (WebKit::TiledDrawingAreaProxy::invalidate):
              (WebKit::TiledDrawingAreaProxy::updateTileBuffers):
              (WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete):
              (WebKit::TiledDrawingAreaProxy::paint):
              (WebKit::TiledDrawingAreaProxy::adjustVisibleRect):
              (WebKit::TiledDrawingAreaProxy::setContentsScale):
              (WebKit::TiledDrawingAreaProxy::removeAllTiles):
              (WebKit::TiledDrawingAreaProxy::tileDistance):
              (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
              (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
              (WebKit::TiledDrawingAreaProxy::createTiles):
              (WebKit::TiledDrawingAreaProxy::resizeEdgeTiles):
              (WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect):
              (WebKit::TiledDrawingAreaProxy::tileAt):
              (WebKit::TiledDrawingAreaProxy::setTile):
              (WebKit::TiledDrawingAreaProxy::removeTile):
              (WebKit::TiledDrawingAreaProxy::mapToContents):
              (WebKit::TiledDrawingAreaProxy::mapFromContents):
              (WebKit::TiledDrawingAreaProxy::contentsRect):
              (WebKit::TiledDrawingAreaProxy::tileRectForCoordinate):
              (WebKit::TiledDrawingAreaProxy::tileCoordinateForPoint):
              (WebKit::TiledDrawingAreaProxy::startTileBufferUpdateTimer):
              (WebKit::TiledDrawingAreaProxy::tileBufferUpdateTimerFired):
              (WebKit::TiledDrawingAreaProxy::startTileCreationTimer):
              (WebKit::TiledDrawingAreaProxy::tileCreationTimerFired):
              (WebKit::TiledDrawingAreaProxy::hasPendingUpdates):
              * UIProcess/TiledDrawingAreaProxy.h: Added.
              (WebKit::TiledDrawingAreaProxy::contentsScale):
              (WebKit::TiledDrawingAreaProxy::attachCompositingContext):
              (WebKit::TiledDrawingAreaProxy::detachCompositingContext):
              (WebKit::TiledDrawingAreaProxy::tileSize):
              (WebKit::TiledDrawingAreaProxy::tileCreationDelay):
              (WebKit::TiledDrawingAreaProxy::getKeepAndCoverAreaMultipliers):
              * UIProcess/TiledDrawingAreaTile.h: Added.
              (WebKit::TiledDrawingAreaTile::create):
              (WebKit::TiledDrawingAreaTile::hasBackBufferUpdatePending):
              (WebKit::TiledDrawingAreaTile::coordinate):
              (WebKit::TiledDrawingAreaTile::rect):
              (WebKit::TiledDrawingAreaTile::ID):
              * WebProcess/WebPage/DrawingArea.cpp:
              (WebKit::DrawingArea::create):
              * WebProcess/WebPage/TiledDrawingArea.cpp: Added.
              (WebKit::TiledDrawingArea::TiledDrawingArea):
              (WebKit::TiledDrawingArea::~TiledDrawingArea):
              (WebKit::TiledDrawingArea::invalidateWindow):
              (WebKit::TiledDrawingArea::invalidateContentsAndWindow):
              (WebKit::TiledDrawingArea::invalidateContentsForSlowScroll):
              (WebKit::TiledDrawingArea::scroll):
              (WebKit::TiledDrawingArea::setNeedsDisplay):
              (WebKit::TiledDrawingArea::display):
              (WebKit::TiledDrawingArea::scheduleDisplay):
              (WebKit::TiledDrawingArea::setSize):
              (WebKit::TiledDrawingArea::suspendPainting):
              (WebKit::TiledDrawingArea::resumePainting):
              (WebKit::TiledDrawingArea::didUpdate):
              (WebKit::TiledDrawingArea::updateTile):
              (WebKit::TiledDrawingArea::tileUpdateTimerFired):
              (WebKit::TiledDrawingArea::didReceiveMessage):
              * WebProcess/WebPage/TiledDrawingArea.h: Added.
              (WebKit::TiledDrawingArea::attachCompositingContext):
              (WebKit::TiledDrawingArea::detachCompositingContext):
              (WebKit::TiledDrawingArea::setRootCompositingLayer):
              (WebKit::TiledDrawingArea::scheduleCompositingLayerSync):
              (WebKit::TiledDrawingArea::syncCompositingLayers):
              * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Added.
              (WebKit::TiledDrawingArea::paintIntoUpdateChunk):
              * WebKit2.pro:
              * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Added.
              (WebKit::checkeredPixmap):
              (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
              (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
              (WebKit::TiledDrawingAreaTile::isDirty):
              (WebKit::TiledDrawingAreaTile::isReadyToPaint):
              (WebKit::TiledDrawingAreaTile::hasReadyBackBuffer):
              (WebKit::TiledDrawingAreaTile::invalidate):
              (WebKit::TiledDrawingAreaTile::resize):
              (WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
              (WebKit::TiledDrawingAreaTile::paint):
              (WebKit::TiledDrawingAreaTile::paintCheckerPattern):
              (WebKit::TiledDrawingAreaTile::updateFromChunk):
              (WebKit::TiledDrawingAreaTile::updateBackBuffer):
              * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Added.
              (WebKit::TiledDrawingAreaProxy::updateWebView):
              (WebKit::TiledDrawingAreaProxy::webViewVisibleRect):
              (WebKit::TiledDrawingAreaProxy::page):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8be26126
  10. 11 Nov, 2010 3 commits
    • ossy@webkit.org's avatar
      [Qt] Unreviewed WebKit2 buildfix after r71587. · 1a01e60a
      ossy@webkit.org authored
      * UIProcess/qt/WebInspectorProxyQt.cpp:
      * WebKit2.pro:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a01e60a
    • timothy@apple.com's avatar
      Create and load the Web Inspector page. · 12d0118c
      timothy@apple.com authored
      https://webkit.org/b/49207
      
      Reviewed by Anders Carlsson.
      
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
      call WebPageProxy::loadURL with inspectorPageURL.
      (WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
      * UIProcess/WebInspectorProxy.h:
      * UIProcess/WebInspectorProxy.messages.in: Added.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
      (WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
      * UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
      
      * UIProcess/mac/WebInspectorProxyMac.mm:
      (WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
      (WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
      * UIProcess/qt/WebInspectorProxyQt.cpp:
      (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
      (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
      * UIProcess/win/WebInspectorProxyWin.cpp:
      (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
      (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
      
      * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
      (WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
      (WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
      (WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
      (WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
      
      * WebProcess/WebPage/WebInspector.cpp:
      (WebKit::WebInspector::WebInspector):
      (WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
      the WebPage using the result page ID.
      (WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
      * WebProcess/WebPage/WebInspector.h:
      (WebKit::WebInspector::inspectorPage): Added.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
      
      * WebProcess/WebPage/mac/WebInspectorMac.mm:
      (WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
      * WebProcess/WebPage/qt/WebInspectorQt.cpp:
      (WebKit::WebInspector::localizedStringsURL): Added stub.
      * WebProcess/WebPage/win/WebInspectorWin.cpp:
      (WebKit::WebInspector::localizedStringsURL): Added stub.
      
      * DerivedSources.make: Added WebInspectorProxy.messages.in.
      * DerivedSources.pro: Ditto.
      
      * WebKit2.pro: Added new files.
      * WebKit2.xcodeproj/project.pbxproj: Ditto.
      * win/WebKit2.vcproj: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      12d0118c
    • weinig@apple.com's avatar
      Move the remaining API client classes to use the APIClient base class. · 898fc923
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49404
      
      Reviewed by Anders Carlsson.
      
      Also moves InjectedBundleClient into its own class to match other API clients.
      
      * UIProcess/WebContextInjectedBundleClient.cpp:
      * UIProcess/WebContextInjectedBundleClient.h:
      * UIProcess/WebHistoryClient.cpp:
      (WebKit::WebHistoryClient::didNavigateWithNavigationData):
      (WebKit::WebHistoryClient::didPerformClientRedirect):
      (WebKit::WebHistoryClient::didPerformServerRedirect):
      (WebKit::WebHistoryClient::didUpdateHistoryTitle):
      (WebKit::WebHistoryClient::populateVisitedLinks):
      * UIProcess/WebHistoryClient.h:
      (WebKit::WebHistoryClient::shouldTrackVisitedLinks):
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::initializeClient):
      (WebKit::InjectedBundle::reportException):
      (WebKit::InjectedBundle::didCreatePage):
      (WebKit::InjectedBundle::willDestroyPage):
      (WebKit::InjectedBundle::didReceiveMessage):
      * WebProcess/InjectedBundle/InjectedBundle.h:
      * WebProcess/InjectedBundle/InjectedBundleClient.cpp: Added.
      (WebKit::InjectedBundleClient::didCreatePage):
      (WebKit::InjectedBundleClient::willDestroyPage):
      (WebKit::InjectedBundleClient::didReceiveMessage):
      * WebProcess/InjectedBundle/InjectedBundleClient.h: Added.
      * win/WebKit2.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      898fc923
  11. 09 Nov, 2010 6 commits
    • andersca@apple.com's avatar
      Add injected bundle API for creating page overlays · ad9d26dc
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49282
      
      Reviewed by Sam Weinig.
      
      * Shared/API/c/WKBase.h:
      Add WKBundlePageOverlayRef.
      
      * Shared/APIObject.h:
      Add TypeBundlePageOverlay.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      Add new files.
      
      * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
      Add WKBundlePageOverlayRef mapping.
      
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      (WKBundlePageInstallPageOverlay):
      Install the passed in page overlay.
      
      (WKBundlePageUninstallPageOverlay):
      Uninstall the passed in page overlay.
      
      * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: Added.
      (PageOverlayClientImpl::create):
      (PageOverlayClientImpl::PageOverlayClientImpl):
      (PageOverlayClientImpl::pageOverlayDestroyed):
      (PageOverlayClientImpl::willMoveToWebPage):
      (PageOverlayClientImpl::didMoveToWebPage):
      (PageOverlayClientImpl::drawRect):
      (PageOverlayClientImpl::mouseEvent):
      Add a PageOverlay::Client subclass that forwards everything to its client.
      
      (WKBundlePageOverlayGetTypeID):
      (WKBundlePageOverlayCreate):
      Create a page overlay.
      
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::pageOverlayDestroyed):
      * WebProcess/WebPage/FindController.h:
      Add stub.
      
      * WebProcess/WebPage/PageOverlay.h:
      Inherit from APIObject.
      
      (WebKit::PageOverlay::type):
      return TypeBundlePageOverlay.
      
      * win/WebKit2.vcproj:
      Add new files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad9d26dc
    • beidson@apple.com's avatar
      WebCore: <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720 · 42bd97cb
      beidson@apple.com authored
      Customizable context menu support in WebKit2.
      
      Reviewed by Darin Adler.
      
      Various WebCore support to allow WebKit2 to create new ContextMenuItems with
      the information it has.
      
      * WebCore.exp.in:
      
      * platform/ContextMenu.h:
      * platform/ContextMenuItem.h:
      
      * platform/mac/ContextMenuItemMac.mm:
      (WebCore::ContextMenuItem::ContextMenuItem):
      (WebCore::ContextMenuItem::setSubMenu):
      * platform/mac/ContextMenuMac.mm:
      (WebCore::platformMenuDescription):
      
      * platform/qt/ContextMenuItemQt.cpp:
      (WebCore::ContextMenuItem::ContextMenuItem):
      (WebCore::ContextMenuItem::setSubMenu):
      * platform/qt/ContextMenuQt.cpp:
      (WebCore::platformMenuDescription):
      
      * platform/win/ContextMenuItemWin.cpp:
      (WebCore::ContextMenuItem::ContextMenuItem):
      (WebCore::ContextMenuItem::setSubMenu):
      * platform/win/ContextMenuWin.cpp:
      (WebCore::platformMenuDescription):
      
      WebKit2: Part of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
      Customizable context menu support in WebKit2.
      
      Reviewed by Darin Adler.
      
      This adds a BundlePageContextMenu client and lets WebKit2 consult it with the proposed
      list of WebContextMenuItems.
      There is no realistic API for the embedding app to actually inspect or create new
      WebContextMenuItems (will be "WKContextMenuItem") and that ability will come later.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      
      * Platform/Logging.cpp:
      (initializeLogChannelsIfNecessary):
      * Platform/Logging.h:
      
      * Shared/APIObject.h:
      
      * Shared/MutableArray.cpp:
      (WebKit::MutableArray::reserveCapacity):
      * Shared/MutableArray.h:
      
      * Shared/WebContextMenuItem.cpp: Added.
      (WebKit::WebContextMenuItem::WebContextMenuItem):
      (WebKit::WebContextMenuItem::data):
      * Shared/WebContextMenuItem.h: Added.
      (WebKit::WebContextMenuItem::create):
      (WebKit::WebContextMenuItem::type):
      
      * Shared/WebContextMenuItemData.cpp:
      (WebKit::WebContextMenuItemData::core):
      (WebKit::kitItems):
      (WebKit::coreItems):
      * Shared/WebContextMenuItemData.h:
      
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      (WKBundlePageSetContextMenuClient):
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      
      * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: Added.
      (WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
      (WebKit::InjectedBundlePageContextMenuClient::initialize):
      (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
      * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: Added.
      
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Call through to the injected bundle client
        with the default items and convert the returned items back for WebCore to use.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::initializeInjectedBundleContextMenuClient):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::injectedBundleContextMenuClient):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42bd97cb
    • andersca@apple.com's avatar
      Get rid of FindPageOverlay · 733edd4b
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49268
      
      Reviewed by Sam Weinig.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      Remove files.
      
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::findString):
      Create a PageOverlay with the FindController as its client.
      
      (WebKit::FindController::willMoveToWebPage):
      Null out the find page overlay if the web page is null.
      
      (WebKit::FindController::didMoveToWebPage):
      Add stub.
      
      * WebProcess/WebPage/FindController.h:
      FindController is now a PageOverlay::Client.
      
      * WebProcess/WebPage/FindPageOverlay.cpp: Removed.
      * WebProcess/WebPage/FindPageOverlay.h: Removed.
      * WebProcess/WebPage/PageOverlay.cpp:
      (WebKit::PageOverlay::setPage):
      Call the willMoveToWebPage and didMoveToWebPage client functions.
      
      (WebKit::PageOverlay::setNeedsDisplay):
      Pass the page overlay bounds instead of the web page size.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::installPageOverlay):
      Clear the page of the previous page overlay.
      
      (WebKit::WebPage::uninstallPageOverlay):
      Clear the page of the previous page overlay.
      
      * WebProcess/WebPage/WebPage.h:
      The page overlay is now refcounted.
      
      * win/WebKit2.vcproj:
      Remove files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      733edd4b
    • weinig@apple.com's avatar
      Send messages directly to the WebContext · 78526a39
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49262
      
      Reviewed by Anders Carlsson.
      
      * Platform/CoreIPC/MessageID.h:
      Temporarily add MessageClassWebContextLegacy.
      
      * Shared/CoreIPCSupport/WebContextMessageKinds.h:
      Rename adding Legacy prefix.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::didNavigateWithNavigationData):
      (WebKit::WebContext::didPerformClientRedirect):
      (WebKit::WebContext::didPerformServerRedirect):
      (WebKit::WebContext::didUpdateHistoryTitle):
      (WebKit::WebContext::setCacheModel):
      (WebKit::WebContext::addVisitedLink):
      (WebKit::WebContext::addVisitedLinkHash):
      (WebKit::WebContext::getPlugins):
      (WebKit::WebContext::getPluginPath):
      (WebKit::WebContext::didReceiveMessage):
      (WebKit::WebContext::didReceiveSyncMessage):
      * UIProcess/WebContext.h:
      * UIProcess/WebContext.messages.in: Added.
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::getPluginProcessConnection):
      (WebKit::WebProcessProxy::didReceiveMessage):
      (WebKit::WebProcessProxy::didReceiveSyncMessage):
      * UIProcess/WebProcessProxy.h:
      * UIProcess/WebProcessProxy.messages.in:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::postMessage):
      (WebKit::InjectedBundle::postSynchronousMessage):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::updateGlobalHistory):
      (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
      (WebKit::WebFrameLoaderClient::setTitle):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::populatePluginCache):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::createPlugin):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::addVisitedLink):
      Move context related messages to be sent directly to the context.
      
      * DerivedSources.make:
      * DerivedSources.pro:
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78526a39
    • weinig@apple.com's avatar
      Fix Qt build. · 9640995d
      weinig@apple.com authored
      * WebKit2.pro:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9640995d
    • weinig@apple.com's avatar
      Windows Popup widget support (<select>) · 6073e7ff
      weinig@apple.com authored
      <rdar://problem/8559439>
      https://bugs.webkit.org/show_bug.cgi?id=48701
      
      Reviewed by Anders Carlsson.
      
      Port WebCore's PopupMenuWin's implementation to work within the confines of WebKit2.
      Since we currently can't draw text using WebCore in the UIProcess, this approach uses
      the WebProcess to create two bitmaps representing the full popup menu (both unselected and 
      selected) and sends them to the UIProcess to be drawn in an HWND.
      
      * Shared/BackingStore.h:
      * Shared/cg/BackingStoreCG.cpp:
      * Shared/qt/BackingStoreQt.cpp:
      
      Add new function to create a flipped graphics context from the backing store, 
      and add additional parameters to paint, to allow more control of how the backing
      store is painted into the destination context.
      
      * Shared/PlatformPopupMenuData.cpp: Added.
      (WebKit::PlatformPopupMenuData::PlatformPopupMenuData):
      (WebKit::PlatformPopupMenuData::encode):
      (WebKit::PlatformPopupMenuData::decode):
      * Shared/PlatformPopupMenuData.h: Added.
      Add struct so platforms can send platform specific data to their popup menu implementations.
      
      * Shared/WebPopupItem.cpp:
      (WebKit::WebPopupItem::WebPopupItem):
      (WebKit::WebPopupItem::encode):
      (WebKit::WebPopupItem::decode):
      * Shared/WebPopupItem.h:
      Add isLabel for each menu item.
      
      * UIProcess/FindIndicator.cpp:
      (WebKit::FindIndicator::draw):
      Update for new BackingStore::paint signature.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::showPopupMenu):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebPopupMenuProxy.h:
      * UIProcess/mac/WebPopupMenuProxyMac.h:
      * UIProcess/mac/WebPopupMenuProxyMac.mm:
      (WebKit::WebPopupMenuProxyMac::showPopupMenu):
      * UIProcess/qt/WebPopupMenuProxyQt.cpp:
      (WebKit::WebPopupMenuProxyQt::showPopupMenu):
      * UIProcess/qt/WebPopupMenuProxyQt.h:
      Pass through the new PlatformPopupMenuData.
      
      * UIProcess/win/WebPopupMenuProxyWin.cpp:
      * UIProcess/win/WebPopupMenuProxyWin.h:
      Port implementation from WebCore.
      
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::createPopupMenuProxy):
      Pass the WebView to the WebPopupMenuProxyWin.
      
      * WebProcess/Plugins/PluginProxy.cpp:
      (WebKit::PluginProxy::paint):
      (WebKit::PluginProxy::update):
      Update for new BackingStore::paint signature.
      
      * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
      (WebKit::WebPopupMenu::populateItems): Add isLabel for each item.
      (WebKit::WebPopupMenu::show): Give each platform a chance to add platform specific data.
      * WebProcess/WebCoreSupport/WebPopupMenu.h:
      
      * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: Added.
      (WebKit::WebPopupMenu::setUpPlatformData):
      * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp: Added.
      (WebKit::WebPopupMenu::setUpPlatformData):
      Add stubbed out setUpPlatformData.
      
      * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Added.
      (WebKit::WebPopupMenu::setUpPlatformData):
      Compute data needed in the UIProcess including generating the bitmaps.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6073e7ff
  12. 08 Nov, 2010 4 commits
    • andersca@apple.com's avatar
      Add WKDownloadClient API · 9cff7508
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49227
      
      Reviewed by Dan Bernstein.
      
      * Shared/API/c/WKBase.h:
      Add WKDownloadRef.
      
      * UIProcess/API/C/WKAPICast.h:
      Add WKDownloadRef <-> DownloadProxy mapping.
      
      * UIProcess/API/C/WKContext.cpp:
      (WKContextSetDownloadClient):
      Initialize the download client.
      
      * UIProcess/API/C/WKContext.h:
      Add new WKContextDownloadClient API.
      
      * UIProcess/API/C/WKDownload.cpp: Added.
      * UIProcess/API/C/WKDownload.h:
      Add WKDownload files.
      
      * UIProcess/Downloads/DownloadProxy.cpp:
      (WebKit::DownloadProxy::didStart):
      (WebKit::DownloadProxy::didCreateDestination):
      (WebKit::DownloadProxy::didFinish):
      Call down to the the WebDownloadClient.
      
      * UIProcess/Downloads/DownloadProxy.messages.in:
      Rename DidBegin to DidStart.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::initializeDownloadClient):
      Initialize the download client.
      
      * UIProcess/WebContext.h:
      (WebKit::WebContext::downloadClient):
      Add getter.
      
      * UIProcess/WebDownloadClient.cpp:
      (WebKit::WebDownloadClient::didStart):
      (WebKit::WebDownloadClient::didCreateDestination):
      (WebKit::WebDownloadClient::didFinish):
      Call the relevant WKContextDownloadClient functions.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      Add new files.
      
      * WebProcess/Downloads/Download.cpp:
      (WebKit::Download::didStart):
      * WebProcess/Downloads/Download.h:
      * WebProcess/Downloads/mac/DownloadMac.mm:
      (-[WKDownloadAsDelegate downloadDidBegin:]):
      Rename Download::didBegin to Download::didStart.
      
      * win/WebKit2.vcproj:
      Add new files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9cff7508
    • beidson@apple.com's avatar
      Part of https://bugs.webkit.org/show_bug.cgi?id=49222 · de4de4cf
      beidson@apple.com authored
      Rename "WebContextMenuItem" to "WebContextMenuItemData"
      
      Reviewed by Anders Carlsson.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      
      * Shared/WebContextMenuItem.cpp: Removed.
      * Shared/WebContextMenuItem.h: Removed.
      * Shared/WebContextMenuItemData.cpp: Copied from Shared/WebContextMenuItem.cpp.
      (WebKit::WebContextMenuItemData::WebContextMenuItemData):
      (WebKit::WebContextMenuItemData::encode):
      (WebKit::WebContextMenuItemData::decode):
      (WebKit::kitItems):
      * Shared/WebContextMenuItemData.h: Copied from Shared/WebContextMenuItem.h.
      (WebKit::WebContextMenuItemData::submenu):
      
      * UIProcess/WebContextMenuProxy.h:
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::showContextMenu):
      (WebKit::WebPageProxy::contextMenuItemSelected):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      
      * UIProcess/mac/WebContextMenuProxyMac.h:
      * UIProcess/mac/WebContextMenuProxyMac.mm:
      (-[WebMenuTarget forwardContextMenuAction:]):
      (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
      (WebKit::nsMenuItemVector):
      (WebKit::WebContextMenuProxyMac::populate):
      (WebKit::WebContextMenuProxyMac::showContextMenu):
      
      * UIProcess/qt/WebContextMenuProxyQt.cpp:
      (WebKit::WebContextMenuProxyQt::showContextMenu):
      * UIProcess/qt/WebContextMenuProxyQt.h:
      
      * UIProcess/win/WebContextMenuProxyWin.cpp:
      (WebKit::WebContextMenuProxyWin::showContextMenu):
      * UIProcess/win/WebContextMenuProxyWin.h:
      
      * WebProcess/WebPage/WebContextMenu.cpp:
      (WebKit::WebContextMenu::itemSelected):
      * WebProcess/WebPage/WebContextMenu.h:
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::didSelectItemFromActiveContextMenu):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de4de4cf
    • andersca@apple.com's avatar
      Add the ability to send messages to DownloadProxy objects · d06a84ec
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49213
      
      Reviewed by Adam Roben.
      
      * DerivedSources.make:
      * DerivedSources.pro:
      Add Download.messages.in.
      
      * Platform/CoreIPC/MessageID.h:
      Add MessageClassDownloadProxy message class.
      
      * Platform/CoreIPC/MessageSender.h:
      Include Connection.h directly since it's required.
      
      * UIProcess/Downloads/DownloadProxy.cpp:
      (WebKit::DownloadProxy::didBegin):
      (WebKit::DownloadProxy::didCreateDestination):
      (WebKit::DownloadProxy::didFinish):
      Add stubs.
      
      * UIProcess/Downloads/DownloadProxy.messages.in: Added.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::didReceiveMessage):
      Handle DownloadProxy messages.
      
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::didReceiveMessage):
      Hand DownloadProxy messages off to the context.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      Add new files.
      
      * WebProcess/Downloads/Download.cpp:
      (WebKit::Download::didBegin):
      (WebKit::Download::didReceiveData):
      (WebKit::Download::didCreateDestination):
      (WebKit::Download::didFinish):
      Send messages.
      
      * WebProcess/Downloads/mac/DownloadMac.mm:
      (-[WKDownloadAsDelegate download:didCreateDestination:]):
      Call Download::didCreateDestination.
      
      * win/WebKit2.vcproj:
      Add new files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d06a84ec
    • andersca@apple.com's avatar
      Add DownloadProxy object · e4e08e28
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49211
      
      Reviewed by Adam Roben.
      
      DownloadProxy will be the implementation of the forthcoming WKDownloadRef object.
      
      * Shared/APIObject.h:
      Add TypeDownload.
      
      * UIProcess/Downloads/DownloadProxy.cpp:
      (WebKit::generateDownloadID):
      Generate a unique download ID.
      
      (WebKit::DownloadProxy::invalidate):
      Null out the web context.
      
      * UIProcess/Downloads/DownloadProxy.h:
      (WebKit::WebContext::processDidClose):
      Invalidate all downloads.
      
      (WebKit::WebContext::createDownloadProxy):
      Create a WebDownload object.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::receivedPolicyDecision):
      Call createDownloadProxy instead.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add new files.
      
      * win/WebKit2Common.vsprops:
      Add new include path.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4e08e28
  13. 07 Nov, 2010 1 commit
    • eric@webkit.org's avatar
      2010-11-07 Eric Seidel <eric@webkit.org> · e06abe1c
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Move the rest of the cache-related files into loader/cache
              https://bugs.webkit.org/show_bug.cgi?id=49156
      
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * loader/CachePolicy.h: Removed.
              * loader/CachedCSSStyleSheet.cpp: Removed.
              * loader/CachedCSSStyleSheet.h: Removed.
              * loader/CachedFont.cpp: Removed.
              * loader/CachedFont.h: Removed.
              * loader/CachedImage.cpp: Removed.
              * loader/CachedImage.h: Removed.
              * loader/CachedResource.cpp: Removed.
              * loader/CachedResource.h: Removed.
              * loader/CachedResourceClient.h: Removed.
              * loader/CachedResourceClientWalker.cpp: Removed.
              * loader/CachedResourceClientWalker.h: Removed.
              * loader/CachedResourceHandle.cpp: Removed.
              * loader/CachedResourceHandle.h: Removed.
              * loader/CachedResourceLoader.cpp: Removed.
              * loader/CachedResourceLoader.h: Removed.
              * loader/CachedScript.cpp: Removed.
              * loader/CachedScript.h: Removed.
              * loader/CachedXSLStyleSheet.cpp: Removed.
              * loader/CachedXSLStyleSheet.h: Removed.
              * loader/cache/CachePolicy.h: Copied from WebCore/loader/CachePolicy.h.
              * loader/cache/CachedCSSStyleSheet.cpp: Copied from WebCore/loader/CachedCSSStyleSheet.cpp.
              * loader/cache/CachedCSSStyleSheet.h: Copied from WebCore/loader/CachedCSSStyleSheet.h.
              * loader/cache/CachedFont.cpp: Copied from WebCore/loader/CachedFont.cpp.
              * loader/cache/CachedFont.h: Copied from WebCore/loader/CachedFont.h.
              * loader/cache/CachedImage.cpp: Copied from WebCore/loader/CachedImage.cpp.
              * loader/cache/CachedImage.h: Copied from WebCore/loader/CachedImage.h.
              * loader/cache/CachedResource.cpp: Copied from WebCore/loader/CachedResource.cpp.
              * loader/cache/CachedResource.h: Copied from WebCore/loader/CachedResource.h.
              * loader/cache/CachedResourceClient.h: Copied from WebCore/loader/CachedResourceClient.h.
              * loader/cache/CachedResourceClientWalker.cpp: Copied from WebCore/loader/CachedResourceClientWalker.cpp.
              * loader/cache/CachedResourceClientWalker.h: Copied from WebCore/loader/CachedResourceClientWalker.h.
              * loader/cache/CachedResourceHandle.cpp: Copied from WebCore/loader/CachedResourceHandle.cpp.
              * loader/cache/CachedResourceHandle.h: Copied from WebCore/loader/CachedResourceHandle.h.
              * loader/cache/CachedResourceLoader.cpp: Copied from WebCore/loader/CachedResourceLoader.cpp.
              * loader/cache/CachedResourceLoader.h: Copied from WebCore/loader/CachedResourceLoader.h.
              * loader/cache/CachedScript.cpp: Copied from WebCore/loader/CachedScript.cpp.
              * loader/cache/CachedScript.h: Copied from WebCore/loader/CachedScript.h.
              * loader/cache/CachedXSLStyleSheet.cpp: Copied from WebCore/loader/CachedXSLStyleSheet.cpp.
              * loader/cache/CachedXSLStyleSheet.h: Copied from WebCore/loader/CachedXSLStyleSheet.h.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e06abe1c
  14. 05 Nov, 2010 3 commits
    • andersca@apple.com's avatar
      WebProcess won't kill itself if UIProcess goes away while WebProcess is spinning · 059f5fb5
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49090
      <rdar://problem/7834575>
      
      Reviewed by Darin Adler.
      
      * Platform/CoreIPC/Connection.cpp:
      (CoreIPC::Connection::connectionDidClose):
      Call Client::didCloseOnConnectionWorkQueue.
      
      * Platform/CoreIPC/Connection.h:
      (CoreIPC::Connection::Client::didCloseOnConnectionWorkQueue):
      Add new client function. Will be called on the connection work queue when the connection is closed.
      
      * Platform/WorkItem.h:
      (FunctionWorkItem0::FunctionWorkItem0):
      (FunctionWorkItem0::execute):
      (WorkItem::create):
      Add a new WorkItem subclass that will invoke a C function.
      
      * Platform/WorkQueue.h:
      * Platform/mac/WorkQueueMac.cpp:
      (WorkQueue::scheduleWorkAfterDelay):
      New function which will schedule the given work item to be executed in at least 'delay' seconds.
      
      * Platform/qt/WorkQueueQt.cpp:
      (WorkQueue::scheduleWorkAfterDelay):
      Add empty stub.
      
      * Platform/win/WorkQueueWin.cpp:
      (WorkQueue::scheduleWorkAfterDelay):
      Ditto.
      
      * PluginProcess/PluginProcess.h:
      Derive from ChildProcess.
      
      * Shared/ChildProcess.cpp: Added.
      (WebKit::ChildProcess::ChildProcess):
      (WebKit::ChildProcess::~ChildProcess):
      (WebKit::watchdogCallback):
      Call _exit.
      
      (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
      When the connection is closed, schedule a work item to be run in 10 seconds. If the process hasn't
      exited normally by then, we'll exit.
      
      * Shared/ChildProcess.h:
      Add new ChildProcess class which is a common base class of WebProcess and PluginProcess and which contains
      the watchdog timer logic.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      Add new files.
      
      * WebProcess/WebProcess.h:
      Derive from ChildProcess.
      
      * win/WebKit2.vcproj:
      Add new files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      059f5fb5
    • weinig@apple.com's avatar
      Generate the messages sent to the WebProcessProxy · be4b7bcc
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49062
      
      Reviewed by Adam Roben..
      
      * Platform/CoreIPC/MessageID.h:
      Temporarily add MessageClassWebProcessProxyLegacy while we still can't
      support GetPluginProcessConnection (and deferred sync replies) in the
      general mechanism.
      
      * Scripts/webkit2/messages.py:
      Add support for WebCore::PluginData and WebKit::WebNavigationDataStore.
      
      * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
      Remove now unused kinds. Rename to MessageClassWebProcessProxyLegacy.
      
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::getPluginPath):
      (WebKit::WebProcessProxy::addBackForwardItem):
      (WebKit::WebProcessProxy::didNavigateWithNavigationData):
      (WebKit::WebProcessProxy::didPerformClientRedirect):
      (WebKit::WebProcessProxy::didPerformServerRedirect):
      (WebKit::WebProcessProxy::didUpdateHistoryTitle):
      (WebKit::WebProcessProxy::didReceiveMessage):
      (WebKit::WebProcessProxy::didReceiveSyncMessage):
      (WebKit::WebProcessProxy::didDestroyFrame):
      * UIProcess/WebProcessProxy.h:
      * UIProcess/WebProcessProxy.messages.in: Added.
      Move implementations to their own functions.
      
      * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
      (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
      Change to use WebProcessProxyLegacyMessage.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::updateGlobalHistory):
      (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
      (WebKit::WebFrameLoaderClient::setTitle):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::populatePluginCache):
      * WebProcess/WebPage/WebBackForwardListProxy.cpp:
      (WebKit::updateBackForwardItem):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::createPlugin):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::addVisitedLink):
      (WebKit::WebProcess::removeWebFrame):
      Use generated messages.
      
      * DerivedSources.make:
      * DerivedSources.pro:
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be4b7bcc
    • kbalazs@webkit.org's avatar
      [Qt][WK2] Left over files and shared memory segments · 792577a5
      kbalazs@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=48985
      
      Reviewed by Andreas Kling.
      
      * Platform/qt/SharedMemoryQt.cpp:
      (WebKit::SharedMemory::create): Force deletion of the QSharedMemory
      object on terminate by connecting QCoreApplication::aboutToQuit with
      deleteLater. Add the object to the CrashHandler as well to release the
      shared memory segment even on crash.
      (WebKit::SharedMemory::~SharedMemory):
      * Shared/qt/CrashHandler.cpp: Added.
      CrashHandler has a container for QObjects that we want to
      destroy on crash. When we got a signal that we interpret as
      a crash then it destroys those objects.
      (WebKit::CrashHandler::CrashHandler):
      (WebKit::CrashHandler::signalHandler):
      (WebKit::CrashHandler::deleteObjects):
      * Shared/qt/CrashHandler.h: Added.
      (WebKit::CrashHandler::instance):
      (WebKit::CrashHandler::didDelete):
      (WebKit::CrashHandler::markForDeletionOnCrash):
      * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
      (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
      Add the object itself to the CrashHandler to close the QLocalServer
      even on crash. Without that the QLocalServer leaves over socket files on the disk.
      (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
      * WebKit2.pro:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      792577a5
  15. 04 Nov, 2010 2 commits
  16. 02 Nov, 2010 1 commit
    • timothy@apple.com's avatar
      Add WKInspector public APIs. · c3bef1f5
      timothy@apple.com authored
      https://webkit.org/b/48718
      
      Reviewed by Pavel Feldman.
      
      * DerivedSources.make: Added WebInspector to MESSAGE_RECEIVERS section.
      * UIProcess/API/C/WKInspector.cpp:
      (WKInspectorIsVisible): Added.
      (WKInspectorShow): Added.
      (WKInspectorClose): Added.
      (WKInspectorShowConsole): Added.
      (WKInspectorIsAttached): Added.
      (WKInspectorAttach): Added.
      (WKInspectorDetach): Added.
      (WKInspectorIsDebuggingJavaScript): Added.
      (WKInspectorToggleJavaScriptDebugging): Added.
      (WKInspectorIsProfilingJavaScript): Added.
      (WKInspectorToggleJavaScriptProfiling): Added.
      (WKInspectorIsProfilingPage): Added.
      (WKInspectorTogglePageProfiling): Added.
      * UIProcess/API/C/WKInspector.h: Added new functions.
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize new booleans.
      (WebKit::WebInspectorProxy::invalidate): Reset new booleans.
      (WebKit::WebInspectorProxy::show): Added.
      (WebKit::WebInspectorProxy::close): Added.
      (WebKit::WebInspectorProxy::showConsole): Added.
      (WebKit::WebInspectorProxy::attach): Added.
      (WebKit::WebInspectorProxy::detach): Added.
      (WebKit::WebInspectorProxy::toggleJavaScriptDebugging): Added.
      (WebKit::WebInspectorProxy::toggleJavaScriptProfiling): Added.
      (WebKit::WebInspectorProxy::togglePageProfiling): Added.
      * UIProcess/WebInspectorProxy.h:
      (WebKit::WebInspectorProxy::isVisible): Added.
      (WebKit::WebInspectorProxy::isAttached): Added.
      (WebKit::WebInspectorProxy::isDebuggingJavaScript): Added.
      (WebKit::WebInspectorProxy::isProfilingJavaScript): Added.
      (WebKit::WebInspectorProxy::isProfilingPage): Added.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::close): Invalidate the WebInspectorProxy.
      (WebKit::WebPageProxy::inspector): Return 0 if closed or invalid.
      * WebKit2.pro: Added new files.
      * WebKit2.xcodeproj/project.pbxproj: Added new Files.
      * WebProcess/WebPage/WebInspector.cpp:
      (WebKit::WebInspector::show): Added.
      (WebKit::WebInspector::close): Added.
      (WebKit::WebInspector::showConsole): Added.
      (WebKit::WebInspector::startJavaScriptDebugging): Added.
      (WebKit::WebInspector::stopJavaScriptDebugging): Added.
      (WebKit::WebInspector::startJavaScriptProfiling): Added.
      (WebKit::WebInspector::stopJavaScriptProfiling): Added.
      (WebKit::WebInspector::startPageProfiling): Added.
      (WebKit::WebInspector::stopPageProfiling): Added.
      * WebProcess/WebPage/WebInspector.h:
      (WebKit::WebInspector::page): Added.
      * WebProcess/WebPage/WebInspector.messages.in: Added.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::close): Destroy the WebInspector.
      (WebKit::WebPage::inspector): Return 0 if closed.
      (WebKit::WebPage::didReceiveMessage): Send the message to the WebInspector
      if the message class is MessageClassWebInspector.
      * win/WebKit2.vcproj: Added new files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3bef1f5
  17. 01 Nov, 2010 2 commits
    • commit-queue@webkit.org's avatar
      2010-11-01 Juha Savolainen <juha.savolainen@weego.fi> · 6a5584ef
      commit-queue@webkit.org authored
              Reviewed by Kenneth Rohde Christiansen.
      
              Initial implementation of QWKHistoryItem.
              https://bugs.webkit.org/show_bug.cgi?id=48620
      
              The QWkHistoryItem represents one item in the history of QWKPage.
      
              * UIProcess/API/qt/qwkhistory.cpp:
              (QWKHistoryItemPrivate::QWKHistoryItemPrivate):
              (QWKHistoryItem::QWKHistoryItem):
              (QWKHistoryItem::~QWKHistoryItem):
              (QWKHistoryItem::title): The page title
              (QWKHistoryItem::url): The URL of the page.
              (QWKHistoryItem::originalUrl): The URL used to access the page.
              * UIProcess/API/qt/qwkhistory.h:
              * UIProcess/API/qt/qwkhistory_p.h:
              * WebKit2.pro: Added WKBackForwardListItem.h and WKBackForwardListItem.cpp
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a5584ef
    • beidson@apple.com's avatar
      <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699 · 3a0329aa
      beidson@apple.com authored
      Context menu support for WebKit 2.
      
      Reviewed by Anders Carlsson.
      
      WebCore: 
      
      Add a "showContextMenu" call to Chrome/ChromeClient:
      * loader/EmptyClients.h:
      (WebCore::EmptyChromeClient::showContextMenu):
      * page/Chrome.cpp:
      (WebCore::Chrome::showContextMenu):
      * page/Chrome.h:
      * page/ChromeClient.h:
      
      Add a "platform description to ContextMenuItem" creator, will be needed by WebKit2
      * platform/ContextMenu.h:
      * platform/mac/ContextMenuMac.mm:
      (WebCore::contextMenuItemVector):
      
      * platform/mac/ContextMenuItemMac.mm:
      (WebCore::ContextMenuItem::checked): WebKit2 ports now need this implemented.
      
      Stub these out to keep their WK2 ports building:
      * platform/qt/ContextMenuItemQt.cpp:
      (WebCore::ContextMenuItem::checked):
      * platform/qt/ContextMenuQt.cpp:
      (WebCore::contextMenuItemVector):
      * platform/win/ContextMenuItemWin.cpp:
      (WebCore::ContextMenuItem::checked):
      * platform/win/ContextMenuWin.cpp:
      (WebCore::contextMenuItemVector):
      
      WebKit/chromium: 
      
      * src/ChromeClientImpl.h:
      (WebKit::ChromeClientImpl::showContextMenu):
      
      WebKit/efl: 
      
      * WebCoreSupport/ChromeClientEfl.h:
      (WebCore::ChromeClientEfl::showContextMenu):
      
      WebKit/gtk: 
      
      * WebCoreSupport/ChromeClientGtk.h:
      (WebKit::ChromeClient::showContextMenu):
      
      WebKit/haiku: 
      
      * WebCoreSupport/ChromeClientHaiku.h:
      (WebCore::ChromeClientHaiku::showContextMenu):
      
      WebKit/mac: 
      
      * WebCoreSupport/WebChromeClient.h:
      (WebChromeClient::showContextMenu):
      
      WebKit/qt: 
      
      * WebCoreSupport/ChromeClientQt.h:
      (WebCore::ChromeClientQt::showContextMenu):
      
      WebKit/win: 
      
      * WebCoreSupport/WebChromeClient.h:
      (WebChromeClient::showContextMenu):
      
      WebKit/wx: 
      
      * WebKitSupport/ChromeClientWx.h:
      (WebCore::ChromeClientWx::showContextMenu):
      
      WebKit2: 
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      
      * Shared/WebContextMenuItem.cpp: Added.
      (WebKit::WebContextMenuItem::WebContextMenuItem):
      (WebKit::WebContextMenuItem::encode):
      (WebKit::WebContextMenuItem::decode):
      (WebKit::kitItems):
      * Shared/WebContextMenuItem.h: Added.
      
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::createContextMenuProxy):
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPagePrivate::createContextMenuProxy): Stub to keep the build working.
      * UIProcess/API/qt/qwkpage_p.h:
      * UIProcess/PageClient.h:
      
      * UIProcess/WebContextMenuProxy.cpp: Added.
      (WebKit::WebContextMenuProxy::~WebContextMenuProxy):
      (WebKit::WebContextMenuProxy::WebContextMenuProxy):
      * UIProcess/WebContextMenuProxy.h: Added.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::showContextMenu): Shows the menu after receiving the message from the WebProcess.
      (WebKit::WebPageProxy::contextMenuItemSelected): Sends info about the selected menu item to the WebProcess
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      
      * UIProcess/mac/WebContextMenuProxyMac.h: Added.
      (WebKit::WebContextMenuProxyMac::create):
      * UIProcess/mac/WebContextMenuProxyMac.mm: Added.
      (+[WebMenuTarget sharedMenuTarget]):
      (-[WebMenuTarget WebKit::]):
      (-[WebMenuTarget setMenuProxy:WebKit::]):
      (-[WebMenuTarget forwardContextMenuAction:]):
      (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
      (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
      (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
      (WebKit::populateNSMenu):
      (WebKit::nsMenuItemVector):
      (WebKit::WebContextMenuProxyMac::populate):
      (WebKit::WebContextMenuProxyMac::showContextMenu):
      (WebKit::WebContextMenuProxyMac::hideContextMenu):
      
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::createContextMenuProxy): Stub for now.
      * UIProcess/win/WebView.h:
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::showContextMenu):
      * WebProcess/WebCoreSupport/WebChromeClient.h:
      
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Return the WebCore-provided default
        menu for now. Embedding app customization will come later (see bug 48720)
      
      * WebProcess/WebPage/WebContextMenu.cpp: Added.
      (WebKit::WebContextMenu::WebContextMenu):
      (WebKit::WebContextMenu::~WebContextMenu):
      (WebKit::WebContextMenu::show):
      (WebKit::WebContextMenu::itemSelected):
      * WebProcess/WebPage/WebContextMenu.h: Added.
      (WebKit::WebContextMenu::create):
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::contextMenu):
      (WebKit::handleMouseEvent): Pass right mouse presses along to WebCore as both a mouse event and context menu event, 
        the same way WebKit1 does.
      (WebKit::WebPage::didSelectItemFromActiveContextMenu):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a0329aa
  18. 29 Oct, 2010 3 commits
    • darin@apple.com's avatar
      More back/forward refactoring · e10e1282
      darin@apple.com authored
      Reviewed by Sam Weinig.
      
      WebCore: 
      
      * WebCore.exp.in: Updated.
      
      * GNUmakefile.am: Removed BackForwardControllerClient.h.
      * WebCore.gypi: Ditto.
      * WebCore.pro: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * history/BackForwardControllerClient.h: Removed.
      
      * history/BackForwardController.cpp:
      (WebCore::BackForwardController::BackForwardController):
      Set up just m_client.
      (WebCore::BackForwardController::~BackForwardController):
      Removed call to backForwardControllerDestroyed.
      (WebCore::BackForwardController::canGoBackOrForward): Added.
      (WebCore::BackForwardController::goBackOrForward): Added.
      (WebCore::BackForwardController::goBack): Added.
      (WebCore::BackForwardController::goForward): Added.
      (WebCore::BackForwardController::addItem): Added.
      (WebCore::BackForwardController::setCurrentItem): Added.
      (WebCore::BackForwardController::count): Added.
      (WebCore::BackForwardController::backCount): Added.
      (WebCore::BackForwardController::forwardCount): Added.
      (WebCore::BackForwardController::itemAtIndex): Added.
      (WebCore::BackForwardController::isActive): Added.
      (WebCore::BackForwardController::close): Added.
      
      * history/BackForwardController.h: Added functions from Page
      and BackForwardList that should be called here instead.
      Note that BackForwardList is to be renamed BackForwardClient soon.
      
      * history/BackForwardList.h: Removed many now-unneeded
      virtual functions.
      
      * history/BackForwardListImpl.h: Moved BackForwardListClient
      in here.
      
      * history/PageCache.cpp:
      (WebCore::logCanCachePageDecision): Use backForward().
      (WebCore::PageCache::canCache): Ditto.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::transitionToCommitted): Removed unneeded
      null check of backFowardList, which is never null.
      (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Use backForward.
      (WebCore::FrameLoader::didFirstLayout): Ditto.
      (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
      (WebCore::FrameLoader::checkDidPerformFirstNavigation): Ditto.
      * loader/HistoryController.cpp:
      (WebCore::HistoryController::goToItem): Ditto.
      (WebCore::HistoryController::updateForStandardLoad): Ditto.
      (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList): Ditto.
      (WebCore::HistoryController::updateBackForwardListClippedAtTarget): Ditto.
      (WebCore::HistoryController::pushState): Ditto.
      * loader/NavigationScheduler.cpp:
      (WebCore::ScheduledHistoryNavigation::fire): Ditto.
      (WebCore::NavigationScheduler::scheduleHistoryNavigation): Ditto.
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::close): Ditto.
      * page/History.cpp:
      (WebCore::History::length): Ditto.
      
      * page/Page.cpp:
      (WebCore::Page::Page): Use more adoptPtr. Use backForwardClient instead of
      backForwardControllerClient.
      (WebCore::Page::~Page): Use backForward.
      (WebCore::Page::backForwardList): Ditto.
      (WebCore::Page::goBack): Ditto.
      (WebCore::Page::goForward): Ditto.
      (WebCore::Page::canGoBackOrForward): Ditto.
      (WebCore::Page::goBackOrForward): Ditto.
      (WebCore::Page::getHistoryLength): Ditto.
      (WebCore::Page::PageClients::PageClients): Made non-inline.
      (WebCore::Page::PageClients::~PageClients): Ditto.
      
      * page/Page.h: Made PageClients constructor and destructor non-inline.
      Added backForward function. Marked old functions as deprecated.
      
      * page/Settings.cpp:
      (WebCore::Settings::setUsesPageCache): Use backForward.
      * platform/ContextMenu.cpp:
      (WebCore::ContextMenu::populate): Ditto.
      (WebCore::ContextMenu::checkOrEnableIfNeeded): Ditto.
      * wml/WMLDoElement.cpp:
      (WebCore::WMLDoElement::defaultEventHandler): Ditto.
      * wml/WMLDocument.cpp:
      (WebCore::WMLDocument::finishedParsing): Ditto.
      * wml/WMLPageState.cpp:
      (WebCore::WMLPageState::reset): Ditto.
      (WebCore::tryAccessHistoryURLs): Ditto.
      * wml/WMLPrevElement.cpp:
      (WebCore::WMLPrevElement::executeTask): Ditto.
      
      WebKit2: 
      
      * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
      * WebKit2.xcodeproj/project.pbxproj: Ditto.
      
      * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
      * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.
      
      * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
      (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
      (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
      (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
      (WebKit::InjectedBundleBackForwardList::clear): Ditto.
      
      * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Set up backForwardClient.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e10e1282
    • andersca@apple.com's avatar
      Add a MessageSender class template · 62487c8f
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=48683
      
      Reviewed by Adam Roben.
      
      * Platform/CoreIPC/MessageSender.h: Added.
      (CoreIPC::MessageSender::send):
      Add send overloads for simple message sending.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      Add MessageSender.h
      
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::countStringMatches):
      (WebKit::FindController::findString):
      (WebKit::FindController::updateFindIndicator):
      Call send on the web page.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::connection):
      Add connection(), used by the MessageSender.
      
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::destinationID):
      Add destinationID(), used by the MessageSender.
      
      * win/WebKit2.vcproj:
      Add MessageSender.h
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62487c8f
    • aroben@apple.com's avatar
      Move NPRuntime-related files into WebProcess/Plugins/Netscape · e8f6f5f2
      aroben@apple.com authored
      Fixes <http://webkit.org/b/48645>.
      
      Reviewed by Anders Carlsson.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Updated the files' paths.
      
      * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.cpp.
      * WebProcess/Plugins/Netscape/JSNPMethod.h: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.h.
      * WebProcess/Plugins/Netscape/JSNPObject.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.cpp.
      * WebProcess/Plugins/Netscape/JSNPObject.h: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.h.
      * WebProcess/Plugins/Netscape/NPJSObject.cpp: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.cpp.
      * WebProcess/Plugins/Netscape/NPJSObject.h: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.h.
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp.
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h.
      * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.cpp.
      * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.h.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8f6f5f2