1. 06 Jan, 2014 1 commit
    • barraclough@apple.com's avatar
      Move ViewState to WebCore · aecbfa41
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126488
      
      Reviewed by Anders Carlson.
      
      This change also partial reverts handling of LayerHostingMode, making this
      a separate message again. With hindsight the new way of doing this wasn't
      in all ways simpler, and it won't make sense to move this to WebCore.
      
      Source/WebCore: 
      
      * WebCore.xcodeproj/project.pbxproj:
      * page/ViewState.h: Added.
          - Moved from WebKit2, will be used by Page & FocusController.
      
      Source/WebKit2: 
      
      * Shared/ViewState.h: Removed.
          - Moved to WebCore.
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
          - Added layerHostingMode.
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::PageClientImpl):
      (WebKit::PageClientImpl::viewLayerHostingMode):
      * UIProcess/PageClient.h:
      (WebKit::PageClient::viewLayerHostingMode):
          - Revert isLayerWindowServerHosted -> viewLayerHostingMode.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
          - Added back m_layerHostingMode.
      (WebKit::WebPageProxy::updateViewState):
          - Removed IsLayerWindowServerHosted from ViewState.
      (WebKit::WebPageProxy::viewStateDidChange):
          - Added SetLayerHostingMode message.
      (WebKit::WebPageProxy::initializeCreationParameters):
          - Pass layerHostingMode.
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::isInWindow):
      (WebKit::WebPageProxy::isViewVisible):
          - ViewState moved to WebCore.
      * WebKit2.xcodeproj/project.pbxproj:
          - Removed ViewState.
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::setLayerHostingMode):
      (WebKit::PluginView::platformViewStateDidChange):
          - Separated setLayerHostingMode from platformViewStateDidChange.
      * WebProcess/Plugins/PluginView.h:
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::viewStateDidChange):
      (WebKit::DrawingArea::setLayerHostingMode):
          - Added virtual function, overridden in TiledCoreAnimationDrawingArea.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::setLayerHostingMode):
          - Separated setLayerHostingMode from platformViewStateDidChange.
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::isVisible):
      (WebKit::WebPage::layerHostingMode):
          - ViewState moved to WebCore.
      * WebProcess/WebPage/WebPage.messages.in:
          - Added SetLayerHostingMode message.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
          - viewStateDidChange no longer calls setLayerHostingMode (this is called by WebPage).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aecbfa41
  2. 03 Jan, 2014 1 commit
    • barraclough@apple.com's avatar
      Propagate WindowServer modifications state to WebProcess · 3cbf0c90
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126356
      
      Reviewed by Sam Weinig.
      
      This will be necessary to move control of process suppression to the WebProcess.
      IsVisuallyIdle implies the process has stopped painting, or painted rects are
      occluded and not actually being composited. State is provided on a per
      WindowServer connection basis, and as such may produce (safe) false positives.
      
      * Shared/ViewState.h:
          - added IsVisuallyIdle.
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::isVisuallyIdle):
          - added, on mac checks WindowServerConnection.
      * UIProcess/PageClient.h:
      (WebKit::PageClient::isVisuallyIdle):
          - base implementation purely based on isViewVisible.
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::windowServerConnectionStateChanged):
          - broadcast the state change.
      * UIProcess/WebContext.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::updateViewState):
      (WebKit::WebPageProxy::viewStateDidChange):
          - propagate IsVisuallyIdle.
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
          - broadcast the state change.
      * UIProcess/WebProcessProxy.h:
          - add windowServerConnectionStateChanged.
      * UIProcess/mac/WebContextMac.mm:
      (WebKit::WebContext::updateProcessSuppressionStateOfGlobalChildProcesses):
          - moved from static in fle to static member of class.
      (WebKit::WebContext::platformInitialize):
          - no need to enableOcclusionNotifications.
      (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
      (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
      (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
          - changed to call WindowServerConnection.
      (WebKit::WebContext::processSuppressionEnabledChanged):
          - don't remove/reregister occlusion notifications.
      * UIProcess/mac/WindowServerConnection.h: Added.
      (WebKit::WindowServerConnection::applicationIsOccluded):
      (WebKit::WindowServerConnection::applicationWindowModificationsHaveStopped):
          - accessors.
      * UIProcess/mac/WindowServerConnection.mm: Added.
      (WebKit::WindowServerConnection::applicationBecameOccluded):
      (WebKit::WindowServerConnection::applicationWindowModificationsStopped):
      (WebKit::WindowServerConnection::applicationBecameVisible):
      (WebKit::WindowServerConnection::applicationWindowModificationsStarted):
          - handle notifications from the WindowServer.
      (WebKit::WindowServerConnection::windowServerConnectionStateChanged):
          - broadcast the state change.
      (WebKit::WindowServerConnection::shared):
          - accessor for singleton object.
      (WebKit::WindowServerConnection::WindowServerConnection):
          - constructor inizializes fields & register notification handlers.
      * WebKit2.xcodeproj/project.pbxproj:
          - added new files.
      * config.h:
          - added HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3cbf0c90
  3. 02 Jan, 2014 1 commit
    • barraclough@apple.com's avatar
      Source/WebCore: [iOS] Tapping any link crashes in WebCore::EventHandler::mouseMoved() · 2f3625cd
      barraclough@apple.com authored
      (also crashes when scrolling certain sites)
      https://bugs.webkit.org/show_bug.cgi?id=126401
      <rdar://problem/15739334>
      
      Patch by Daniel Bates <dabates@apple.com> on 2014-01-02
      Reviewed by Tim Horton.
      
      * page/ios/EventHandlerIOS.mm:
      (WebCore::currentEventSlot): Make the shared variable have static-storage duration.
      
      Source/WebKit/mac: Remove WindowIsVisible
      https://bugs.webkit.org/show_bug.cgi?id=126270
      
      Reviewed by Tim Horton.
      
      We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
      The latter detects that the content is hidden in fewer cases than the former, and as such, the
      former is always preferable.
      
      This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
      Plugin::windowVisibilityChanged.
      
      * WebView/WebView.mm:
      (-[WebView _windowWillOrderOnScreen:]):
      (-[WebView _windowWillOrderOffScreen:]):
          - rename ContainingWindowIsVisible -> ContentIsVisible.
      
      Source/WebKit2: Remove WindowIsVisible
      https://bugs.webkit.org/show_bug.cgi?id=126270
      
      Reviewed by Tim Horton.
      
      We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
      The latter detects that the content is hidden in fewer cases than the former, and as such, the
      former is always preferable.
      
      This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
      Plugin::windowVisibilityChanged.
      
      * Shared/ViewState.h:
          - remove WindowIsVisible.
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
          - remove isWindowVisible.
      * UIProcess/API/mac/WKView.mm:
      (-[WKView viewDidMoveToWindow]):
      (-[WKView _windowDidMiniaturize:]):
      (-[WKView _windowDidDeminiaturize:]):
      (-[WKView _windowDidOrderOffScreen:]):
      (-[WKView _windowDidOrderOnScreen:]):
          - remove ViewState::WindowIsVisible.
      * UIProcess/PageClient.h:
          - remove isWindowVisible.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::updateViewState):
          - remove handling of ViewState::WindowIsVisible.
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::setIsVisible):
      (WebKit::PluginView::didInitializePlugin):
      * WebProcess/Plugins/PluginView.h:
          - setWindowIsVisible -> setIsVisible.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::setViewIsVisible):
      (WebKit::WebPage::setViewState):
      (WebKit::WebPage::windowAndWebPageAreFocused):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::isVisible):
          - remove m_windowIsVisible, setWindowIsVisible (implementation moved to setViewIsVisible).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f3625cd
  4. 22 Dec, 2013 1 commit
  5. 17 Dec, 2013 2 commits
    • barraclough@apple.com's avatar
      Add layer hosting mode to ViewState · d105f9dc
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125803
      
      Unreviewed - reverting last commit - might have broken tests. :-(
      
      * Shared/ViewState.h:
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::PageClientImpl):
      (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
      (WebKit::PageClientImpl::viewLayerHostingMode):
      * UIProcess/DrawingAreaProxy.h:
      (WebKit::DrawingAreaProxy::layerHostingModeDidChange):
      * UIProcess/PageClient.h:
      (WebKit::PageClient::viewLayerHostingMode):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::updateViewState):
      (WebKit::WebPageProxy::viewStateDidChange):
      (WebKit::WebPageProxy::initializeCreationParameters):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::layerHostingMode):
      * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
      * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
      (WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::resumePainting):
      (WebKit::DrawingArea::setLayerHostingMode):
      * WebProcess/WebPage/DrawingArea.messages.in:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::~WebPage):
      (WebKit::WebPage::scalePage):
      (WebKit::WebPage::setDeviceScaleFactor):
      (WebKit::WebPage::setActive):
      (WebKit::WebPage::setViewState):
      (WebKit::WebPage::setWindowIsVisible):
      (WebKit::WebPage::windowAndViewFramesChanged):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::layerHostingMode):
      * WebProcess/WebPage/ios/WebPageIOS.mm:
      (WebKit::WebPage::setLayerHostingMode):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::sendComplexTextInputToPlugin):
      (WebKit::WebPage::setLayerHostingMode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d105f9dc
    • barraclough@apple.com's avatar
      Add layer hosting mode to ViewState · aeaa0987
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125803
      
      Reviewed by Anders Carlsson.
      
      When the view state of the page is updated the layer mode may also
      change. Currently this is passed by a separate message, remove this
      and fold it into ViewState.
              
      Previously the setLayerHostingMode message would be passed to the
      DrawingArea, which would inform the WebPage. Since the WebPage is
      passed the SetVisibilityState messgae reverse this.
      
      WebPageProxy had a policy of only updating the hosting mode when
      visible - the value is sticky whilst the view is not visible. Make
      this policy explicit in the PageClientImpl, rather then implicit
      from the flow control.
      
      * Shared/ViewState.h:
          - Added ViewState::IsLayerWindowServerHosted.
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
          - removed layerHostingMode.
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::PageClientImpl):
      (WebKit::PageClientImpl::isLayerWindowServerHosted):
      (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
          - viewLayerHostingMode -> isLayerWindowServerHosted, added m_layerHostingMode.
      * UIProcess/DrawingAreaProxy.h:
          - removed layerHostingModeDidChange.
      * UIProcess/PageClient.h:
          - viewLayerHostingMode -> isLayerWindowServerHosted.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
          - removed m_layerHostingMode.
      (WebKit::WebPageProxy::updateViewState):
          - added IsLayerWindowServerHosted.
      (WebKit::WebPageProxy::viewStateDidChange):
          - changes to ViewState::IsInWindow implies ViewState::IsLayerWindowServerHosted may change too.
          - remove special handling (separate message) for LayerHostingMode.
      (WebKit::WebPageProxy::initializeCreationParameters):
          - removed m_layerHostingMode.
      * UIProcess/WebPageProxy.h:
          - removed m_layerHostingMode.
      * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
      * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
          - removed layerHostingModeDidChange.
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::setLayerHostingMode):
      (WebKit::DrawingArea::didUpdate):
          - setLayerHostingMode takes a LayerHostingMode.
      * WebProcess/WebPage/DrawingArea.messages.in:
          - SetLayerHostingMode is no longer a message.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
          - removed m_layerHostingMode.
      (WebKit::WebPage::setViewState):
          - handle ViewState::IsLayerWindowServerHosted.
      (WebKit::WebPage::setLayerHostingMode):
          - moved from ~Mac.mm (matching other ViewState setters), calls to DrawingArea.
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::layerHostingMode):
          - layerHostingMode queries m_viewState, removed m_layerHostingMode.
      * WebProcess/WebPage/ios/WebPageIOS.mm:
          - removed setLayerHostingMode.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
          - setLayerHostingMode takes a LayerHostingMode, WebPage now calls to DrawingArea.
      * WebProcess/WebPage/mac/WebPageMac.mm:
          - removed setLayerHostingMode.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aeaa0987
  6. 31 Oct, 2013 1 commit
    • barraclough@apple.com's avatar
      Change WebPage, WebPageProxy, WebPageCreationParameters to use ViewState · 1355a70a
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123379
      
      Reviewed by Darin Adler.
      
      Visibility state of the Page should be stored and communicated consistently.
      
      Remove individual visibility flags from WebPageProxy, WebPageCreationParameters,
      and replace them with a ViewState, and add a ViewState member to WebPage.
      Merge together all messages that convey and individual aspect of the ViewState.
      
      Restructure WebPageProxy::viewStateDidChange to break the operation down into
      three steps: 1) update m_viewState, 2) send the new ViewState to the WebProcess,
      and 3) perform any further work necessary in the UIProcess.
      
      This patch fixes a problem that if the web process crashes m_isVisible &
      m_isInWindow in WebPageProxy were not updated, and could have held stale values
      on reattach.
      
      In WebPage, add a new message to update the entire ViewState - diff the prior
      value against the new one to detect changes, call existing methods accordingly.
      
      * Shared/ViewState.h:
          - Add constants 'Reset', 'AllFlags'
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
          - Removed boolean visibility flags, added viewState.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
          - Constructor calls updateViewState to initialize m_viewState.
      (WebKit::WebPageProxy::reattachToWebProcess):
          - ViewStaet is not updated while detatched; recalculate.
      (WebKit::WebPageProxy::initializeWebPage):
          - m_isVisible -> isViewVisible()
      (WebKit::WebPageProxy::updateViewState):
          - Added, update m_viewState by querying the page client.
      (WebKit::WebPageProxy::viewStateDidChange):
          - Restructured to use m_viewState, reordered to combine messages.
      (WebKit::WebPageProxy::creationParameters):
          - Removed boolean visibility flags, added viewState.
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::isInWindow):
      (WebKit::WebPageProxy::isViewVisible):
          - Removed boolean visibility flags, added viewState.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
          - initial state now passed as a ViewState.
      (WebKit::WebPage::setIsInWindow):
          - Remove code to send reply (this is handled by setViewState).
      (WebKit::WebPage::setViewState):
          - Set m_viewState - diff from prior & call methods to update.
      * WebProcess/WebPage/WebPage.h:
          - Added setViewState, m_viewState.
      * WebProcess/WebPage/WebPage.messages.in:
          - Add SetViewState, remove individual messages.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
          - initial state now passed as a ViewState.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1355a70a
  7. 25 Oct, 2013 1 commit
    • barraclough@apple.com's avatar
      Move ViewStateFlags out of WebPageProxy · 57f29d1c
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=123323
      
      Reviewed by Sam Weinig.
      
      WebPageProxy contains an enum and typedef that provide a bitfield
      of flags describing the visibility of the view containing the page.
      We're going to want to use this bitfield in a message to the
      WebProcess, so moving out from the UIProcess to shared code.
      Creating struct 'ViewState' to scope the enum and typedef.
      Renamed ViewStateFlags to ViewState::Flags, and removed redundant
      'View' from enum entries.
      
      * Shared/ViewState.h: Added.
      * UIProcess/API/mac/WKView.mm:
      (-[WKView becomeFirstResponder]):
      (-[WKView resignFirstResponder]):
      (-[WKView viewDidMoveToWindow]):
      (-[WKView _windowDidBecomeKey:]):
      (-[WKView _windowDidResignKey:]):
      (-[WKView _windowDidMiniaturize:]):
      (-[WKView _windowDidDeminiaturize:]):
      (-[WKView _windowDidOrderOffScreen:]):
      (-[WKView _windowDidOrderOnScreen:]):
      (-[WKView _windowDidChangeOcclusionState:]):
      (-[WKView viewDidHide]):
      (-[WKView viewDidUnhide]):
      (-[WKView _activeSpaceDidChange:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::viewStateDidChange):
      * UIProcess/WebPageProxy.h:
      * WebKit2.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      57f29d1c
  8. 06 Aug, 2013 1 commit
    • mrowe@apple.com's avatar
      Logging should be configurable using human-readable channel names rather than crazy bitmasks · e6021b96
      mrowe@apple.com authored
      <http://webkit.org/b/119031>
      
      Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
      and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
      
      Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
      "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
      being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
      for history and loading being enabled.
      
      For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
      the old user defaults to remain set for those people that need to switch between version of WebKit before and
      after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
      the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
      
      For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
      consistency with the other platforms and to enable more code sharing.
      
      While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
      adding a new logging channel. Now only the header in the relevant project needs to be updated.
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      * GNUmakefile.list.am: Remove the now-unused InitializeLogging.h
      * Target.pri: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * platform/InitializeLogging.h: Removed. Ditto.
      * platform/Logging.cpp: Use WEBCORE_LOG_CHANNELS to define all of the channels.
      (WebCore::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
      to find a log channel rather than repeating the names of the log channels a further two times each.
      (WebCore::initializeLoggingChannelsIfNecessary): Pass the channels and the log level string to the new
      WTF function that handles the initialization.
      * platform/Logging.h: Declare a WEBCORE_LOG_CHANNELS macro that can be used to apply a preprocessor macro
      across the set of all logging channels. Use this macro to declare the logging channels.
      * platform/blackberry/LoggingBlackBerry.cpp:
      (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
      * platform/efl/LoggingEfl.cpp:
      (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
      NotYetImplemented to it so that that channel will be enabled by default.
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
      (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Accommodate the rename to logChannelByName.
      * platform/gtk/LoggingGtk.cpp:
      (WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
      NotYetImplemented to it so that that channel will be enabled by default.
      * platform/mac/LoggingMac.mm:
      (WebCore::logLevelString): Pull the value out of the WebCoreLogging user default key.
      * platform/qt/LoggingQt.cpp:
      (WebCore::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable, and then prepend
      NotYetImplemented to it so that the channel will be enabled by default.
      * platform/win/LoggingWin.cpp:
      (WebCore::logLevelString): Pull the value out of the WebCoreLogging environment variable.
      
      Source/WebKit/blackberry:
      
      * Api/BlackBerryGlobal.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WebKit/efl:
      
      * ewk/ewk_main.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WebKit/gtk:
      
      * webkit/webkitglobals.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WebKit/mac:
      
      * Misc/WebKitLogging.h: Declare a WEBKIT_LOG_CHANNELS macro that can be used to apply a preprocessor macro
      across the set of all logging channels. Use this macro to declare the logging channels.
      * Misc/WebKitLogging.m: Use WEBKIT_LOG_CHANNELS to define all of the channels. Pass the channels and the
      preference value to the new WTF function that handles the initialization.
      * WebView/WebPreferenceKeysPrivate.h: Remove a key that does not need to be here.
      * WebView/WebView.mm: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WebKit/qt:
      
      * WebCoreSupport/InitWebCoreQt.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WebKit/win:
      
      * WebKitLogging.cpp: Declare a WEBKIT_LOG_CHANNELS macro that can be used to apply a preprocessor macro across
      the set of all logging channels. Use this macro to declare the logging channels.
      * WebKitLogging.h: Use WEBKIT_LOG_CHANNELS to define all of the channels. Pass the channels to the new WTF
      function that handles the initialization. As per the previous implementation a developer needs to hard-code
      their desired log level here.
      * WebView.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WebKit2:
      
      * NetworkProcess/NetworkProcess.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      * Platform/Logging.cpp: Use WEBKIT2_LOG_CHANNELS to define all of the channels.
      (WebKit::initializeLogChannelsIfNecessary): Pass the channels and the log level string to the new WTF function
      that handles the initialization.
      (WebKit::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
      to find a log channel rather than repeating the names of the log channels a further two times each.
      (WebKit::logLevelString): Provide a no-op implementation.
      * Platform/Logging.h: Declare a WEBKIT2_LOG_CHANNELS macro that can be used to apply a preprocessor macro
      across the set of all logging channels. Use this macro to declare the logging channels.
      * Platform/efl/LoggingEfl.cpp:
      (WebKit::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
      * Platform/gtk/LoggingGtk.cpp:
      (WebKit::logLevelString): Ditto.
      * Platform/mac/Logging.mac.mm:
      (WebKit::logLevelString): Pull the value out of the WebKit2Logging user default key.
      * Platform/qt/LoggingQt.cpp:
      (WebKit::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable.
      * Shared/WebKit2Initialize.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      * UIProcess/WebContext.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
      
      Source/WTF:
      
      * wtf/Assertions.cpp:
      (WTFLogChannelByName): Iterate over the provided array of log channels, returning the first whose name
      matches case-insensitively.
      (setStateOfAllChannels): Helper function to set the state of all channels to a single value.
      (WTFInitializeLogChannelStatesFromString): Parse a string containing a case-insensitive, comma-separated list
      of channel names to enable or disable, with the latter being prefixed by a "-".
      * wtf/Assertions.h: Update the layout of WTFLogChannel to include only the state of the channel and its name.
      Declare WTFLogChannelByName and WTFInitializeLogChannelStatesFromString.
      * wtf/RefCountedLeakCounter.cpp: Update to the new format of WTFLogChannel.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6021b96
  9. 14 Sep, 2012 1 commit
  10. 02 Jul, 2012 1 commit
    • benjamin@webkit.org's avatar
      Do not do any logging initialization when logging is disabled · f3869e43
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90228
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-07-02
      Reviewed by Simon Fraser.
      
      Source/WebCore: 
      
      Initializating of the logging channels was taking time on startup. When logging is disabled
      (and the LOG macro does nothing), we should aslo disable logging channels and initialization.
      
      This patch #ifdef the Logging initialization with the macro LOG_DISABLED.
      
      * WebCore.exp.in:
      * make-export-file-generator: Explicitely adds Assertions.h so that LOG_DISABLED is defined.
      * platform/Logging.cpp:
      * platform/Logging.h:
      * platform/blackberry/LoggingBlackBerry.cpp:
      * platform/efl/LoggingEfl.cpp:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/gtk/LoggingGtk.cpp:
      * platform/mac/LoggingMac.mm:
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore::ensureSessionIsInitialized):
      * platform/qt/LoggingQt.cpp:
      * platform/win/LoggingWin.cpp:
      * platform/wx/LoggingWx.cpp:
      
      Source/WebKit/blackberry: 
      
      * Api/BlackBerryGlobal.cpp:
      (BlackBerry::WebKit::globalInitialize):
      
      Source/WebKit/chromium: 
      
      * src/WebKit.cpp:
      (WebKit::enableLogChannel):
      
      Source/WebKit/efl: 
      
      * ewk/ewk_main.cpp:
      (_ewk_init_body):
      
      Source/WebKit/gtk: 
      
      * webkit/webkitglobals.cpp:
      (webkitInit):
      
      Source/WebKit/mac: 
      
      * Misc/WebIconDatabase.mm:
      (-[WebIconDatabase _scaleIcon:toSize:]):
      * Misc/WebKitLogging.h:
      * Misc/WebKitLogging.m:
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _attributeStringFromDOMRange:]):
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:]):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/InitWebCoreQt.cpp:
      (WebCore::initializeWebCoreQt):
      
      Source/WebKit/win: 
      
      * WebView.cpp:
      (WebView::initWithFrame):
      
      Source/WebKit/wx: 
      
      * WebView.cpp:
      (WebKit::WebView::Create):
      
      Source/WebKit2: 
      
      * Platform/Logging.cpp:
      * Platform/Logging.h:
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::WebProcess):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3869e43
  11. 05 Jun, 2012 1 commit
  12. 19 Jul, 2011 2 commits
  13. 27 May, 2011 1 commit
    • jeffm@apple.com's avatar
      2011-05-26 Jeff Miller <jeffm@apple.com> · f7a278d1
      jeffm@apple.com authored
              Reviewed by Alexey Proskuryakov.
      
              Add a key handling logging channel for WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=61588
              
              Added a new LogKeyHandling channel, and logged some key events in WebPageProxy.
              I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp.
      
              * Platform/Logging.cpp:
              (WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel.
              * Platform/Logging.h: Added LogKeyHandling channel.
      
              * UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment.
              (WebKit::webKeyboardEventTypeString): Added to support logging.
              (WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event.
              (WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f7a278d1
  14. 24 Mar, 2011 1 commit
    • beidson@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=57058 · 3b040610
      beidson@apple.com authored
      Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
      
      Reviewed by Sam Weinig.
      
      ../WebCore: 
      
      * loader/icon/IconDatabase.cpp:
      (WebCore::IconDatabase::synchronousLoadDecisionForIconURL): Only add the DocumentLoader to the set if it's non-zero.
      (WebCore::IconDatabase::IconDatabase): Add more logging.
      (WebCore::IconDatabase::performURLImport): Dispatch the "didFinishURLImport" client callback using the following 3 methods.
      (WebCore::FinishedURLImport::FinishedURLImport):
      (WebCore::FinishedURLImport::performWork):
      (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread):
      
      * loader/icon/IconDatabase.h:
      (WebCore::IconDatabase::create): Expose a PassOwnPtr<> creator.
      
      * WebCore.exp.in:
      
      ../WebKit2: 
      
      * UIProcess/WebIconDatabase.cpp:
      (WebKit::WebIconDatabase::WebIconDatabase):
      (WebKit::WebIconDatabase::setDatabasePath): Create a new WebCore::IconDatabase and open it to this path.
      (WebKit::WebIconDatabase::retainIconForPageURL): Actually retain the url, using the impl.
      (WebKit::WebIconDatabase::releaseIconForPageURL): Actually release the url, using the impl.
      (WebKit::WebIconDatabase::setIconURLForPageURL): Actually set the url, using the impl.
      (WebKit::WebIconDatabase::setIconDataForIconURL): Actually set the data, using the impl.
      (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Actually ask for a load decision to call back with.
      (WebKit::WebIconDatabase::performImport):
      (WebKit::WebIconDatabase::didImportIconURLForPageURL):
      (WebKit::WebIconDatabase::didImportIconDataForPageURL):
      (WebKit::WebIconDatabase::didChangeIconForPageURL):
      (WebKit::WebIconDatabase::didRemoveAllIcons):
      (WebKit::WebIconDatabase::didFinishURLImport): Notify all the pending callbacks what their load decisions
        are now that they're available.
      * UIProcess/WebIconDatabase.h:
      
      Add an IconDatabase logging channel:
      * Platform/Logging.cpp:
      (WebKit::initializeLogChannelsIfNecessary):
      * Platform/Logging.h:
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly
        opening it.
      * UIProcess/WebContext.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b040610
  15. 22 Mar, 2011 1 commit
  16. 17 Jan, 2011 1 commit
  17. 15 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move WebKit2 into Source · be159d97
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=52438
      
      Rubber-stamped by Eric Seidel.
      
      .: 
      
      Update reference to WebKit2.
      
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * Source/cmake/WebKitPackaging.cmake:
      * WebKit.pro:
      * configure.ac:
      
      Source/WebCore: 
      
      * WebCore.pro:
      
      Source/WebKit2: 
      
      * DerivedSources.pro:
      * GNUmakefile.am:
      * WebKit2.pro:
      * WebProcess.pro:
      * win/WebKit2.vcproj:
      * win/WebKit2WebProcess.vcproj:
      
      Tools: 
      
      * MiniBrowser/qt/MiniBrowser.pro:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/test-webkitpy:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/style/checker.py:
      * WebKitTestRunner/DerivedSources.pro:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      
      WebKit/win: 
      
      Update reference to WebKit2.
      
      * WebKit.vcproj/WebKit.sln:
      
      Websites/bugs.webkit.org: 
      
      Remove WebKit2 from the list of top-level source directories.
      
      * PrettyPatch/PrettyPatch.rb:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be159d97
  18. 10 Dec, 2010 1 commit
    • enrica@apple.com's avatar
      WebCore: Implement IME support for Mac. · f6768536
      enrica@apple.com authored
      <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
      https://bugs.webkit.org/show_bug.cgi?id=50788
      
      Reviewed by Alexey Proskuryakov.
      
      * dom/KeyboardEvent.h:
      (WebCore::KeypressCommand::KeypressCommand): Removed ASSERT in constructor,
      since it is now used for more than one command.
      
      WebKit2: Implement IME support for Mac.
      <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
      https://bugs.webkit.org/show_bug.cgi?id=50788
                  
      Reviewed by Alexey Proskuryakov.
      
      This patch addes support for input methods in WebKit2.
      In order to support IME, it was necessary to add synchronous calls from the UIProcess
      to the WebProcess. These calls all have a timeout of 1 second.
      The current implementation still uses the NSTextInput protocol, but the plan is to move
      to the NSTextInputClient protocol. This has not been done yet for ease of comparison with
      WebKit. attributedSubstringFromRange is the only method that has not been implemented, because
      I have not yet decided what is the best way to send an NSAttributedString across the process
      boundary.
      
      * Platform/CoreIPC/HandleMessage.h:
      (CoreIPC::callMemberFunction): Added template for member function.
      with four reply arguments.
      * Scripts/webkit2/messages.py: Added CompositionUnderline and relevant header.
      * Shared/WebCoreArgumentCoders.h:
      (CoreIPC::): Added encoder/decoder for CompositionUnderline.
      * UIProcess/API/mac/PageClientImpl.h: Added parameters to interceptKeyEvent and selectionChanged.
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::selectionChanged): Added parameters.
      (WebKit::PageClientImpl::interceptKeyEvent): Added parameters.
      * UIProcess/API/mac/WKView.mm:
      (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): Added initialization of new private members.
      (-[WKView insertText:]):
      (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:range:]): Added parameters.
      (-[WKView _interceptKeyEvent:hasComposition:start:end:lines:WebCore::]): Added parameters.
      (-[WKView keyDown:]): Modified to reset state on each keyDown.
      (-[WKView selectedRange]): Added.
      (-[WKView hasMarkedText]): Added.
      (-[WKView unmarkText]): Added.
      (-[WKView validAttributesForMarkedText]): Added.
      (extractUnderlines): Added.
      (-[WKView setMarkedText:selectedRange:]): Added.
      (-[WKView markedRange]): Added.
      (-[WKView attributedSubstringFromRange:]): Added.
      (-[WKView characterIndexForPoint:]): Added.
      (-[WKView firstRectForCharacterRange:]): Added.
      (-[WKView conversationIdentifier]): Added.
      * UIProcess/API/mac/WKViewInternal.h: Added parameters to _interceptKeyEvent and _selectionChanged.
      * UIProcess/PageClient.h: Added parameters to interpretKeyEvent and selectionChanged.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::getMarkedRange): Added.
      (WebKit::WebPageProxy::characterIndexForPoint): Added.
      (WebKit::WebPageProxy::firstRectForCharacterRange): Added.
      (WebKit::WebPageProxy::interpretKeyEvent): Additional parameters.
      (WebKit::WebPageProxy::didSelectionChange): Additional parameters for Mac platform.
      * UIProcess/WebPageProxy.h: Added new methods and parameters to didSelectionChange
      and interpretKeyEvent.
      * UIProcess/WebPageProxy.messages.in: Added parameters to interpretKeyEvent and selectionChanged messages.
      * UIProcess/WebProcessProxy.h:
      (WebKit::WebProcessProxy::sendSync): Added support for synchronous messages.
      The default timeout is 1 second.
      * WebProcess/WebCoreSupport/WebEditorClient.cpp: respondToChangedSelection is now
      only for non Mac platform.
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
      (WebKit::WebEditorClient::respondToChangedSelection): Added implementation for Mac platform.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::didReceiveSyncMessage): Added.
      * WebProcess/WebPage/WebPage.h: Added new methods and support for synchronous messages.
      * WebProcess/WebPage/WebPage.messages.in: Added new messages.
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::interceptEditingKeyboardEvent): Added parameters.
      (WebKit::WebPage::convertRangeToPlatformRange): Added.
      (WebKit::WebPage::getMarkedRange): Added.
      (WebKit::characterRangeAtPoint): Added.
      (WebKit::WebPage::characterIndexForPoint): Added.
      (WebKit::convertToRange): Added.
      (WebKit::WebPage::firstRectForCharacterRange): Added.
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::didReceiveSyncMessage): Added.
      * WebProcess/WebProcess.h: Added didReceiveSyncMessage.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6768536
  19. 09 Nov, 2010 1 commit
    • 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
  20. 07 Oct, 2010 2 commits
  21. 27 Sep, 2010 1 commit
    • weinig@apple.com's avatar
      Move shared WebKit2 API (used by both bundle and main API) to WebKit2/Shared/API · e7ef4326
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=46587
      
      Reviewed by Anders Carlsson.
      
      WebKit2: 
      
      - Moves shared types (WKArrayRef, WKDictionaryRef, etc) to Shared/API/c.
      - Removes WKBundleBase.h and moves all opaque type declarations to WKBase.h (which
        moves to Shared/API/c).
      - Adds WKSharedAPICast.h which includes shared API casting logic and is included
        by both WKAPICast.h and WKBundleAPICast.h now. Moved to using macros for API 
        mappings to reduce verbosity.
      - Move windows c API files from UIProcess/API/win to UIProcess/API/C/win.
      
      * Shared/API: Added.
      * Shared/API/c: Added.
      * Shared/API/c/WKArray.cpp: Copied from UIProcess/API/C/WKArray.cpp.
      * Shared/API/c/WKArray.h: Copied from UIProcess/API/C/WKArray.h.
      * Shared/API/c/WKBase.h: Copied from UIProcess/API/C/WKBase.h.
      * Shared/API/c/WKCertificateInfo.cpp: Copied from UIProcess/API/C/WKCertificateInfo.cpp.
      * Shared/API/c/WKCertificateInfo.h: Copied from UIProcess/API/C/WKCertificateInfo.h.
      * Shared/API/c/WKData.cpp: Copied from UIProcess/API/C/WKData.cpp.
      * Shared/API/c/WKData.h: Copied from UIProcess/API/C/WKData.h.
      * Shared/API/c/WKDictionary.cpp: Copied from UIProcess/API/C/WKDictionary.cpp.
      * Shared/API/c/WKDictionary.h: Copied from UIProcess/API/C/WKDictionary.h.
      * Shared/API/c/WKError.cpp: Copied from UIProcess/API/C/WKError.cpp.
      * Shared/API/c/WKError.h: Copied from UIProcess/API/C/WKError.h.
      * Shared/API/c/WKMutableArray.cpp: Copied from UIProcess/API/C/WKMutableArray.cpp.
      * Shared/API/c/WKMutableArray.h: Copied from UIProcess/API/C/WKMutableArray.h.
      * Shared/API/c/WKMutableDictionary.cpp: Copied from UIProcess/API/C/WKMutableDictionary.cpp.
      * Shared/API/c/WKMutableDictionary.h: Copied from UIProcess/API/C/WKMutableDictionary.h.
      * Shared/API/c/WKNumber.cpp: Copied from UIProcess/API/C/WKNumber.cpp.
      * Shared/API/c/WKNumber.h: Copied from UIProcess/API/C/WKNumber.h.
      * Shared/API/c/WKSerializedScriptValue.cpp: Copied from UIProcess/API/C/WKSerializedScriptValue.cpp.
      * Shared/API/c/WKSerializedScriptValue.h: Copied from UIProcess/API/C/WKSerializedScriptValue.h.
      * Shared/API/c/WKSharedAPICast.h: Copied from UIProcess/API/C/WKAPICast.h.
      * Shared/API/c/WKString.cpp: Copied from UIProcess/API/C/WKString.cpp.
      * Shared/API/c/WKString.h: Copied from UIProcess/API/C/WKString.h.
      * Shared/API/c/WKType.cpp: Copied from UIProcess/API/C/WKType.cpp.
      * Shared/API/c/WKType.h: Copied from UIProcess/API/C/WKType.h.
      * Shared/API/c/WKURL.cpp: Copied from UIProcess/API/C/WKURL.cpp.
      * Shared/API/c/WKURL.h: Copied from UIProcess/API/C/WKURL.h.
      * Shared/API/c/WKURLRequest.cpp: Copied from UIProcess/API/C/WKURLRequest.cpp.
      * Shared/API/c/WKURLRequest.h: Copied from UIProcess/API/C/WKURLRequest.h.
      * Shared/API/c/WKURLResponse.cpp: Copied from UIProcess/API/C/WKURLResponse.cpp.
      * Shared/API/c/WKURLResponse.h: Copied from UIProcess/API/C/WKURLResponse.h.
      * Shared/API/c/cf: Copied from UIProcess/API/C/cf.
      * Shared/API/c/mac: Copied from UIProcess/API/C/mac.
      * Shared/API/c/win: Added.
      * Shared/API/c/win/WKBaseWin.h: Copied from UIProcess/API/win/WKBaseWin.h.
      * Shared/API/c/win/WKCertificateInfoWin.cpp: Copied from UIProcess/API/C/win/WKCertificateInfoWin.cpp.
      * Shared/API/c/win/WKCertificateInfoWin.h: Copied from UIProcess/API/C/win/WKCertificateInfoWin.h.
      * UIProcess/API/C/WKAPICast.h: Replaced.
      * UIProcess/API/C/WKArray.cpp: Removed.
      * UIProcess/API/C/WKArray.h: Removed.
      * UIProcess/API/C/WKBase.h: Removed.
      * UIProcess/API/C/WKCertificateInfo.cpp: Removed.
      * UIProcess/API/C/WKCertificateInfo.h: Removed.
      * UIProcess/API/C/WKData.cpp: Removed.
      * UIProcess/API/C/WKData.h: Removed.
      * UIProcess/API/C/WKDictionary.cpp: Removed.
      * UIProcess/API/C/WKDictionary.h: Removed.
      * UIProcess/API/C/WKError.cpp: Removed.
      * UIProcess/API/C/WKError.h: Removed.
      * UIProcess/API/C/WKMutableArray.cpp: Removed.
      * UIProcess/API/C/WKMutableArray.h: Removed.
      * UIProcess/API/C/WKMutableDictionary.cpp: Removed.
      * UIProcess/API/C/WKMutableDictionary.h: Removed.
      * UIProcess/API/C/WKNumber.cpp: Removed.
      * UIProcess/API/C/WKNumber.h: Removed.
      * UIProcess/API/C/WKSerializedScriptValue.cpp: Removed.
      * UIProcess/API/C/WKSerializedScriptValue.h: Removed.
      * UIProcess/API/C/WKString.cpp: Removed.
      * UIProcess/API/C/WKString.h: Removed.
      * UIProcess/API/C/WKType.cpp: Removed.
      * UIProcess/API/C/WKType.h: Removed.
      * UIProcess/API/C/WKURL.cpp: Removed.
      * UIProcess/API/C/WKURL.h: Removed.
      * UIProcess/API/C/WKURLRequest.cpp: Removed.
      * UIProcess/API/C/WKURLRequest.h: Removed.
      * UIProcess/API/C/WKURLResponse.cpp: Removed.
      * UIProcess/API/C/WKURLResponse.h: Removed.
      * UIProcess/API/C/cf: Removed.
      * UIProcess/API/C/cf/WKStringCF.cpp: Removed.
      * UIProcess/API/C/cf/WKStringCF.h: Removed.
      * UIProcess/API/C/cf/WKURLCF.cpp: Removed.
      * UIProcess/API/C/cf/WKURLCF.h: Removed.
      * UIProcess/API/C/cf/WKURLRequestCF.cpp: Removed.
      * UIProcess/API/C/cf/WKURLRequestCF.h: Removed.
      * UIProcess/API/C/cf/WKURLResponseCF.cpp: Removed.
      * UIProcess/API/C/cf/WKURLResponseCF.h: Removed.
      * UIProcess/API/C/mac: Removed.
      * UIProcess/API/C/mac/WKCertificateInfoMac.h: Removed.
      * UIProcess/API/C/mac/WKCertificateInfoMac.mm: Removed.
      * UIProcess/API/C/mac/WKURLRequestNS.h: Removed.
      * UIProcess/API/C/mac/WKURLRequestNS.mm: Removed.
      * UIProcess/API/C/mac/WKURLResponseNS.h: Removed.
      * UIProcess/API/C/mac/WKURLResponseNS.mm: Removed.
      * UIProcess/API/C/win/WKAPICastWin.h: Copied from UIProcess/API/win/WKAPICastWin.h.
      * UIProcess/API/C/win/WKBaseWin.h: Copied from UIProcess/API/win/WKBaseWin.h.
      * UIProcess/API/C/win/WKCertificateInfoWin.cpp: Removed.
      * UIProcess/API/C/win/WKCertificateInfoWin.h: Removed.
      * UIProcess/API/C/win/WKView.cpp: Copied from UIProcess/API/win/WKView.cpp.
      * UIProcess/API/C/win/WKView.h: Copied from UIProcess/API/win/WKView.h.
      * UIProcess/API/win: Removed.
      * UIProcess/API/win/WKAPICastWin.h: Removed.
      * UIProcess/API/win/WKBaseWin.h: Removed.
      * UIProcess/API/win/WKView.cpp: Removed.
      * UIProcess/API/win/WKView.h: Removed.
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/InjectedBundle/API/c/WKBundle.h:
      * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
      * WebProcess/InjectedBundle/API/c/WKBundleBase.h: Removed.
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
      * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
      * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
      * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
      * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
      * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h:
      * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      
      WebKitTools: 
      
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7ef4326
  22. 24 Sep, 2010 1 commit
  23. 18 Sep, 2010 1 commit
    • weinig@apple.com's avatar
      Make certificate data available to the WKFrameRef after it is committed · c368c886
      weinig@apple.com authored
      Part of <rdar://problem/8350189>
      https://bugs.webkit.org/show_bug.cgi?id=45998
      
      Reviewed by Anders Carlsson.
      
      * Shared/APIObject.h:
      Add new type.
      
      * Shared/WebCertificateInfo.h: Added.
      (WebKit::WebCertificateInfo::create):
      (WebKit::WebCertificateInfo::platformCertificateInfo):
      (WebKit::WebCertificateInfo::WebCertificateInfo):
      (WebKit::WebCertificateInfo::type):
      Add API type for vending.
      
      * Shared/mac/PlatformCertificateInfo.h: Added.
      (WebKit::PlatformCertificateInfo::peerCertificates):
      * Shared/mac/PlatformCertificateInfo.mm: Added.
      (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
      (WebKit::PlatformCertificateInfo::encode):
      (WebKit::PlatformCertificateInfo::decode):
      (WebKit::PlatformCertificateInfo::dump):
      * Shared/qt/PlatformCertificateInfo.h: Added.
      (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
      (WebKit::PlatformCertificateInfo::encode):
      (WebKit::PlatformCertificateInfo::decode):
      * Shared/win/PlatformCertificateInfo.h: Added.
      (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
      (WebKit::PlatformCertificateInfo::encode):
      (WebKit::PlatformCertificateInfo::decode):
      Add platform specific holder for certificate data and encode/decode functions
      to send it over the wire. Right now, this only implemented for the mac.
      
      * UIProcess/API/C/WKAPICast.h:
      * UIProcess/API/C/WKBase.h:
      * UIProcess/API/C/WKCertificateInfo.cpp: Added.
      (WKCertificateInfoGetTypeID):
      * UIProcess/API/C/WKCertificateInfo.h: Added.
      Add wrapper for WebCertificateInfo.
      
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameGetCertificateInfo):
      * UIProcess/API/C/WKFrame.h:
      Add getter for a WKCertificateInfo.
      
      * UIProcess/API/C/mac/WKCertificateInfoMac.h: Added.
      * UIProcess/API/C/mac/WKCertificateInfoMac.mm: Added.
      (WKCertificateInfoGetPeerCertificates):
      Add mac specific getters for the platform specific certificate
      data.
      
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::setCertificateInfo):
      * UIProcess/WebFrameProxy.h:
      (WebKit::WebFrameProxy::certificateInfo):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didReceiveMessage):
      (WebKit::WebPageProxy::didCommitLoadForFrame):
      * UIProcess/WebPageProxy.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      Pipe the certificate info through to the WebFrameProxy on
      commit.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c368c886
  24. 22 Aug, 2010 1 commit
    • weinig@apple.com's avatar
      Remove specialized retain/release functions in favor of a single one for WKTypeRefs · 61512437
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=44386
      
      Reviewed by Dan Bernstein.
      
      WebKit2: 
      
      * UIProcess/API/C/WKArray.cpp:
      (WKArrayGetSize):
      * UIProcess/API/C/WKArray.h:
      * UIProcess/API/C/WKBackForwardList.cpp:
      (WKBackForwardListCopyForwardListWithLimit):
      * UIProcess/API/C/WKBackForwardList.h:
      * UIProcess/API/C/WKBackForwardListItem.cpp:
      (WKBackForwardListItemCopyTitle):
      * UIProcess/API/C/WKBackForwardListItem.h:
      * UIProcess/API/C/WKBase.h:
      * UIProcess/API/C/WKContext.cpp:
      * UIProcess/API/C/WKContext.h:
      * UIProcess/API/C/WKData.cpp:
      (WKDataGetSize):
      * UIProcess/API/C/WKData.h:
      * UIProcess/API/C/WKDictionary.cpp:
      (WKDictionaryCopyKeys):
      * UIProcess/API/C/WKDictionary.h:
      * UIProcess/API/C/WKError.h:
      * UIProcess/API/C/WKFormSubmissionListener.cpp:
      (WKFormSubmissionListenerContinue):
      * UIProcess/API/C/WKFormSubmissionListener.h:
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameGetPage):
      * UIProcess/API/C/WKFrame.h:
      * UIProcess/API/C/WKFramePolicyListener.cpp:
      (WKFramePolicyListenerIgnore):
      * UIProcess/API/C/WKFramePolicyListener.h:
      * UIProcess/API/C/WKNavigationData.cpp:
      (WKNavigationDataCopyURL):
      * UIProcess/API/C/WKNavigationData.h:
      * UIProcess/API/C/WKPage.cpp:
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/C/WKPageNamespace.cpp:
      (WKPageNamespaceGetContext):
      * UIProcess/API/C/WKPageNamespace.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesCreate):
      (WKPreferencesGetLocalStorageEnabled):
      * UIProcess/API/C/WKPreferences.h:
      * UIProcess/API/C/WKString.cpp:
      * UIProcess/API/C/WKString.h:
      * UIProcess/API/C/WKType.cpp:
      (WKRetain):
      (WKRelease):
      * UIProcess/API/C/WKType.h:
      * UIProcess/API/C/WKURL.cpp:
      (WKURLGetTypeID):
      * UIProcess/API/C/WKURL.h:
      * UIProcess/API/cpp/WKRetainPtr.h:
      * UIProcess/API/win/WKView.cpp:
      * UIProcess/API/win/WKView.h:
      * UIProcess/WebPreferences.cpp:
      (WebKit::WebPreferences::shared):
      * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
      (WKBundleNodeHandleGetTypeID):
      * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
      * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
      (WKBundleScriptWorldNormalWorld):
      * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
      
      WebKitTools: 
      
      * MiniBrowser/mac/AppDelegate.m:
      (didRecieveMessageFromInjectedBundle):
      (didNavigateWithNavigationData):
      (-[BrowserAppDelegate init]):
      (-[BrowserAppDelegate applicationWillTerminate:]):
      * MiniBrowser/mac/BrowserStatisticsWindowController.m:
      (-[BrowserStatisticsWindowController initWithThreadedWKContextRef:processWKContextRef:]):
      (-[BrowserStatisticsWindowController dealloc]):
      * MiniBrowser/mac/BrowserWindowController.m:
      (-[BrowserWindowController initWithPageNamespace:]):
      (-[BrowserWindowController fetch:]):
      (-[BrowserWindowController windowWillClose:]):
      (-[BrowserWindowController applicationTerminating]):
      (closePage):
      (runJavaScriptAlert):
      (runJavaScriptConfirm):
      (runJavaScriptPrompt):
      (-[BrowserWindowController updateProvisionalURLForFrame:]):
      * MiniBrowser/mac/WebBundle/WebBundleMain.m:
      (didClearWindowObjectForFrame):
      * MiniBrowser/win/BrowserView.cpp:
      (BrowserView::goToURL):
      * WebKitTestRunner/win/PlatformWebViewWin.cpp:
      (WTR::PlatformWebView::~PlatformWebView):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61512437
  25. 29 Jul, 2010 1 commit
    • weinig@apple.com's avatar
      Patch for https://bugs.webkit.org/show_bug.cgi?id=43163 · 438853f8
      weinig@apple.com authored
      Add a CF-style base type (WKTypeRef) as a base for polymorphic functions.
      
      Reviewed by Darin Adler.
      
      - Add first polymorphic function, WKGetTypeID.
      - Add functions to each WK type to get their respective TypeIDs.
      - Adds WebURL to complement WebString.
      
      * Shared/APIObject.h:
      (WebKit::APIObject::):
      (WebKit::APIObject::~APIObject):
      * Shared/ImmutableArray.h:
      (WebKit::ImmutableArray::type):
      * Shared/WebString.h:
      (WebKit::WebString::type):
      * Shared/WebURL.h: Added.
      (WebKit::WebURL::create):
      (WebKit::WebURL::type):
      (WebKit::WebURL::isNull):
      (WebKit::WebURL::isEmpty):
      (WebKit::WebURL::string):
      (WebKit::WebURL::WebURL):
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::ProxyingRefPtr::ProxyingRefPtr):
      (WebKit::ProxyingRefPtr::operator APIType):
      (toRef):
      (toURLRef):
      (toCopiedURLRef):
      * UIProcess/API/C/WKArray.cpp:
      (WKArrayGetTypeID):
      * UIProcess/API/C/WKArray.h:
      * UIProcess/API/C/WKBackForwardList.cpp:
      (WKBackForwardListGetTypeID):
      * UIProcess/API/C/WKBackForwardList.h:
      * UIProcess/API/C/WKBackForwardListItem.cpp:
      (WKBackForwardListItemGetTypeID):
      * UIProcess/API/C/WKBackForwardListItem.h:
      * UIProcess/API/C/WKBase.h:
      * UIProcess/API/C/WKContext.cpp:
      (WKContextGetTypeID):
      * UIProcess/API/C/WKContext.h:
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameGetTypeID):
      * UIProcess/API/C/WKFrame.h:
      * UIProcess/API/C/WKFramePolicyListener.cpp:
      (WKFramePolicyListenerGetTypeID):
      * UIProcess/API/C/WKFramePolicyListener.h:
      * UIProcess/API/C/WKNavigationData.cpp:
      (WKNavigationDataGetTypeID):
      * UIProcess/API/C/WKNavigationData.h:
      * UIProcess/API/C/WKPage.cpp:
      (WKPageGetTypeID):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/C/WKPageNamespace.cpp:
      (WKPageNamespaceGetTypeID):
      * UIProcess/API/C/WKPageNamespace.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesGetTypeID):
      * UIProcess/API/C/WKPreferences.h:
      * UIProcess/API/C/WKString.cpp:
      (WKStringGetTypeID):
      * UIProcess/API/C/WKString.h:
      * UIProcess/API/C/WKType.cpp: Added.
      (WKGetTypeID):
      * UIProcess/API/C/WKType.h: Added.
      * UIProcess/API/C/WKURL.cpp:
      (WKURLGetTypeID):
      * UIProcess/API/C/WKURL.h:
      * UIProcess/API/win/WKView.cpp:
      (WKViewGetTypeID):
      * UIProcess/API/win/WKView.h:
      * UIProcess/WebBackForwardList.h:
      (WebKit::WebBackForwardList::type):
      * UIProcess/WebBackForwardListItem.h:
      (WebKit::WebBackForwardListItem::type):
      * UIProcess/WebContext.h:
      (WebKit::WebContext::type):
      * UIProcess/WebFramePolicyListenerProxy.h:
      (WebKit::WebFramePolicyListenerProxy::type):
      * UIProcess/WebFrameProxy.h:
      (WebKit::WebFrameProxy::type):
      * UIProcess/WebNavigationData.h:
      (WebKit::WebNavigationData::type):
      * UIProcess/WebPageNamespace.h:
      (WebKit::WebPageNamespace::type):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::type):
      * UIProcess/WebPreferences.h:
      (WebKit::WebPreferences::type):
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
      (WKBundleGetTypeID):
      * WebProcess/InjectedBundle/API/c/WKBundle.h:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      (WKBundleFrameGetTypeID):
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      (WKBundlePageGetTypeID):
      (WKBundlePageSetEditorClient):
      (WKBundlePageSetLoaderClient):
      (WKBundlePageSetUIClient):
      * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
      * WebProcess/WebPage/WebFrame.h:
      (WebKit::WebFrame::type):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::type):
      * win/WebKit2.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      438853f8
  26. 12 Jun, 2010 1 commit
    • weinig@apple.com's avatar
      Move WKRetain and WKRelease overloaded functions out of WKRetainPtr · 7525795e
      weinig@apple.com authored
      and into the files of the type they overload (eg, WKRetain(WKFrameRef 
      moves to WKFrame.h)).
      
      Reviewed by Anders Carlsson.
      
      * UIProcess/API/C/WKBase.h:
      * UIProcess/API/C/WKContext.h:
      * UIProcess/API/C/WKFrame.h:
      * UIProcess/API/C/WKFramePolicyListener.h:
      * UIProcess/API/C/WKNavigationData.h:
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/C/WKPageNamespace.h:
      * UIProcess/API/C/WKPreferences.h:
      * UIProcess/API/C/WKString.h:
      * UIProcess/API/C/WKURL.h:
      * UIProcess/API/cpp/WKRetainPtr.h:
      * UIProcess/API/win/WKView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7525795e
  27. 09 Apr, 2010 2 commits
    • weinig@apple.com's avatar
      Fix for https://bugs.webkit.org/show_bug.cgi?id=37347 · 0664edbb
      weinig@apple.com authored
      Don't use CF types in the new C API
      
      Reviewed by Anders Carlsson.
      
      Replace all uses of CF types in the C API.
      - Replace CFStringRef with WKStringRef.
      - Replace CFURLRef with WKURLRef.
      
      * WebKit2.xcodeproj/project.pbxproj: Add new files.
      
      * Shared/KURLWrapper.h: Added. RefCounted wrapper around KURL.
      * UIProcess/API/C/WKAPICast.h: Add new conversions.
      * UIProcess/API/C/WKBase.h: Add new types.
      * UIProcess/API/C/WKFrame.cpp:
      * UIProcess/API/C/WKFrame.h: 
      * UIProcess/API/C/WKPage.cpp:
      * UIProcess/API/C/WKPage.h:
      Replace uses of CF types with WK equivalents.
      
      * UIProcess/API/C/WKString.cpp: Added.
      * UIProcess/API/C/WKString.h: Added.
      Represents a WebCore::StringImpl*.
      
      * UIProcess/API/C/WKURL.cpp: Added.
      * UIProcess/API/C/WKURL.h: Added.
      Represents a WebKit::KURLWrapper*.
      
      * UIProcess/API/C/cf: Added.
      * UIProcess/API/C/cf/WKStringCF.cpp: Added.
      * UIProcess/API/C/cf/WKStringCF.h: Added.
      * UIProcess/API/C/cf/WKURLCF.cpp: Added.
      * UIProcess/API/C/cf/WKURLCF.h: Added.
      CoreFoundation conversion files. Allows converting
       WKStringRef <-> CFStringRef
       WKURLRef <-> CFURLRef
      
      * UIProcess/ScriptReturnValueCallback.cpp:
      (WebKit::ScriptReturnValueCallback::performCallbackWithReturnValue):
      * UIProcess/ScriptReturnValueCallback.h:
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::didStartProvisionalLoad):
      (WebKit::WebFrameProxy::didCommitLoad):
      * UIProcess/WebFrameProxy.h:
      (WebKit::WebFrameProxy::url):
      (WebKit::WebFrameProxy::provisionalURL):
      * UIProcess/WebLoaderClient.cpp:
      (WebKit::WebLoaderClient::didReceiveTitleForFrame):
      * UIProcess/WebLoaderClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::close):
      (WebKit::WebPageProxy::didReceiveTitleForFrame):
      (WebKit::WebPageProxy::decidePolicyForNavigationAction):
      (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
      (WebKit::WebPageProxy::decidePolicyForMIMEType):
      (WebKit::WebPageProxy::runJavaScriptAlert):
      (WebKit::WebPageProxy::didRunJavaScriptInMainFrame):
      (WebKit::WebPageProxy::processDidExit):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::pageTitle):
      (WebKit::WebPageProxy::urlAtProcessExit):
      * UIProcess/WebPolicyClient.cpp:
      (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
      (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
      (WebKit::WebPolicyClient::decidePolicyForMIMEType):
      * UIProcess/WebPolicyClient.h:
      * UIProcess/WebUIClient.cpp:
      (WebKit::WebUIClient::runJavaScriptAlert):
      * UIProcess/WebUIClient.h:
      Don't use CF types internally at all.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
      Fix typo.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0664edbb
    • weinig@apple.com's avatar
      Add WebKit2/WebProcess directory. · d773bc13
      weinig@apple.com authored
      Patch by Anders Carlsson <andersca@apple.com> on 2010-04-08
      Reviewed by Sam Weinig and Oliver Hunt.
      
      * WebProcess: Added.
      * WebProcess/Launching: Added.
      * WebProcess/Launching/mac: Added.
      * WebProcess/Launching/mac/WebProcessMain.mm: Added.
      * WebProcess/Launching/win: Added.
      * WebProcess/Launching/win/WebProcessWinMain.cpp: Added.
      * WebProcess/WebCoreSupport: Added.
      * WebProcess/WebCoreSupport/WebChromeClient.cpp: Added.
      * WebProcess/WebCoreSupport/WebChromeClient.h: Added.
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: Added.
      * WebProcess/WebCoreSupport/WebContextMenuClient.h: Added.
      * WebProcess/WebCoreSupport/WebDragClient.cpp: Added.
      * WebProcess/WebCoreSupport/WebDragClient.h: Added.
      * WebProcess/WebCoreSupport/WebEditorClient.cpp: Added.
      * WebProcess/WebCoreSupport/WebEditorClient.h: Added.
      * WebProcess/WebCoreSupport/WebErrors.h: Added.
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Added.
      * WebProcess/WebCoreSupport/WebInspectorClient.h: Added.
      * WebProcess/WebCoreSupport/mac: Added.
      * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: Added.
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.h: Added.
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.m: Added.
      * WebProcess/WebCoreSupport/win: Added.
      * WebProcess/WebCoreSupport/win/WebCoreLocalizedStrings.cpp: Added.
      * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp: Added.
      * WebProcess/WebPage: Added.
      * WebProcess/WebPage/DrawingArea.cpp: Added.
      * WebProcess/WebPage/DrawingArea.h: Added.
      * WebProcess/WebPage/WebFrame.cpp: Added.
      * WebProcess/WebPage/WebFrame.h: Added.
      * WebProcess/WebPage/WebPage.cpp: Added.
      * WebProcess/WebPage/WebPage.h: Added.
      * WebProcess/WebPage/mac: Added.
      * WebProcess/WebPage/mac/DrawingAreaUpdateChunk.cpp: Added.
      * WebProcess/WebPage/mac/DrawingAreaUpdateChunk.h: Added.
      * WebProcess/WebPage/mac/WebPageMac.mm: Added.
      * WebProcess/WebPage/win: Added.
      * WebProcess/WebPage/win/DrawingAreaUpdateChunk.cpp: Added.
      * WebProcess/WebPage/win/DrawingAreaUpdateChunk.h: Added.
      * WebProcess/WebPage/win/WebPageWin.cpp: Added.
      * WebProcess/WebProcess.cpp: Added.
      * WebProcess/WebProcess.h: Added.
      * WebProcess/win: Added.
      * WebProcess/win/DllMain.cpp: Added.
      * WebProcess/win/WebLocalizableStrings.cpp: Added.
      * WebProcess/win/WebLocalizableStrings.h: Added.
      * WebProcess/win/WebProcessMain.cpp: Added.
      * WebProcess/win/WebProcessMain.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d773bc13
  28. 04 Mar, 2010 2 commits
    • ossy@webkit.org's avatar
      [Qt] Unreviewed buildfix after r55542 on Windows. · cf04bd9d
      ossy@webkit.org authored
      * WebCore.pro:
       - plugins/win/PluginDatabaseWin.cpp removed.
       - platform/win/WebCoreInstanceHandle.cpp added.
      
      * platform/win/WebCoreInstanceHandle.cpp: Remove explicit qualification in namespace declaration to make gcc happy.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf04bd9d
    • bdakin@apple.com's avatar
      WebCore: This fixes the layering violation I committed yesterday by moving · a67418ff
      bdakin@apple.com authored
      Page::instanceHandle into its own file just in the WebCore 
      namespace.
      
      Reviewed by Anders Carlsson.
      
      Added WebCoreInstanceHandle.h + .cpp and removed PageWin.cpp
      * WebCore.vcproj/WebCore.vcproj:
      * page/win/PageWin.cpp: Removed.
      
      Remove all instance handle code from Page.
      * page/Page.h:
      
      New files.
      * platform/win/WebCoreInstanceHandle.cpp: Added.
      * platform/win/WebCoreInstanceHandle.h: Added.
      (WebCore::setInstanceHandle):
      (WebCore::instanceHandle):
      
      Switch to WebCore::instanceHandle() instead of 
      Page::instanceHandle() and include the new header.
      * platform/graphics/win/WKCACFLayerRenderer.cpp:
      (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
      * platform/win/PasteboardWin.cpp:
      (WebCore::Pasteboard::Pasteboard):
      * platform/win/PopupMenuWin.cpp:
      (WebCore::PopupMenu::show):
      (WebCore::PopupMenu::registerClass):
      * platform/win/SharedTimerWin.cpp:
      (WebCore::initializeOffScreenTimerWindow):
      * plugins/win/PluginViewWin.cpp:
      (WebCore::registerPluginView):
      (WebCore::PluginView::platformStart):
      
      WebKit/win: WebCore::Page::setInstanceHandle() is now just 
      WebCore::setInstanceHandle()
      
      Reviewed by Anders Carlsson.
      
      * WebKitDLL.cpp:
      (DllMain):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a67418ff
  29. 07 Jan, 2010 1 commit
    • mitz@apple.com's avatar
      Added Font::typesettingFeatures() and deployed it · 8c85d97b
      mitz@apple.com authored
      Reviewed by Sam Weinig.
      
      No change in funcitonality
      
      * WebCore.xcodeproj/project.pbxproj: Added TypesettingFeatures.h.
      * platform/graphics/Font.h:
      (WebCore::Font::typesettingFeatures): Added. Determines the typesetting
          features from the text redndering mode.
      * platform/graphics/FontFastPath.cpp:
      (WebCore::Font::canUseGlyphCache): Use typesettingFeatures().
      * platform/graphics/SimpleFontData.h:
      * platform/graphics/TypesettingFeatures.h: Added.
      * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
      (WebCore::disableLigatures): Take TypesettingFeatures instead of
          TextRenderingMode.
      (WebCore::initializeATSUStyle): Ditto.
      (WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI):
          Use typesettingFeatures().
      * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
      (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
          Ditto.
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::getCFStringAttributes): Take
          TypesettingFeatures instead of TextRenderingMode.
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::findNextLineBreak): Use TypesettingFeatures().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c85d97b
  30. 19 Dec, 2009 1 commit
    • weinig@apple.com's avatar
      Add Mac WebKit side of the client based geolocation provider. · d633d844
      weinig@apple.com authored
      Reviewed by Dan Bernstein.
      
      WebKit: 
      
      * WebKit.xcodeproj/project.pbxproj:
      
      WebKit/mac: 
      
      * Misc/WebKitErrors.m:
      (registerErrors): Add Geolocation errors.
      * Misc/WebKitErrorsPrivate.h:
      * WebCoreSupport/WebGeolocationControllerClient.h: Added.
      (WebGeolocationControllerClient::webView):
      * WebCoreSupport/WebGeolocationControllerClient.mm: Added.
      (WebGeolocationControllerClient::WebGeolocationControllerClient):
      (WebGeolocationControllerClient::startUpdating):
      (WebGeolocationControllerClient::stopUpdating):
      (WebGeolocationControllerClient::lastPosition):
      Add implementation of the WebGeolocationControllerClient.
      
      * WebView/WebGeolocationPosition.h: Added.
      * WebView/WebGeolocationPosition.mm: Added.
      (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
      (core):
      (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
      * WebView/WebGeolocationPositionInternal.h: Added.
      Add an Objective-C wrapper for GeolocationPosition.
       
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Set the GeolocationControllerClient.
      (-[WebView _setGeolocationProvider:]): Set the GeolocationProvider
      (-[WebView _geolocationProvider]): Return the GeolocationProvider.
      (-[WebView _geolocationDidChangePosition:]): Notify WebCore that the position changed.
      (-[WebView _geolocationDidFailWithError:]): Notify WebCore that an error occured.
      * WebView/WebViewData.h:
      * WebView/WebViewPrivate.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d633d844
  31. 20 Nov, 2009 1 commit
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · 13f65f3f
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=31690
              Make SocketStreamHandleCFNet work on Windows
      
              * WebCore.vcproj/WebCore.vcproj: Added LoaderRunLoopCF.
      
              * platform/network/ResourceHandle.h: Removed loaderRunLoop().
      
              * platform/network/cf/LoaderRunLoopCF.cpp: Added.
              (WebCore::emptyPerform):
              (WebCore::runLoaderThread):
              (WebCore::loaderRunLoop):
              * platform/network/cf/LoaderRunLoopCF.h: Added.
              Moved the run loop that we use for CFNetwork from ResourceHandle to its own file, because
              it's needed for more than just resource loading.
      
              * platform/network/cf/ResourceHandleCFNet.cpp: Use loaderRunLoop() from its new location.
      
              * platform/network/cf/DNSCFNet.cpp: (WebCore::DNSResolveQueue::resolve): Ditto.
      
              * platform/network/cf/SocketStreamHandle.h: Added static callbacks for forwarding events to
              main thread.
              * platform/network/cf/SocketStreamHandleCFNet.cpp:
              (WebCore::SocketStreamHandle::SocketStreamHandle): Use loaderRunLoop() on Windows instead of
              inoperable main run loop.
      
              (WebCore::MainThreadEventCallbackInfo::MainThreadEventCallbackInfo): 
              (WebCore::SocketStreamHandle::readStreamCallback):
              (WebCore::SocketStreamHandle::writeStreamCallback):
              (WebCore::SocketStreamHandle::readStreamCallbackMainThread):
              (WebCore::SocketStreamHandle::writeStreamCallbackMainThread):
              Forward stream events to main thread on Windows.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13f65f3f
  32. 10 Nov, 2009 2 commits
    • ap@apple.com's avatar
      Reviewed by Dan Bernstein. · 2ab1e6a4
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=31312
              Decouple authentication panel callbacks from ResourceHandle
      
              No change in functionality.
      
              SocketStreamHandle also needs to request credentials, so it's not appropriate to store
              ResourceHandle as delegate.
      
      WebCore:
              * WebCore.vcproj/WebCore.vcproj:
              * platform/network/AuthenticationClient.h: Added.
              Added a new interface for listening to authentication panel notifications.
      
              * WebCore.xcodeproj/project.pbxproj: Added AuthenticationClient.h. Let Visual Studio do what
              it wants with the project file.
      
              (WebCore::AuthenticationClient::ref): Using our usual method of exposing refcounting on an
              interface class.
              (WebCore::AuthenticationClient::deref): Ditto.
      
              * platform/network/ResourceHandle.h:
              (WebCore::ResourceHandle::refAuthenticationClient): Ditto.
              (WebCore::ResourceHandle::derefAuthenticationClient): Ditto.
      
              * platform/network/cf/AuthenticationCF.cpp:
              (WebCore::AuthenticationChallenge::AuthenticationChallenge):
              (WebCore::AuthenticationChallenge::platformCompare):
              * platform/network/cf/AuthenticationChallenge.h:
              (WebCore::AuthenticationChallenge::authenticationClient):
              * platform/network/chromium/AuthenticationChallenge.h:
              (WebCore::AuthenticationChallenge::authenticationClient):
              * platform/network/curl/AuthenticationChallenge.h:
              (WebCore::AuthenticationChallenge::authenticationClient):
              Keeping a reference to AuthenticationClient, not to ResourceHandle.
      
      WebKit:
              * WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
              * WebURLAuthenticationChallenge.cpp:
              (WebURLAuthenticationChallenge::initWithAuthenticationChallenge):
              (WebURLAuthenticationChallenge::sender):
              * WebURLAuthenticationChallengeSender.cpp:
              (WebURLAuthenticationChallengeSender::WebURLAuthenticationChallengeSender):
              (WebURLAuthenticationChallengeSender::createInstance):
              (WebURLAuthenticationChallengeSender::authenticationClient):
              * WebURLAuthenticationChallengeSender.h:
              * WebURLAuthenticationChallengeSenderCFNet.cpp:
              (WebURLAuthenticationChallengeSender::cancelAuthenticationChallenge):
              (WebURLAuthenticationChallengeSender::continueWithoutCredentialForAuthenticationChallenge):
              (WebURLAuthenticationChallengeSender::useCredential):
              Adjusted for WebCore changes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ab1e6a4
    • mitz@apple.com's avatar
      WebCore: WebCore part of making full-screen video pause during scrubbing. · 362023c1
      mitz@apple.com authored
      Reviewed by Eric Carlson and Darin Adler.
      
      * WebCore.Video.exp: Sorted and added HTMLMediaElement::beginScrubbing()
      and HTMLMediaElement::endScrubbing().
      
      WebKit/mac: WebKit part of making full-screen video pause during scrubbing.
      
      Reviewed by Eric Carlson and Darin Adler.
      
      * WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing
      ivar.
      * WebView/WebVideoFullscreenHUDWindowController.mm:
      (-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
      _isScrubbing is NO.
      (-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
      HTMLMediaElement::endScrubbing().
      (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
      If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
      and schedule -endScrubbing to be called when mouse tracking ends.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      362023c1
  33. 09 Nov, 2009 1 commit
    • mitz@apple.com's avatar
      Made the full-screen video HUD appear when playback stops, such as when · e0ff32d3
      mitz@apple.com authored
      the end of the video is reached.
      
      Reviewed by Eric Carlson.
      
      * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.
      * WebView/WebVideoFullscreenHUDWindowController.mm:
      (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
      for the renaming of -updateRate to -updatePlayButton.
      (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
      -updateRate to this.
      (-[WebVideoFullscreenHUDWindowController updateRate]): This method now
      responds to changes to the playback rate by updating the play button
      and showing or hiding the HUD as necessary.
      (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
      toggles playing. UI updates are driven by -updateRate being called.
      (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0ff32d3
  34. 02 Nov, 2009 1 commit
    • mitz@apple.com's avatar
      Made the remaining time display show negative zero at the end of the · 12da8133
      mitz@apple.com authored
      video.
      
      Reviewed by Anders Carlsson.
      
      Made other cleanup.
      
      * WebView/WebVideoFullscreenHUDWindowController.h: Reverted the types of
      _timeline and _volumeSlider to the more generic NSControl.
      * WebView/WebVideoFullscreenHUDWindowController.mm:
      (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Cleaned
      up style.
      (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Added an
      assertion that the cast to NSButton * is legal. Removed casts.
      (-[WebVideoFullscreenHUDWindowController updateTime]): Use
      -setValue:forKey: instead of an NSSlider method.
      (timeToString): Changed to support only non-negative values and
      simplified.
      (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Always
      prepend a “-” to the time.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      12da8133