1. 13 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: WebKit2: Add support for drag and drop · 9d9813d0
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * WebCore.exp.in:
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove): Added DragData parameter.
      (WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
      (WebCore::DragController::concludeEditDrag): Same as above.
      * page/DragController.h: Added parameter to isCopyKeyDown.
      * page/mac/DragControllerMac.mm:
      The following methods have been modified to use the information stored
      in the DragData class.
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * platform/DragData.h:
      (WebCore::DragData::flags):
      * platform/DragData.cpp: Added default flags parameter to the constructor.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      All the following files have been modified to add the DragData
      parameter to isCopyKeyDown. I plan to improve this in the future
      and make isCopyKeyDown not platform specific.
      * page/android/DragControllerAndroid.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/brew/DragControllerBrew.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/efl/DragControllerEfl.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/haiku/DragControllerHaiku.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/wx/DragControllerWx.cpp:
      (WebCore::DragController::isCopyKeyDown):
      
      WebKit/mac: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      These are the changes to align the behavior for WebKit.
      
      * WebView/WebView.mm:
      (-[WebView applicationFlags:]): Added.
      (-[WebView draggingEntered:]): Added parameter to the DragData constructor.
      (-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
      (-[WebView draggingExited:]): Added parameter to the DragData constructor.
      (-[WebView performDragOperation:]): Added parameter to the DragData constructor.
      
      WebKit2: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * Shared/DragControllerAction.h: Added.
      * UIProcess/API/mac/WKView.mm:
      Added implemention of the methods required to add suport for a drop target.
      To maintain asynchronous communication with the WebProcess, we always return
      the previous calculated value for the drag operation.
      (-[WKView _registerDraggedTypes]):
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView applicationFlags:]):
      (-[WKView draggingEntered:]):
      (-[WKView draggingUpdated:]):
      (-[WKView draggingExited:]):
      (-[WKView prepareForDragOperation:]):
      (-[WKView performDragOperation:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::performDragControllerAction):
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragOperation):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction):
      (WebKit::WebDragClient::willPerformDragSourceAction):
      (WebKit::WebDragClient::actionMaskForDrag):
      (WebKit::WebDragClient::dragSourceActionMaskForPoint):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d9813d0
  2. 12 Jan, 2011 2 commits
    • bdakin@apple.com's avatar
      Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 · fd7c5cf6
      bdakin@apple.com authored
      Expose fixed layout through WebKit SPI
      -and corresponding-
      <rdar://problem/8844464>
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      And now with getters!
      * WebCore.exp.in:
      
      WebKit/mac: 
      
      And now with getters!
      * WebView/WebView.mm:
      (-[WebView _useFixedLayout]):
      (-[WebView _fixedLayoutSize]):
      * WebView/WebViewPrivate.h:
      
      WebKit2: 
      
      And now with getters!
      * UIProcess/API/C/WKPage.cpp:
      (WKPageUseFixedLayout):
      (WKPageFixedLayoutSize):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::useFixedLayout):
      (WebKit::WebPageProxy::fixedLayoutSize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd7c5cf6
    • bdakin@apple.com's avatar
      Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose · d53573ca
      bdakin@apple.com authored
      fixed layout through WebKit SPI
      -and corresponding-
      <rdar://problem/8844464>
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Export symbols for ScrollView::setUseFixedLayout() and 
      ScrollView::setFixedLayoutSize()
      * WebCore.exp.in:
      
      WebKit/mac: 
      
      * WebView/WebView.mm:
      (-[WebView _setUseFixedLayout:]):
      (-[WebView _setFixedLayoutSize:]):
      * WebView/WebViewPrivate.h:
      
      WebKit2: 
      
      Store useFixedLayout and fixedLayoutSize in the 
      WebPageCreationParameters and the WebPageProxy.
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
      * UIProcess/API/C/WKPage.cpp:
      (WKPageSetUseFixedLayout):
      (WKPageSetFixedLayoutSize):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::setUseFixedLayout):
      (WebKit::WebPageProxy::setFixedLayoutSize):
      (WebKit::WebPageProxy::creationParameters):
      * UIProcess/WebPageProxy.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::setUseFixedLayout):
      (WebKit::WebPage::setFixedLayoutSize):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d53573ca
  3. 11 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: Paste and drag and drop use different code paths to interact with the pasteboard. · 964ea218
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      No new tests. A test is already available for this
      (editing/pasteboard/drag-image-to-contenteditable-in-iframe.html) but had incorrect results.
      
      * WebCore.exp.in:
      * loader/EmptyClients.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      (WebCore::EmptyEditorClient::canonicalizeURL):
      (WebCore::EmptyEditorClient::canonicalizeURLString):
      * page/DragController.cpp:
      The following methods have been changed to pass a pointer to the Frame object
      to the DragData class.
      (WebCore::documentFragmentFromDragData):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      * page/EditorClient.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      The following files have been modified to pass the Frame object to the DragData method calls.
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::dragOperation):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::dragOperation):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::dragOperation):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::dragOperation):
      * platform/DragData.h: Removed Mac specific constructor and reference to PasteboardHelper class.
      * platform/Pasteboard.h: Added public constructor to create a Pasteboard object from an NSPasteboard.
      The following files were all modified to match the new parameters of the methods listed.
      * platform/android/DragDataAndroid.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/haiku/DragDataHaiku.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData):
      (WebCore::DragData::asPlainText):
      (WebCore::insertablePasteboardTypes):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::getBestURL):
      (WebCore::Pasteboard::asURL):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asFragment):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      
      WebKit: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebKit.xcodeproj/project.pbxproj: Removed WebPasteboardHelper.mm and WebPasteboardHelper.h.
      
      WebKit/mac: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebEditorClient::canonicalizeURL):
      (WebEditorClient::canonicalizeURLString):
      * WebCoreSupport/WebPasteboardHelper.h: Removed.
      * WebCoreSupport/WebPasteboardHelper.mm: Removed.
      * WebView/WebHTMLView.mm: Removed comment.
      * WebView/WebView.mm: The following methods have been changed to use the new DragData
      constructor that doesn't use the WebPasteboardHelper reference.
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      
      WebKit2: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebKit::WebEditorClient::canonicalizeURL):
      (WebKit::WebEditorClient::canonicalizeURLString):
      
      LayoutTests: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      
      Reviewed by Alexey Proskuryakov.
      
      New test results added to match the correct behavior.
              
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      964ea218
  4. 08 Jan, 2011 1 commit
  5. 07 Jan, 2011 4 commits
    • slewis@apple.com's avatar
      WebCore: <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit · b211c4bd
      slewis@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
              
      Reviewed by Geoff Garen.
      
      Add a sampler for printing off process memory statistics.
      Export file mode.
      
      * WebCore.exp.in:
      
      WebKit2: <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
      https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
              
      Reviewed by Geoff Garen.
      
      Add a sampler for printing off process memory statistics.
      This tool can track:
                      
              WebCore
                 - FastMalloc allocations bytes              (in use or committed)
              JavaScriptCore
                 - Garbage collector heap bytes              (in use or committed)
                 - Stack bytes                               (committed only!)
                 - JIT Code bytes                            (committed only!)
              Malloc zones
                 - In use bytes for the following zones:
                     * Default zone                          (in use or committed)
                     * DispCon zone                          (in use or committed)
                     * Purgable zone                         (in use or committed)
              Task Info
                 - Resident size memory (RSIZE)
              
              Data collected is dumped to a temporary file.
              
      Create a sandbox for a temporary file.
      * Shared/SandboxExtension.h:
      (WebKit::SandboxExtension::createHandleForTemporaryFile):
      * Shared/mac/SandboxExtensionMac.mm:
      (WebKit::SandboxExtension::createHandleForTemporaryFile):
              
      Memory Sampler files
              
      * Shared/WebMemorySampler.cpp: Added.
      (WebKit::WebMemorySampler::shared):
      (WebKit::WebMemorySampler::WebMemorySampler):
      (WebKit::WebMemorySampler::start):
      (WebKit::WebMemorySampler::initializeTimers):
      (WebKit::WebMemorySampler::stop):
      (WebKit::WebMemorySampler::isRunning):
      (WebKit::WebMemorySampler::initializeTempLogFile):
      (WebKit::WebMemorySampler::initializeSandboxedLogFile):
      (WebKit::WebMemorySampler::writeHeaders):
      (WebKit::WebMemorySampler::sampleTimerFired):
      (WebKit::WebMemorySampler::stopTimerFired):
      (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
      * Shared/WebMemorySampler.h: Added.
      * Shared/mac/WebMemorySampler.mac.mm: Added.
      (WebKit::WebMemorySampler::sampleSystemMalloc):
      (WebKit::WebMemorySampler::sampleProcessCommittedBytes):
      (WebKit::WebMemorySampler::processName):
      (WebKit::WebMemorySampler::sampleWebKit):
              
      API to start and stop UIProcess and WebProcess sampling.
              
      * UIProcess/API/C/WKContext.cpp:
      (WKContextStartMemorySampler):
      (WKContextStopMemorySampler):
      * UIProcess/API/C/WKContext.h:
              
      Send messages to WebProcess to start and stop memory sampling.
              
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::processDidFinishLaunching):
      (WebKit::WebContext::startMemorySampler):
      (WebKit::WebContext::stopMemorySampler):
      * UIProcess/WebContext.h:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::startMemorySampler):
      (WebKit::WebProcess::stopMemorySampler):
      * WebProcess/WebProcess.h:
      * WebProcess/WebProcess.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b211c4bd
    • jer.noble@apple.com's avatar
      WebCore: Implement WebKit Full Screen support. · d9d59ff9
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      Mark for export all those WebCore functions needed by WebFullscreenController.
      
      * WebCore.exp.in:
      
      WebCore: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      screenRect is useful for more than just HTMLMediaElements.  Promote it into
      Element.
      
      * dom/Element.cpp: Moved into Element from HTMLMediaElement.
      * dom/Element.h: Ditto.
      * dom/Node.cpp:
      * html/HTMLMediaElement.cpp: Moved screenRect into Element.
      * html/HTMLMediaElement.h: Ditto.
      * WebCore.exp.in: Modify the exports list to reflect the new symbol name.
      
      WebCore: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      The RenderFullScreen is intended to be used by clients of that API to allow a DOM subtree to
      be rendered outside its original Frame. Because of this, there are a few areas of the
      rendering code which need to be special cased: RenderFullScreen layers should not be clipped
      to the viewport, as they will almost always be rendering outside the viewport area;
      RenderFullScreen graphics layers should not be reparented by the RenderLayerCompositor, as
      the client will likely want to reparent the platformLayer into their own fullscreen platform
      window; the FrameView must update the RenderFullScreen graphics layer tree separately from
      the root layer, as the two trees are disconnected.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::updateCompositingLayers):  Special treatment for fullscreen renderer.
      (WebCore::FrameView::syncCompositingStateRecursive): Ditto.
      (WebCore::FrameView::paintContents): Ditto.
      * rendering/RenderLayer.h: Add a new ContentChangeType enum entry for FullScreen.
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::contentChanged): Add support for above.
      * rendering/RenderLayerBacking.cpp:
      (WebCore::layerOrAncestorIsFullScreen): New function.
      (WebCore::RenderLayerBacking::updateCompositedBounds): Do not clip if the layerOrAncestorIsFullScreen.
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Special treatment for fullscreen renderer.
      (WebCore::RenderLayerCompositor::requiresCompositingLayer): Ditto.
      (WebCore::RenderLayerCompositor::requiresCompositingForFullScreen): Ditto.
      * rendering/RenderLayerCompositor.h:
      
      WebCore: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      Implemented non-accelerated fullscreen support.  The Document will now vend a RenderFullScreen object for clients to
      use to relocate the fullscreen element subtree.
      
      * css/CSSStyleSelector.cpp:
      (WebCore::loadFullScreenRulesIfNeeded): Change webkitFullScreen -> webkitIsFullScreen.
      (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
      * dom/Document.cpp:
      (WebCore::Document::Document): Initialize m_fullScreenRenderer.
      (WebCore::Document::detach): Call setFullScreenRenderer(0).
      (WebCore::Document::nodeWillBeRemoved): Replicate the logic in webkitWillEnterFullScreenForElement.
      (WebCore::Document::webkitWillEnterFullScreenForElement):  Detach the fullscreen element to cause
          a new RenderFullScreen renderer to be created with the new fullscreen element.
      (WebCore::Document::webkitDidEnterFullScreenForElement):  Notify clients of a fullscreen change
          here, rather in "willEnter", to avoid reentrancy problems when clients remove nodes in response
          to webkitfullscreenchange events.
      (WebCore::Document::webkitWillExitFullScreenForElement): Recalculate the fullscreen element's style.
      (WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
      (WebCore::Document::setFullScreenRenderer): Accessor for m_fullScreenRenderer.
      (WebCore::Document::setFullScreenRendererSize): Set the style on the m_fullScreenRenderer with a new
          size; this keeps clients from having to access the renderer's style directly.
      (WebCore::Document::setFullScreenRendererBackgroundColor): Ditto.
      * dom/Document.h:
      (WebCore::Document::webkitIsFullScreen): Change webkitFullScreen -> webkitIsFullScreen.
      (WebCore::Document::fullScreenRenderer): Accessor.
      * dom/Document.idl:
      * dom/Node.cpp:
      (WebCore::Node::createRendererIfNeeded): If the document is in fullscreen mode, create a RenderFullScreen
          object to insert between the fullscreen element and its parent.
      * page/ChromeClient.h:
      (WebCore::ChromeClient::fullScreenRendererChanged): Added.
      * rendering/MediaControlElements.cpp:
      (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Change webkitFullScreen -> webkitIsFullScreen.
      
      WebCore: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      This patch introduces a new RenderObject type: RenderFullScreen.  The RenderFullScreen renderer
      will be used to implement new FullScreen APIs.  Because the RenderFullScreen object will be the
      parent of the current fullscreen element, the style rules for fullscreen objects must change to
      match.
      
      * WebCore.xcodeproj/project.pbxproj:
      * rendering/RenderFullScreen.cpp: Added.
      (RenderFullScreen::setAnimating): Sets the m_isAnimating flag.
      (RenderFullScreen::createFullScreenStyle): Returns a new RenderStyle containing the default stye
          for RenderFullScreen objects.
      * rendering/RenderFullScreen.h: Added.
      (WebCore::RenderFullScreen::isRenderFullScreen): Added.  Overrides the RenderObject version.
      * rendering/RenderObject.h:
      (WebCore::RenderObject::isRenderFullScreen): Added.  Used for type-checking RenderFullScreen objects.
      * css/fullscreen.css:  Modified the contained fullscreen styles.
      
      WebKit/mac: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2011-01-05
      Reviewed by Simon Fraser.
      
      Support the new fullscreen Chrome client requests.  WebView will pass
      through these requests to a WebFullscreenController.
      
      * WebCoreSupport/WebChromeClient.h: Add fullScreenRendererChanged().
      * WebView/WebView.mm:
      (-[WebView _supportsFullScreenForElement:WebCore::]): Check to see if the fullscreen pref has been enabled.
      (-[WebView _enterFullScreenForElement:WebCore::]): Create a WebFullScreenController.
      (-[WebView _exitFullScreenForElement:WebCore::]): Request that the WebFullScreenController exit fullscreen.
      (-[WebView _fullScreenRendererChanged:WebCore::]): Notify the WebFullScreenController that its renderer has changed.
      * WebView/WebViewData.h: Add ivar newFullscreenController.
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2011-01-05
      Reviewed by Simon Fraser.
      
      This patch implements the FullScreen APIs using the new RenderFullScreen renderer and the new
      Document client APIs. The RenderFullScreen renderer's CALayer is hosted in a new, fullscreen
      window, and a custom CAAnimation animates that layer between the initial screen rect of the
      full screen element, to its final value. WebFullscreenController will swap the WebView out of
      its original window, and into the fullscreen window. The controller will replace the WebView
      with a placeholder view, so that if the placeholder moves or resized while the WebView is
      absent, the WebView will move back to the correct location when exiting fullscreen.
      
      * WebView/WebFullscreenController.h: Added.
      * WebView/WebFullscreenController.mm: Added.
      (-[WebFullscreenController windowDidExitFullscreen:]):  Close the fullscreen window.
      (-[WebFullscreenController windowDidEnterFullscreen:]): Swap the webView back into the fullscreen window.
      (-[WebFullscreenController animationDidStop:finished:]): Call windowDid{Exit|Enter}FullScreen as appropriate.
      (-[WebFullscreenController applicationDidResignActive:]):
      (-[WebFullscreenController applicationDidChangeScreenParameters:]): Resize the fullscreen window to match
          the new screen parameters.
      (-[WebFullscreenController enterFullscreen:]):  Set up the animation that will take the fullscreen element
          from its original screen rect into fullscreen.
      (-[WebFullscreenController exitFullscreen]): Swap the webView back into its original window.
          Set up the animation that will take the fullscreen element back into its original screen
          rect.
      (-[WebFullscreenController _updatePowerAssertions]): Now checks _isAnyMoviePlaying to determine
          whether to disable screensaver and sleep.
      (-[WebFullscreenController _isAnyMoviePlaying]): Walks through the sub-tree starting at the fullscreen element
          looking for HTMLVideoElements; returns whether any are found to be playing.
      (-[WebFullscreenController _animationDuration]): Returns the current animation duration, affected by control
          and shift keys.
      (-[WebFullscreenWindow canBecomeKeyWindow]): Allow the window to become key.
      (-[WebFullscreenWindow keyDown:]): Handle the 'Esc' key.
      (-[WebFullscreenWindow cancelOperation:]): Request to exit fullscreen.
      (-[WebFullscreenWindow rendererLayer]): Convenience accessor.
      (-[WebFullscreenWindow setRendererLayer:]): Ditto.
      (-[WebFullscreenWindow backgroundLayer]): Ditto.
      (-[WebFullscreenWindow animationView]): Ditto.
      (MediaEventListener::MediaEventListener): Implements the EventListener protocol.
      (MediaEventListener::handleEvent): Tells its delegate to _updatePowerAssertions.
      
      LayoutTests: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2011-01-05
      Reviewed by Simon Fraser.
      
      Update the tests with new API names and spec values.
      
      * fullscreen/full-screen-api-expected.txt:
      * fullscreen/full-screen-api.html:
      * fullscreen/full-screen-css.html:
      * fullscreen/full-screen-request-expected.txt:
      * fullscreen/full-screen-request.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9d59ff9
    • jamesr@google.com's avatar
      2011-01-07 James Robinson <jamesr@chromium.org> · f894f68c
      jamesr@google.com authored
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * animations/animation-time-expected.txt: Removed.
              * animations/animation-time.html: Removed.
              * animations/script-tests/animation-time.js: Removed.
              * fast/dom/Window/window-properties-expected.txt:
              * fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/gtk/fast/dom/Window/window-properties-expected.txt:
              * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/qt/fast/dom/Window/window-properties-expected.txt:
              * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * DumpRenderTree/chromium/WebViewHost.cpp:
              (WebViewHost::paintInvalidatedRegion):
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * page/DOMWindow.cpp:
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              * page/Frame.cpp:
              * page/Frame.h:
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
              * page/animation/AnimationTimeController.cpp: Removed.
              * page/animation/AnimationTimeController.h: Removed.
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * public/WebWidget.h:
              * src/WebPopupMenuImpl.cpp:
              * src/WebPopupMenuImpl.h:
              * src/WebViewImpl.cpp:
              * src/WebViewImpl.h:
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView drawRect:]):
              * WebView/WebView.mm:
              (layerSyncRunLoopObserverCallBack):
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
              (WebKit::ChunkedUpdateDrawingArea::display):
              (WebKit::ChunkedUpdateDrawingArea::setSize):
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::drawRect):
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f894f68c
    • barraclough@apple.com's avatar
      Source/JavaScriptCore: [GTK] Port scrollbar painting to GtkStyleContext · d6544ee5
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52051
      
      Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2011-01-07
      Reviewed by Martin Robinson.
      
      * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
      declaration.
      
      WebCore: Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
      
      Reviewed by Geoff Garen.
      
      The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
      destructor early, in order to release wrappers once we know we no longer intend to use them.
      Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
      lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
      A sequence of events that triggers the bug would look like this:
      
      (1) Create a DOMWrapperWorld.
      (2) Register a timer in the world.
      (3) Call unregisterWorld() on the world.
      (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
      (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
          called forgetWorld() none exists.
      (6) Attempt to add a wrapper to a NULL map.
      
      Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
      
      * WebCore.exp.in:
      * bindings/js/DOMWrapperWorld.cpp:
      (WebCore::DOMWrapperWorld::DOMWrapperWorld):
      (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
      (WebCore::DOMWrapperWorld::clearWrappers):
      * bindings/js/DOMWrapperWorld.h:
      
      WebKit/mac: Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
      
      Reviewed by Geoff Garen.
      
      The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
      destructor early, in order to release wrappers once we know we no longer intend to use them.
      Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
      lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
      A sequence of events that triggers the bug would look like this:
      
      (1) Create a DOMWrapperWorld.
      (2) Register a timer in the world.
      (3) Call unregisterWorld() on the world.
      (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
      (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
          called forgetWorld() none exists.
      (6) Attempt to add a wrapper to a NULL map.
      
      Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
      
      * WebView/WebScriptWorld.mm:
      (-[WebScriptWorld unregisterWorld]):
      
      WebKit/win: Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
      
      Reviewed by Geoff Garen.
      
      The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
      destructor early, in order to release wrappers once we know we no longer intend to use them.
      Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
      lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
      A sequence of events that triggers the bug would look like this:
      
      (1) Create a DOMWrapperWorld.
      (2) Register a timer in the world.
      (3) Call unregisterWorld() on the world.
      (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
      (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
          called forgetWorld() none exists.
      (6) Attempt to add a wrapper to a NULL map.
      
      Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
      
      * WebScriptWorld.cpp:
      (WebScriptWorld::unregisterWorld):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6544ee5
  6. 06 Jan, 2011 1 commit
    • jamesr@google.com's avatar
      2011-01-06 James Robinson <jamesr@chromium.org> · c0dca2a1
      jamesr@google.com authored
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Tests for window.webkitAnimationTime.
      
              * animations/animation-time-expected.txt: Added.
              * animations/animation-time.html: Added.
              * animations/script-tests/animation-time.js: Added.
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Chromium DRT support for webkitAnimationTime.
      
              * DumpRenderTree/chromium/WebViewHost.cpp:
              (WebViewHost::paintInvalidatedRegion):
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Implements mozilla's animationTime property as described here:
              https://developer.mozilla.org/en/DOM/window.mozAnimationStartTime
              and http://hacks.mozilla.org/2010/08/more-efficient-javascript-animations-with-mozrequestanimationframe/
              The property is called webkitAnimationTime as calling it the 'Start' time is not very informative.
              This property exposes a notion of a 'current' time to use for declarative animations and allows
              scripts to synchronize imperative animations with declarative ones if they choose to.  Once queried
              this time is saved and used for all declarative animation updates until the embedder paints/composites
              the next frame and clears it, or 15ms elapse (in case the embedder isn't producing frames, for example
              if the page is in a background tab).
      
              This patch also ensures that all declarative animations started in the same script execution block
              are synchronized even if some time elapses while script is running.
      
              Test: fast/animation/animation-time.html
      
              * WebCore.gypi:
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::webkitAnimationTime):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              * page/Frame.cpp:
              (WebCore::Frame::currentAnimationTime):
              * page/Frame.h:
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::animationTime):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
              * page/animation/AnimationTimeController.cpp: Added.
              (WebCore::AnimationTimeController::AnimationTimeController):
              (WebCore::AnimationTimeController::~AnimationTimeController):
              (WebCore::AnimationTimeController::currentAnimationTime):
              (WebCore::AnimationTimeController::clearCurrentAnimationTime):
              (WebCore::AnimationTimeController::clearCurrentAnimationTimeTimerFired):
              * page/animation/AnimationTimeController.h: Added.
              (WebCore::AnimationTimeController::create):
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              WebKit API support for webkitAnimationTime.
      
              * public/WebWidget.h:
              * src/WebPopupMenuImpl.cpp:
              (WebKit::WebPopupMenuImpl::clearCurrentAnimationTime):
              * src/WebPopupMenuImpl.h:
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::clearCurrentAnimationTime):
              * src/WebViewImpl.h:
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Tells the page to clear the current animation time after producing a frame.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::drawRect):
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
              (WebKit::ChunkedUpdateDrawingArea::display):
              (WebKit::ChunkedUpdateDrawingArea::setSize):
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0dca2a1
  7. 05 Jan, 2011 4 commits
  8. 04 Jan, 2011 2 commits
    • cfleizach@apple.com's avatar
      WK2: Support Accessibility · aa50410b
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51859
      
      Reviewed by Sam Weinig.
      
      Tools: 
      
      Use rootObject() method to get top of accessibility tree.
      
      * DumpRenderTree/mac/AccessibilityControllerMac.mm:
      (AccessibilityController::focusedElement):
      (AccessibilityController::rootElement):
      
      WebCore: 
      
      WK2 doesn't use platform scroll views anymore. Accessibility code
      needs to have its own scroll views. 
      
      Test: platform/mac/accessibility/webkit-scrollarea.html
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::AXObjectCache):
      (WebCore::AXObjectCache::get):
      (WebCore::AXObjectCache::getOrCreate):
      (WebCore::AXObjectCache::rootObject):
      (WebCore::AXObjectCache::remove):
      (WebCore::AXObjectCache::handleScrollbarUpdate):
      * accessibility/AXObjectCache.h:
      (WebCore::AXObjectCache::handleScrollbarUpdate):
      * accessibility/AccessibilityARIAGrid.h:
      * accessibility/AccessibilityAllInOne.cpp:
      * accessibility/AccessibilityImageMapLink.cpp:
      * accessibility/AccessibilityImageMapLink.h:
      * accessibility/AccessibilityListBoxOption.cpp:
      * accessibility/AccessibilityListBoxOption.h:
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::updateChildrenIfNecessary):
      (WebCore::AccessibilityObject::elementAccessibilityHitTest):
      (WebCore::AccessibilityObject::axObjectCache):
      (WebCore::AccessibilityObject::focusedUIElement):
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityObject::isAccessibilityScrollView):
      (WebCore::AccessibilityObject::isScrollView):
      (WebCore::AccessibilityObject::canSetNumericValue):
      (WebCore::AccessibilityObject::scrollBar):
      (WebCore::AccessibilityObject::size):
      (WebCore::AccessibilityObject::setValue):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::parentObject):
      (WebCore::AccessibilityRenderObject::accessibilityHitTest):
      (WebCore::AccessibilityRenderObject::updateChildrenIfNecessary):
      (WebCore::AccessibilityRenderObject::addChildren):
      * accessibility/AccessibilityRenderObject.h:
      * accessibility/AccessibilityScrollView.cpp: Added.
      (WebCore::AccessibilityScrollView::AccessibilityScrollView):
      (WebCore::AccessibilityScrollView::create):
      (WebCore::AccessibilityScrollView::scrollBar):
      (WebCore::AccessibilityScrollView::children):
      (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
      (WebCore::AccessibilityScrollView::removeChildScrollbar):
      (WebCore::AccessibilityScrollView::addChildScrollbar):
      (WebCore::AccessibilityScrollView::addChildren):
      (WebCore::AccessibilityScrollView::webAreaObject):
      (WebCore::AccessibilityScrollView::accessibilityHitTest):
      (WebCore::AccessibilityScrollView::document):
      (WebCore::AccessibilityScrollView::elementRect):
      (WebCore::AccessibilityScrollView::parentObject):
      * accessibility/AccessibilityScrollView.h: Added.
      (WebCore::AccessibilityScrollView::roleValue):
      (WebCore::AccessibilityScrollView::scrollView):
      (WebCore::AccessibilityScrollView::accessibilityIsIgnored):
      (WebCore::AccessibilityScrollView::isAccessibilityScrollView):
      (WebCore::toAccessibilityScrollView):
      * accessibility/AccessibilityScrollbar.cpp:
      (WebCore::AccessibilityScrollbar::AccessibilityScrollbar):
      (WebCore::AccessibilityScrollbar::create):
      (WebCore::AccessibilityScrollbar::elementRect):
      (WebCore::AccessibilityScrollbar::document):
      (WebCore::AccessibilityScrollbar::orientation):
      (WebCore::AccessibilityScrollbar::isEnabled):
      (WebCore::AccessibilityScrollbar::valueForRange):
      (WebCore::AccessibilityScrollbar::setValue):
      * accessibility/AccessibilityScrollbar.h:
      (WebCore::AccessibilityScrollbar::setParent):
      (WebCore::AccessibilityScrollbar::canSetValueAttribute):
      (WebCore::AccessibilityScrollbar::canSetNumericValue):
      (WebCore::AccessibilityScrollbar::isAccessibilityScrollbar):
      (WebCore::AccessibilityScrollbar::parentObject):
      (WebCore::AccessibilityScrollbar::roleValue):
      * accessibility/mac/AccessibilityObjectMac.mm:
      (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
      * accessibility/mac/AccessibilityObjectWrapper.mm:
      (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
      (-[AccessibilityObjectWrapper remoteAccessibilityParentObject]):
      (-[AccessibilityObjectWrapper position]):
      (-[AccessibilityObjectWrapper scrollViewParent]):
      (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
      (-[AccessibilityObjectWrapper accessibilityHitTest:]):
      (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
      * dom/Document.cpp:
      (WebCore::Document::axObjectCache):
      * loader/EmptyClients.h:
      (WebCore::EmptyFrameLoaderClient::accessibilityRemoteObject):
      * loader/FrameLoaderClient.h:
      * page/FrameView.cpp:
      (WebCore::FrameView::~FrameView):
      (WebCore::FrameView::axObjectCache):
      * page/FrameView.h:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::setHasHorizontalScrollbar):
      (WebCore::ScrollView::setHasVerticalScrollbar):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::~Scrollbar):
      (WebCore::Scrollbar::scroll):
      (WebCore::Scrollbar::axObjectCache):
      * platform/Scrollbar.h:
      * platform/Widget.h:
      (WebCore::Widget::axObjectCache):
      
      WebKit/gtk: 
      
      Use rootObject() method to get top of ax tree.
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::getFocusedAccessibleElement):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_get_accessible):
      
      WebKit/mac: 
      
      Use rootObject() method to get top of AX tree.
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient::accessibilityRemoteObject):
      * WebView/WebFrame.mm:
      (-[WebFrame setAccessibleName:]):
      (-[WebFrame accessibilityRoot]):
      * WebView/WebFrameInternal.h:
      * WebView/WebFramePrivate.h:
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView accessibilityAttributeValue:]):
      (-[WebHTMLView accessibilityFocusedUIElement]):
      (-[WebHTMLView accessibilityHitTest:]):
      (-[WebHTMLView _accessibilityParentForSubview:]):
      
      WebKit/win: 
      
      Use rootObject() method to get the top of the AX tree.
      
      * AccessibleDocument.cpp:
      (AccessibleDocument::AccessibleDocument):
      
      WebKit2: 
      
      Implement remote accessibility API to support cross process accessibility
      on the Mac platform.
      
      * Shared/WebProcessCreationParameters.cpp:
      (WebKit::WebProcessCreationParameters::encode):
      (WebKit::WebProcessCreationParameters::decode):
      * Shared/WebProcessCreationParameters.h:
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::accessibilityChildTokenReceived):
      * UIProcess/API/mac/WKView.mm:
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView _updateWindowAndViewFrames]):
      (-[WKView _setAccessibilityChildToken:]):
      (-[WKView accessibilityIsIgnored]):
      (-[WKView accessibilityHitTest:]):
      (-[WKView accessibilityAttributeValue:]):
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::ensureWebProcess):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::windowAndViewFramesChanged):
      (WebKit::WebPageProxy::didReceiveAccessibilityPageToken):
      (WebKit::WebPageProxy::sendAccessibilityPresenterToken):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::accessibilityRemoteObject):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::windowAndViewFramesChanged):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::accessibilityPosition):
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Added.
      * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Added.
      (-[AccessibilityWebPageObject setWebPage:]):
      (-[AccessibilityWebPageObject setRemoteParent:]):
      (-[AccessibilityWebPageObject dealloc]):
      (-[AccessibilityWebPageObject accessibilityIsIgnored]):
      (-[AccessibilityWebPageObject accessibilityAttributeNames]):
      (-[AccessibilityWebPageObject accessibilityIsAttributeSettable:]):
      (-[AccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
      (-[AccessibilityWebPageObject accessibilityActionNames]):
      (-[AccessibilityWebPageObject accessibilityChildren]):
      (-[AccessibilityWebPageObject accessibilityAttributeValue:]):
      (-[AccessibilityWebPageObject accessibilityShouldUseUniqueId]):
      (-[AccessibilityWebPageObject accessibilityHitTest:]):
      (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::platformInitialize):
      (WebKit::WebPage::sendAccessibilityPresenterToken):
      (WebKit::WebPage::accessibilityRemoteObject):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::initializeWebProcess):
      * WebProcess/WebProcess.h:
      (WebKit::WebProcess::presenterApplicationPid):
      * WebProcess/mac/WebProcessMainMac.mm:
      (WebKit::WebProcessMain):
      
      LayoutTests: 
      
      * platform/mac/accessibility/webkit-scrollarea-expected.txt: Added.
      * platform/mac/accessibility/webkit-scrollarea.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa50410b
    • darin@apple.com's avatar
      2011-01-04 Darin Adler <darin@apple.com> · c9bf05d8
      darin@apple.com authored
              Reviewed by Brady Eidson.
      
              Add back/forward encoding and decoding to WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=51901
      
              * WebCore.exp.in: Export functions used in WebKit2.
      
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::encodeBackForwardTree): Use references instead of pointers.
              (WebCore::HistoryItem::encodeBackForwardTreeNode): Ditto.
              (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
              * history/HistoryItem.h: Ditto.
              * platform/network/FormData.cpp:
              (WebCore::encode): Ditto.
              (WebCore::decode): Ditto.
              (WebCore::FormData::encodeForBackForward): Ditto.
              (WebCore::FormData::decodeForBackForward): Ditto.
              * platform/network/FormData.h: Ditto.
      2011-01-04  Darin Adler  <darin@apple.com>
      
              Reviewed by Brady Eidson.
      
              Add back/forward encoding and decoding to WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=51901
      
              * GNUmakefile.am: Added new source files.
              * WebKit2.pro: Ditto.
              * WebKit2.xcodeproj/project.pbxproj: Ditto.
              * win/WebKit2.vcproj: Ditto.
      
              * WebProcess/WebPage/DecoderAdapter.cpp: Added.
              * WebProcess/WebPage/DecoderAdapter.h: Added.
              * WebProcess/WebPage/EncoderAdapter.cpp: Added.
              * WebProcess/WebPage/EncoderAdapter.h: Added.
      
              * WebProcess/WebPage/WebBackForwardListProxy.cpp:
              (WebKit::updateBackForwardItem): Added code to encode the back/forward
              tree and send it along. The code to decode needs to wait on Brady's
              current project.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9bf05d8
  9. 24 Dec, 2010 2 commits
  10. 23 Dec, 2010 3 commits
    • jberlin@webkit.org's avatar
      Need WebKit2 API to create a SecurityOrigin from protocol, host, and port · 9cf9a80d
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51563
      
      Reviewed by Sam Weinig.
      
      WebCore: 
      
      Add SecurityOrigin::create(const String& protocol, const String& host, int port).
      
      * WebCore.exp.in:
      Export the symbols for WebCore::SecurityOrigin::create(String, String, int).
      
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
      Use the constant MaxAllowedPort.
      (WebCore::SecurityOrigin::create):
      Sanitizing based off of that done in createFromDatabaseIdentifier.
      * page/SecurityOrigin.h:
      
      WebKit2: 
      
      Add WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port).
      
      * Shared/API/c/WKSecurityOrigin.cpp:
      (WKSecurityOriginCreateFromIdentifier):
      Renamed so as not to clash with the new WKSecurityOriginCreate.
      (WKSecurityOriginCreate):
      * Shared/API/c/WKSecurityOrigin.h:
      * Shared/WebSecurityOrigin.h:
      (WebKit::WebSecurityOrigin::create):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9cf9a80d
    • darin@apple.com's avatar
      2010-12-23 Darin Adler <darin@apple.com> · 50fec70c
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              WKView should not try to do asynchronous validation for selectors that are not editor commands
              https://bugs.webkit.org/show_bug.cgi?id=51555
      
              * WebCore.exp.in: Added commandIsSupportedFromMenuOrKeyBinding.
              * editing/Editor.h: Reordered arguments in the Editor::Command constructor
              and the data members too so the frame is last. Added
              commandIsSupportedFromMenuOrKeyBinding.
      
              * editing/EditorCommand.cpp:
              (WebCore::supported): Removed the EditorCommandSource argument. These
              functions are now only used when called from DOM.
              (WebCore::supportedFromMenuOrKeyBinding): Ditto.
              (WebCore::supportedCopyCut): Ditto.
              (WebCore::supportedPaste): Ditto.
              (WebCore::enabledDismissCorrectionPanel): Changed the supported function to
              an enabled function. It was incorrect to say that this is "supported" only
              when the correction panel is up. Correct to say that it is "enabled" only
              then. And also probably OK to enable it even when the selection is not in
              editable text, as long as the panel is up.
              (WebCore::createCommandMap): Moved conditional commands out of the main
              array into a separate section at the end.
              (WebCore::internalCommand): Added.
              (WebCore::Editor::command): Changed to use the new internalCommand function
              and simplified by relying on the null check in the Command constructor.
              (WebCore::Editor::commandIsSupportedFromMenuOrKeyBinding): Added.
              (WebCore::Editor::Command::Command): Removed unneeded initialization of
              m_source, which is never looked at if m_command is 0. Added feature of
              passing a null command pointer to the non-default constructor.
              (WebCore::Editor::Command::isSupported): Changed to only call the
              per-command isSupported function when the command source is DOM.
              Accordingly that function is now called isSupportedFromDOM.
      2010-12-23  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              WKView should not try to do asynchronous validation for selectors that are not editor commands
              https://bugs.webkit.org/show_bug.cgi?id=51555
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView validateUserInterfaceItem:]): Removed the special case for startSpeaking.
              Added call to commandIsSupportedFromMenuOrKeyBinding so we only try to do validation
              for commands that are supported. Tweaked comments and added some bug numbers.
              (-[WKView _setUserInterfaceItemState:enabled:state:]): Tweaked comment and added
              bug number.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50fec70c
    • rniwa@webkit.org's avatar
      2010-12-22 Ryosuke Niwa <rniwa@webkit.org> · bfb682fd
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::executeCommand):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:granularity:]):
              Takes SelectionDirection instead of SelectionController::EDirection.
              * WebView/WebFrameInternal.h:
              * WebView/WebTextCompletionController.mm:
              (-[WebTextCompletionController doCompletion]): Calls _rangeByAlteringCurrentSelection:SelectionController.
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientEfl.cpp:
              (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Removed #include <Selection.h> from Editor.h.
              Also extracted WritingDirection.h from EditingStyle.h and renamed SelectionController::EDirection
              to SelectionDirection and moved its declaration from SelectionController.h to VisibleSelection.h
      
              * WebCore.exp.in: Signature changes.
              * WebCore.xcodeproj/project.pbxproj: Added WritingDirection.h
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine): Change due to SelectionDirection.
              * editing/EditingStyle.h: Removed WritingDirection and included WritingDirection.h
              * editing/Editor.cpp:
              (WebCore::Editor::deleteWithDirection): Change due to SelectionDirection.
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Ditto.
              (WebCore::Editor::markMisspellingsAfterTypingToWord): Ditto.
              * editing/Editor.h: Removed SelectionController.h; added DocumentMarker.h, Timer.h, VisibleSelection.h
              and WritingDirection.h; forward declared CSSMutableStyleDeclaration.
              * editing/EditorCommand.cpp:
              (WebCore::executeDeleteBackward): Change due to SelectionDirection.
              (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
              (WebCore::executeDeleteForward): Ditto.
              (WebCore::executeDeleteToBeginningOfLine): Ditto.
              (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
              (WebCore::executeDeleteToEndOfLine): Ditto.
              (WebCore::executeDeleteToEndOfParagraph): Ditto.
              (WebCore::executeDeleteWordBackward): Ditto.
              (WebCore::executeDeleteWordForward): Ditto.
              (WebCore::executeForwardDelete): Ditto.
              (WebCore::executeMoveBackward): Ditto.
              (WebCore::executeMoveBackwardAndModifySelection): Ditto.
              (WebCore::executeMoveDown): Ditto.
              (WebCore::executeMoveDownAndModifySelection): Ditto.
              (WebCore::executeMoveForward): Ditto.
              (WebCore::executeMoveForwardAndModifySelection): Ditto.
              (WebCore::executeMoveLeft): Ditto.
              (WebCore::executeMoveLeftAndModifySelection): Ditto.
              (WebCore::executeMoveRight): Ditto.
              (WebCore::executeMoveRightAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfDocument): Ditto.
              (WebCore::executeMoveToBeginningOfDocumentAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfLine): Ditto.
              (WebCore::executeMoveToBeginningOfLineAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfParagraph): Ditto.
              (WebCore::executeMoveToBeginningOfParagraphAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfSentence): Ditto.
              (WebCore::executeMoveToBeginningOfSentenceAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfDocument): Ditto.
              (WebCore::executeMoveToEndOfDocumentAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfSentence): Ditto.
              (WebCore::executeMoveToEndOfSentenceAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfLine): Ditto.
              (WebCore::executeMoveToEndOfLineAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfParagraph): Ditto.
              (WebCore::executeMoveToEndOfParagraphAndModifySelection): Ditto.
              (WebCore::executeMoveParagraphBackwardAndModifySelection): Ditto.
              (WebCore::executeMoveParagraphForwardAndModifySelection): Ditto.
              (WebCore::executeMoveUp): Ditto.
              (WebCore::executeMoveUpAndModifySelection): Ditto.
              (WebCore::executeMoveWordBackward): Ditto.
              (WebCore::executeMoveWordBackwardAndModifySelection): Ditto.
              (WebCore::executeMoveWordForward): Ditto.
              (WebCore::executeMoveWordForwardAndModifySelection): Ditto.
              (WebCore::executeMoveWordLeft): Ditto.
              (WebCore::executeMoveWordLeftAndModifySelection): Ditto.
              (WebCore::executeMoveWordRight): Ditto.
              (WebCore::executeMoveWordRightAndModifySelection): Ditto.
              (WebCore::executeMoveToLeftEndOfLine): Ditto.
              (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Ditto.
              (WebCore::executeMoveToRightEndOfLine): Ditto.
              (WebCore::executeMoveToRightEndOfLineAndModifySelection): Ditto.
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::willBeModified): Takes SelectionDirection instead of EDirection.
              (WebCore::SelectionController::modify): Ditto.
              * editing/SelectionController.h: Change due to SelectionDirection.
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::deleteKeyPressed): Ditto.
              (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
              * editing/VisibleSelection.h: Added SelectionDirection, renamed and moved from EDirection
              in SelectionController.h
              * editing/WritingDirection.h: Added.
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::modify): Change due to SelectionDirection.
              (WebCore::DOMSelection::deleteFromDocument): Ditto.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleKeyboardSelectionMovement): Ditto.
              * page/Frame.h: Includes SelectionController.h.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bfb682fd
  11. 21 Dec, 2010 1 commit
    • andersca@apple.com's avatar
      2010-12-21 Anders Carlsson <andersca@apple.com> · d86d8421
      andersca@apple.com authored
              Reviewed by John Sullivan.
      
              Clicking missing plug-in text does not show a sheet
              https://bugs.webkit.org/show_bug.cgi?id=51403
      
              * WebCore.exp.in:
              Export symbols needed by WebKit2.
      
              * WebCore.xcodeproj/project.pbxproj:
              Make HTMLPlugInImageElement.h a private header.
      
              * html/HTMLPlugInImageElement.h:
              (WebCore::HTMLPlugInImageElement::serviceType):
              (WebCore::HTMLPlugInImageElement::url):
              Make these member functions public.
      2010-12-21  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by John Sullivan.
      
              Clicking missing plug-in text does not show a sheet
              https://bugs.webkit.org/show_bug.cgi?id=51403
      
              Update for changes to the WebPageUIClient.
      
              * MiniBrowser/mac/BrowserWindowController.m:
              (-[BrowserWindowController awakeFromNib]):
              * WebKitTestRunner/TestController.cpp:
              (WTR::createOtherPage):
              (WTR::TestController::initialize):
      2010-12-21  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by John Sullivan.
      
              Clicking missing plug-in text does not show a sheet
              https://bugs.webkit.org/show_bug.cgi?id=51403
      
              * UIProcess/API/C/WKPage.h:
              Add missingPluginButtonClicked to WKPageUIClient.
      
              * UIProcess/WebPageProxy.cpp:        
              (WebKit::WebPageProxy::missingPluginButtonClicked):
              Call the WebUIClient member function.
      
              * UIProcess/WebPageProxy.messages.in:
              Add MissingPluginButtonClicked message.
      
              * UIProcess/WebUIClient.cpp:
              (WebKit::WebUIClient::missingPluginButtonClicked):
              Call the WKPageUIClient callback.
      
              * UIProcess/WebUIClient.h:
              * WebProcess/WebCoreSupport/WebChromeClient.cpp:
              (WebKit::WebChromeClient::shouldMissingPluginMessageBeButton):
              Always return true for now.
      
              (WebKit::WebChromeClient::missingPluginButtonClicked):
              Send a MissingPluginButtonClicked message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d86d8421
  12. 16 Dec, 2010 1 commit
    • andersca@apple.com's avatar
      Save the manual plug-in stream data and redeliver it when the plug-in is initialized · 69501991
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51201
      
      Reviewed by Darin Adler.
      
      WebCore:
      
      Export SharedBuffer related symbols.
      
      * WebCore.exp.in:
      
      WebKit2:
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::PluginView):
      Initialize m_manualStreamState.
      
      (WebKit::PluginView::manualLoadDidReceiveResponse):
      If the plug-in hasn't been initialized, store the response.
      
      (WebKit::PluginView::manualLoadDidReceiveData):
      If the plug-in hasn't been initialized, store the data.
      
      (WebKit::PluginView::manualLoadDidFinishLoading):
      If the plug-in hasn't been initialized, update the state.
      
      (WebKit::PluginView::manualLoadDidFail):
      If the plug-in hasn't been initialized, store the error and update the state.
      
      (WebKit::PluginView::initializePlugin):
      Call redeliverManualStream.
      
      (WebKit::PluginView::redeliverManualStream):
      Redeliver the manual stream to the plug-in.
      
      * WebProcess/Plugins/PluginView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69501991
  13. 15 Dec, 2010 1 commit
    • weinig@apple.com's avatar
      WebKit2: Can't add files to an <input type=file> · 2e7a7cda
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51087
      
      Reviewed by Anders Carlsson.
      
      WebCore: 
      
      Add exported function.
      
      * WebCore.exp.in:
      
      WebKit2: 
      
      * Scripts/webkit2/messages.py:
      Adds new types.
      
      * Shared/API/c/WKBase.h:
      Adds WKOpenPanelParametersRef and WKOpenPanelResultListenerRef.
      
      * Shared/APIObject.h:
      Adds TypeOpenPanelParameters and TypeOpenPanelResultListener.
      
      * Shared/WebOpenPanelParameters.cpp: Added.
      (WebKit::WebOpenPanelParameters::create):
      (WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
      (WebKit::WebOpenPanelParameters::~WebOpenPanelParameters):
      (WebKit::WebOpenPanelParameters::Data::encode):
      (WebKit::WebOpenPanelParameters::Data::decode):
      * Shared/WebOpenPanelParameters.h: Added.
      (WebKit::WebOpenPanelParameters::allowMultipleFiles):
      (WebKit::WebOpenPanelParameters::type):
      Class representing options one can pass to open panel.
      
      * UIProcess/API/C/WKAPICast.h:
      Add casts for WebOpenPanelParameters and WebOpenPanelResultListenerProxy.
      
      * UIProcess/API/C/WKOpenPanelParameters.cpp: Added.
      (WKOpenPanelParametersGetTypeID):
      (WKOpenPanelParametersGetAllowsMultipleFiles):
      * UIProcess/API/C/WKOpenPanelParameters.h: Added.
      * UIProcess/API/C/WKOpenPanelResultListener.cpp: Added.
      (WKOpenPanelResultListenerGetTypeID):
      (WKOpenPanelResultListenerChooseFiles):
      (WKOpenPanelResultListenerCancel):
      * UIProcess/API/C/WKOpenPanelResultListener.h: Added.
      Add API wrappers.
      
      * UIProcess/API/C/WKPage.h:
      Add new UI callback, WKPageRunOpenPanelCallback.
      
      * UIProcess/API/C/WebKit2.h:
      Add includes for new API headers.
      
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage):
      Stub out the runOpenPanel callback.
      
      * UIProcess/WebOpenPanelResultListenerProxy.cpp: Added.
      (WebKit::WebOpenPanelResultListenerProxy::WebOpenPanelResultListenerProxy):
      (WebKit::WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy):
      (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
      (WebKit::WebOpenPanelResultListenerProxy::cancel):
      (WebKit::WebOpenPanelResultListenerProxy::invalidate):
      * UIProcess/WebOpenPanelResultListenerProxy.h: Added.
      (WebKit::WebOpenPanelResultListenerProxy::create):
      (WebKit::WebOpenPanelResultListenerProxy::type):
      Adds the listener used to choose files for <input type=file>
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::runOpenPanel):
      (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
      (WebKit::WebPageProxy::didCancelForOpenPanel):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebUIClient.cpp:
      (WebKit::WebUIClient::runOpenPanel):
      * UIProcess/WebUIClient.h:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::runOpenPanel):
      * WebProcess/WebPage/WebOpenPanelResultListener.cpp: Added.
      (WebKit::WebOpenPanelResultListener::create):
      (WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
      (WebKit::WebOpenPanelResultListener::~WebOpenPanelResultListener):
      (WebKit::WebOpenPanelResultListener::didChooseFiles):
      * WebProcess/WebPage/WebOpenPanelResultListener.h: Added.
      (WebKit::WebOpenPanelResultListener::disconnectFromPage):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::close):
      (WebKit::WebPage::setActiveOpenPanelResultListener):
      (WebKit::WebPage::didChooseFilesForOpenPanel):
      (WebKit::WebPage::didCancelForOpenPanel):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::activeOpenPanelResultListener):
      * WebProcess/WebPage/WebPage.messages.in:
      Pipe through file choosing.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      Add new files.
      
      WebKitTools: 
      
      * MiniBrowser/mac/BrowserWindowController.m:
      (runOpenPanel):
      (-[BrowserWindowController awakeFromNib]):
      Add simple implementation of runOpenPanel callback.
      
      * MiniBrowser/win/BrowserView.cpp:
      (BrowserView::create):
      * WebKitTestRunner/TestController.cpp:
      (WTR::createOtherPage):
      (WTR::TestController::initialize):
      Stub out runOpenPanel callback. 
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e7a7cda
  14. 13 Dec, 2010 3 commits
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End,... · a60d0cea
      hyatt@apple.com authored
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. 
      
      Reviewed by Sam Weinig.
      
      Add logical scrolling to WebCore.  It basically mirrors physical scrolling but works in abstract logical
      directions and only converts to physical when it's time to attempt the scroll.
              
      Also fixed bugs in scrollRecursively and logicalScrollRecursively where overflow sections in containing
      frames got skipped over.
              
      Made the resetting of the inline axis scroll position on Home/End Mac-specific for overflow sections.
              
      * WebCore.exp.in:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::logicalScrollOverflow):
      (WebCore::EventHandler::scrollRecursively):
      (WebCore::EventHandler::logicalScrollRecursively):
      * page/EventHandler.h:
      * page/FrameView.cpp:
      (WebCore::FrameView::isVerticalDocument):
      (WebCore::FrameView::isFlippedDocument):
      * page/FrameView.h:
      * platform/ScrollTypes.h:
      (WebCore::logicalToPhysical):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::scroll):
      (WebCore::ScrollView::logicalScroll):
      * platform/ScrollView.h:
      (WebCore::ScrollView::isVerticalDocument):
      (WebCore::ScrollView::isFlippedDocument):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::logicalScroll):
      * rendering/RenderBox.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scroll):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::logicalScroll):
      * rendering/RenderListBox.h:
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::logicalScroll):
      * rendering/RenderTextControlSingleLine.h:
      
      WebKit2: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode.  Use
      logical scrolling instead of physical scrolling for those keys in WebKit2.
      
      Reviewed by Sam Weinig.
      
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::logicalScroll):
      (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
      * WebProcess/WebPage/qt/WebPageQt.cpp:
      (WebKit::logicalScroll):
      (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
      * WebProcess/WebPage/win/WebPageWin.cpp:
      (WebKit::logicalScroll):
      (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a60d0cea
    • antti@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=50758 · 6f72f782
      antti@apple.com authored
      <rdar://problem/8722094> 
      Defer loading print stylesheets
              
      Reviewed by Alexey Proskuryakov.
      
      - Make preload scanner skip stylesheets with non-screen media types.
      - Make it possible to specify non-default load priority from the client.
      - Use this mechanism to load print stylesheets using very low priority so they get loaded after everything else.
      - Move default priority code from Loader to CachedResource.
      - Move ResourceLoadScheduler::Priority enum to a separate file (as ResourceLoadPriority).
      - Add a way to make ResourceLoadScheduler load resources one at the time so the above functionality can be tested reliably.
      
      Tests: http/tests/local/link-stylesheet-load-order-preload.html
             http/tests/local/link-stylesheet-load-order.html
      
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::cachedImage):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::HTMLNames::PreloadTask::PreloadTask):
      (WebCore::HTMLNames::PreloadTask::processAttributes):
      (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet):
      (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
      (WebCore::HTMLNames::PreloadTask::preload):
      * loader/DocumentThreadableLoader.cpp:
      (WebCore::DocumentThreadableLoader::loadRequest):
      * loader/ResourceLoadPriority.h: Added.
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
      (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
      (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
      (WebCore::ResourceLoadScheduler::scheduleLoad):
      (WebCore::ResourceLoadScheduler::servePendingRequests):
      (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
      (WebCore::ResourceLoadScheduler::HostInformation::schedule):
      (WebCore::ResourceLoadScheduler::HostInformation::remove):
      (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
      (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
      * loader/ResourceLoadScheduler.h:
      (WebCore::ResourceLoadScheduler::isSerialLoadingEnabled):
      (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled):
      (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
      * loader/cache/CachedResource.cpp:
      (WebCore::defaultPriorityForResourceType):
      (WebCore::CachedResource::CachedResource):
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::loadPriority):
      (WebCore::CachedResource::setLoadPriority):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestCSSStyleSheet):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::requestPreload):
      * loader/cache/CachedResourceLoader.h:
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::requestResource):
      * loader/cache/MemoryCache.h:
      * loader/loader.cpp:
      (WebCore::Loader::load):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=50758
      <rdar://problem/8722094> 
      Defer loading print stylesheets
              
      Reviewed by Alexey Proskuryakov.
      
      Expose SPI for DRT for making resources load serially. This is useful for testing resource load order.
      
      * WebView/WebView.mm:
      (+[WebView _setLoadResourcesSerially:forHost:]):
      * WebView/WebViewPrivate.h:
      
      WebKitTools: Add setSerializeHTTPLoads function to allow testing resource load order on OS X.
      https://bugs.webkit.org/show_bug.cgi?id=50758
      
      Reviewed by Alexey Proskuryakov.
      
      * DumpRenderTree/LayoutTestController.cpp:
      (setSerializeHTTPLoadsCallback):
      (LayoutTestController::staticFunctions):
      * DumpRenderTree/LayoutTestController.h:
      * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
      (LayoutTestController::setSerializeHTTPLoads):
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (resetDefaultsToConsistentValues):
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::setSerializeHTTPLoads):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::setSerializeHTTPLoads):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=50758
      <rdar://problem/8722094> 
      Defer loading print stylesheets
              
      Reviewed by Alexey Proskuryakov.
      
      Test load ordering.
      
      * http/tests/local/link-stylesheet-load-order-expected.txt: Added.
      * http/tests/local/link-stylesheet-load-order-preload-expected.txt: Added.
      * http/tests/local/link-stylesheet-load-order-preload.html: Added.
      * http/tests/local/link-stylesheet-load-order.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f72f782
    • mdelaney@apple.com's avatar
      2010-12-09 Matthew Delaney <mdelaney@apple.com> · 9b16ce29
      mdelaney@apple.com authored
              Reviewed by Simon Fraser.
      
              Adopt new CG API for canvas
              https://bugs.webkit.org/show_bug.cgi?id=50591
      
              * WebCoreSupport/WebSystemInterface.mm:
      2010-12-09  Matthew Delaney  <mdelaney@apple.com>
      
              Reviewed by Simon Fraser.
      
              Adopt new CG API for canvas
              https://bugs.webkit.org/show_bug.cgi?id=50591
      
              No new tests. All current layout tests are sufficient.
      
              * html/HTMLCanvasElement.cpp: Add in accelerateRendering flag for imagebuffer creation.
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::isAccelerated): Always return true if using CA on new platforms.
              (WebCore::CanvasRenderingContext2D::drawTextInternal): Use accelerateRendering for imagebuffer.
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::create): Plumb through new flag.
              * platform/graphics/cairo/ImageBufferCairo.cpp: Update method sig.
              * platform/graphics/cg/ImageBufferCG.cpp: Switch off of accelerateRendering flag for new accelerated paths.
              * platform/graphics/cg/ImageBufferData.h: Add in surface ref
              * platform/graphics/haiku/ImageBufferHaiku.cpp: Update method sig.
              * platform/graphics/qt/ImageBufferQt.cpp: ^^
              * platform/graphics/skia/ImageBufferSkia.cpp: ^^
              * platform/graphics/wince/ImageBufferWinCE.cpp: ^^
              * platform/graphics/wx/ImageBufferWx.cpp: ^^
              * platform/mac/WebCoreSystemInterface.h: Add new method sigs
              * platform/mac/WebCoreSystemInterface.mm: ^^
              * rendering/RenderLayerBacking.cpp:
              * rendering/RenderLayerCompositor.cpp: Set acceleratesDrawing for canvas backings.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b16ce29
  15. 12 Dec, 2010 1 commit
    • morrita@google.com's avatar
      2010-10-28 MORITA Hajime <morrita@google.com> · 7a18feed
      morrita@google.com authored
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              * editing/spelling/script-tests/spellcheck-paste.js: Added.
              * editing/spelling/spellcheck-paste.html: Added.
              * editing/spelling/spellcheck-paste-expected.txt: Added.
              * platform/chromium/test_expectations.txt:
              * platform/gtk/Skipped:
              * platform/mac-leopard/Skipped:
              * platform/mac-tiger/Skipped:
              * platform/mac-wk2/Skipped:
              * platform/qt/Skipped:
              * platform/win/Skipped:
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              - Introduced SpellChecker class to encapsulate asynchronous spell
                checker state: sequence id, requesting text and target node.
                This is also the first step to decompose spell-check related
                code to a separate class.
              - Added EditorClient::isAsynchronousSpellCheckingEnabled()
                to use async spellcheck API on the platform.
                These APIs are touched by SpellChecker.
              - Used SpellChecker to check a pasted test. Text to check is
                collected from the subtree under the editingRoot.
              - Added Setting::m_asynchronousSpellCheckingEnabled to control
                async spell checking.
      
              Test: editing/spelling/spellcheck-paste.html
      
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/DocumentMarkerController.cpp:
              (WebCore::DocumentMarkerController::showMarkers):
              (showDocumentMarkers):
              * dom/DocumentMarkerController.h:
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::setOffsetInLeafNode):
              * dom/PositionIterator.h:
              * editing/Editor.cpp:
              (WebCore::Editor::replaceSelectionWithFragment):
              (WebCore::Editor::Editor):
              (WebCore::findFirstMarkable):
              (WebCore::Editor::selectionStartHasSpellingMarkerFor):
              * editing/Editor.h:
              (WebCore::Editor::spellChecker):
              * editing/SpellChecker.cpp: Added.
              (WebCore::SpellChecker::SpellChecker):
              (WebCore::SpellChecker::~SpellChecker):
              (WebCore::SpellChecker::initRequest):
              (WebCore::SpellChecker::clearRequest):
              (WebCore::SpellChecker::isAsynchronousEnabled):
              (WebCore::SpellChecker::canCheckAsynchronously):
              (WebCore::SpellChecker::isBusy):
              (WebCore::SpellChecker::isValid):
              (WebCore::SpellChecker::isCheckable):
              (WebCore::SpellChecker::requestCheckingFor):
              (WebCore::forwardIterator):
              (WebCore::SpellChecker::didCheck):
              * editing/SpellChecker.h: Added.
              (WebCore::SpellCheckingResult::SpellCheckingResult):
              (WebCore::SpellCheckingResult::type):
              (WebCore::SpellCheckingResult::location):
              (WebCore::SpellCheckingResult::length):
              * loader/EmptyClients.h:
              (WebCore::EmptyEditorClient::requestCheckingOfString):
              * page/EditorClient.h:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              * page/Settings.h:
              (WebCore::Settings::setAsynchronousSpellCheckingEnabled):
              (WebCore::Settings::asynchronousSpellCheckingEnabled):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * src/EditorClientImpl.h:
              (WebKit::EditorClientImpl::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebCoreSupport/EditorClientEfl.h:
              (WebCore::EditorClientEfl::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebCoreSupport/EditorClientGtk.h:
              (WebKit::EditorClient::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebCoreSupport/EditorClientHaiku.h:
              (WebCore::EditorClientHaiku::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added asynchronous spell checking API to WebEditorClient using
              -[NSSpellChecker requestCheckingOfString].
              Note that WebEditorSpellCheckResponder is a small class to receive
              requested spell-checking result. Note that this feature is
              disabled at default.
      
              Also added [WebPreferences setAsynchronousSpellCheckingEnabled:] to
              enable the feature from LayoutTestController.
      
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              (-[WebEditorSpellCheckResponder initWithSender:WebCore::sequence:results:]):
              (-[WebEditorSpellCheckResponder perform]):
              (toCoreSpellingResult):
              (-[WebEditorSpellCheckResponder WTF::WebCore::]):
              (WebEditorClient::requestCheckingOfString):
              * WebView/WebPreferenceKeysPrivate.h:
              * WebView/WebPreferences.mm:
              (+[WebPreferences initialize]):
              (-[WebPreferences setAsynchronousSpellCheckingEnabled:]):
              (-[WebPreferences asynchronousSpellCheckingEnabled]):
              * WebView/WebPreferencesPrivate.h:
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebCoreSupport/EditorClientQt.h:
              (WebCore::EditorClientQt::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebCoreSupport/WebEditorClient.h:
              (WebEditorClient::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebCoreSupport/EditorClientWinCE.h:
              (WebKit::EditorClient::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebKitSupport/EditorClientWx.h:
              (WebCore::EditorClientWx::requestCheckingOfString):
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added a stub implememntation.
      
              * WebProcess/WebCoreSupport/WebEditorClient.cpp:
              (WebKit::WebEditorClient::requestCheckingOfString):
              * WebProcess/WebCoreSupport/WebEditorClient.h:
      2010-10-28  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ojan Vafai.
      
              spellcheck does not check pasted text
              https://bugs.webkit.org/show_bug.cgi?id=40092
      
              Added LayoutTestController::setAsynchronousSpellCheckingEnabled()
              to control the setting.
      
              * DumpRenderTree/LayoutTestController.cpp:
              (setAsynchronousSpellCheckingEnabledCallback):
              (LayoutTestController::staticFunctions):
              * DumpRenderTree/LayoutTestController.h:
              * DumpRenderTree/chromium/LayoutTestController.h:
              * DumpRenderTree/chromium/LayoutTestController.cpp:
              (LayoutTestController::LayoutTestController):
              (LayoutTestController::setAsynchronousSpellCheckingEnabled):
              * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
              (LayoutTestController::setAsynchronousSpellCheckingEnabled):
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (resetDefaultsToConsistentValues):
              * DumpRenderTree/mac/LayoutTestControllerMac.mm:
              (LayoutTestController::setAsynchronousSpellCheckingEnabled):
              * DumpRenderTree/qt/LayoutTestControllerQt.h:
              * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
              (LayoutTestController::setAsynchronousSpellCheckingEnabled):
              * DumpRenderTree/win/LayoutTestControllerWin.cpp:
              (LayoutTestController::setAsynchronousSpellCheckingEnabled):
              * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
              (LayoutTestController::setAsynchronousSpellCheckingEnabled):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a18feed
  16. 09 Dec, 2010 4 commits
    • timothy@apple.com's avatar
      WebCore: Export Color::white and Color::transparent. · b92d8776
      timothy@apple.com authored
      Reviewed by Anders Carlsson.
      
      * WebCore.exp.in:
      
      WebKit2: Add support for transparent WebKit2 WKViews.
      
      https://webkit.org/b/50785
      
      Reviewed by Anders Carlsson.
      
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode): Encode drawsBackground and drawsTransparentBackground.
      (WebKit::WebPageCreationParameters::decode): Decode drawsBackground and drawsTransparentBackground.
      * Shared/WebPageCreationParameters.h:
      * UIProcess/API/mac/WKView.h:
      * UIProcess/API/mac/WKView.mm:
      (-[WKView setDrawsBackground:]): Added.
      (-[WKView drawsBackground]): Added.
      (-[WKView setDrawsTransparentBackground:]): Added.
      (-[WKView drawsTransparentBackground]): Added.
      (-[WKView drawRect:]): Only fill the background if the WebProcess isn't valid and drawsBackground.
      Use white or clear based on setDrawsTransparentBackground.
      (-[WKView isOpaque]): Return drawsBackground.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy): Initialize m_drawsBackground and m_drawsTransparentBackground.
      (WebKit::WebPageProxy::setDrawsBackground): Added. Send a SetDrawsBackground message.
      (WebKit::WebPageProxy::setDrawsTransparentBackground): Added. Send a SetDrawsTransparentBackground message.
      (WebKit::WebPageProxy::creationParameters): Set drawsBackground and drawsTransparentBackground.
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::drawsBackground): Added. Return m_drawsBackground.
      (WebKit::WebPageProxy::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
      * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
      (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): Use the copy blend mode when drawing a background.
      (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Use the copy blend mode to replace existing content.
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Setup the new view's background color and transparent flag.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Initialize m_drawsBackground and m_drawsTransparentBackground.
      (WebKit::WebPage::setDrawsBackground): Added. Propagate the flag to the FrameViews.
      (WebKit::WebPage::setDrawsTransparentBackground): Added. Propagate the background color to the FrameViews.
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::drawsBackground): Added. Return m_drawsBackground.
      (WebKit::WebPage::drawsTransparentBackground): Added. Return m_drawsTransparentBackground.
      * WebProcess/WebPage/WebPage.messages.in: Added SetDrawsBackground and SetDrawsTransparentBackground.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b92d8776
    • weinig@apple.com's avatar
      Try and fix the mac build. · 66860cfd
      weinig@apple.com authored
      * WebCore.exp.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66860cfd
    • 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
  17. 08 Dec, 2010 2 commits
    • bweinstein@apple.com's avatar
      Layering Violation in ContextMenu - member variable of type HitTestResult · ff7b94c4
      bweinstein@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50586
              
      Reviewed by John Sullivan.
      
      WebCore: 
      
      ContextMenu had a layering violation by having a member variable of type HitTestResult, because
      classes in WebCore/platform can't know about classes in WebCore.
              
      This patch moves the HitTestResult and all functions that use it out of ContextMenu into ContextMenuController.
      All of the functions that dealt with populating the ContextMenu are now in ContextMenuController, and this
      allowed us to delete the ContextMenu file, putting all of the cross-platform code that used to be it
      in ContextMenuController, and the rest of the code is in the platform-specific files.
      
      No change in behavior, no new tests.
      
      * Android.mk: Removed ContextMenu.cpp.
      * CMakeLists.txt: Ditto.
      * GNUmakefile.am: Ditto.
      * WebCore.gypi: Ditto.
      * WebCore.pro: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::ContextMenuController): Initialized m_hitTestResult to an empty HitTestResult.
      (WebCore::ContextMenuController::handleContextMenuEvent): Call populate on the ContextMenuController instead
          of the ContextMenu.
      (WebCore::ContextMenuController::createContextMenu): Fix some indination, and store the HitTestResult in a member
          variable.
      (WebCore::ContextMenuController::showContextMenu): Call addInspectElementItem on the ContextMenuController.
      (WebCore::ContextMenuController::contextMenuItemSelected): Use m_hitTestResult whenever we need a HitTestResult.
      (WebCore::ContextMenuController::appendItem): Validates the item for its state, and then appends it to the parent menu.
          This allowed us to move checkOrEnableIfNeeded from ContextMenu.
      
      These functions were all moved from ContextMenu, and changed slightly to fit in ContextMenuController.
      All calls to ContextMenu::appendItem were changed to ContextMenuController::appendItem, which takes care
      of validating the menu.
      (WebCore::separatorItem): Moved from ContextMenu.
      (WebCore::ContextMenuController::createAndAppendFontSubMenu): Ditto.
      (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): Ditto.
      (WebCore::ContextMenuController::createAndAppendSpeechSubMenu): Ditto.
      (WebCore::ContextMenuController::createAndAppendWritingDirectionSubMenu): Ditto.
      (WebCore::ContextMenuController::createAndAppendTextDirectionSubMenu): Ditto.
      (WebCore::ContextMenuController::createAndAppendSubstitutionsSubMenu): Ditto.
      (WebCore::ContextMenuController::createAndAppendTransformationsSubMenu): Ditto.
      (WebCore::selectionContainsPossibleWord): Ditto.
      (WebCore::ContextMenuController::populate): Ditto.
      (WebCore::ContextMenuController::addInspectElementItem): Ditto.
      (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto.
              
      * page/ContextMenuController.h:
      (WebCore::ContextMenuController::hitTestResult): Returns the HitTestResult of the current ContextMenu.
      
      * platform/ContextMenu.cpp: Removed.
      * platform/ContextMenu.h:
      * platform/efl/ContextMenuEfl.cpp:
      (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
      (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
      * platform/gtk/ContextMenuGtk.cpp:
      (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
      (WebCore::ContextMenu::appendItem): Ditto.
      * platform/haiku/ContextMenuHaiku.cpp:
      (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
      (WebCore::ContextMenu::appendItem): Ditto.
      (WebCore::ContextMenu::insertItem): Ditto.
      * platform/mac/ContextMenuMac.mm:
      (-[WebCoreMenuTarget validateMenuItem:]): Calls checkOrEnableIfNeeded on the controller instead of
          the context menu.
      (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
      (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
      (WebCore::ContextMenu::insertItem): Ditto.
      * platform/win/ContextMenuWin.cpp:
      (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
      (WebCore::ContextMenu::insertItem): Removed the call to checkOrEnableIfNeeded.
      * platform/wx/ContextMenuWx.cpp:
      (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
      (ContextMenu::appendItem): Ditto.
      
      WebKit/chromium: 
      
      Update users of ContextMenu and ContextMenuController to match where the new functions 
      are located.
      
      * src/ContextMenuClientImpl.cpp:
      (WebKit::selectMisspelledWord):
      (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
      
      WebKit/gtk: 
      
      Update users of ContextMenu and ContextMenuController to match where the new functions 
      are located.
      
      * WebCoreSupport/ContextMenuClientGtk.cpp:
      (WebKit::ContextMenuClient::getCustomMenuFromDefaultItems):
      
      WebKit/mac: 
      
      Update users of ContextMenu and ContextMenuController to match where the new functions 
      are located.
      
      * WebCoreSupport/WebContextMenuClient.mm:
      (WebContextMenuClient::getCustomMenuFromDefaultItems):
      (WebContextMenuClient::contextMenuItemSelected):
      * WebView/WebHTMLView.mm:
      (-[WebMenuTarget validateMenuItem:]):
      
      WebKit/qt: 
      
      Update users of ContextMenu and ContextMenuController to match where the new functions 
      are located.
      
      * Api/qwebpage.cpp:
      (QWebPagePrivate::createContextMenu):
      (QWebPage::updatePositionDependentActions):
      
      WebKit/win: 
      
      Update users of ContextMenu and ContextMenuController to match where the new functions 
      are located.
      
      * WebCoreSupport/WebContextMenuClient.cpp:
      (WebContextMenuClient::getCustomMenuFromDefaultItems): Get the HitTestResult and ContextMenu from the 
          ContextMenuController (from the page).
      (WebContextMenuClient::contextMenuItemSelected): Get the HitTestResult from the ContextMenuController.
      * WebView.cpp:
      (WebView::handleContextMenuEvent): Ditto.
      
      WebKit2: 
      
      Update users of ContextMenu and ContextMenuController to match where the new functions 
      are located.
      
      * Shared/WebContextMenuItemData.cpp:
      (WebKit::WebContextMenuItemData::WebContextMenuItemData): Remove the call to checkOrEnableItem, that call will be made when
          the ContextMenuItem is added to the ContextMenu through the ContextMenuController.
      * WebProcess/WebPage/WebContextMenu.cpp:
      (WebKit::WebContextMenu::show):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff7b94c4
    • jberlin@webkit.org's avatar
      WebKit2: Implement WebChromeClient::exceededDatabaseQuota · b646cd5e
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=50656
      
      Reviewed by Adam Roben.
      
      WebCore: 
      
      * WebCore.exp.in:
      Export the symbol for SecurityOrigin::databaseIdentifier.
      
      WebKit2: 
      
      The exceededDatabaseQuota call from the WebProcess to the UIProcess needs to be synchronous
      because the new quota is checked directly after exceededDatabaseQuota returns in order to
      determine if the new Database can be created.
      
      Pass all of the details from the WebProcess to the UIProcess in order to inform the
      decision in the UIProcess about the new quota. In WebKit1, these details were
      fetched through an additional call to the API detailsForDatabase (which is infeasible in
      WebKit2 since exceededDatabaseQuota is a synchronous call).
      
      * Platform/CoreIPC/HandleMessage.h:
      (CoreIPC::callMemberFunction):
      Add a version that takes 7 parameters.
      
      * UIProcess/API/C/WKPage.h:
      
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage):
      Indicate that exceededDatabaseQuota is not implemented.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::exceededDatabaseQuota):
      Call the UIClient's exceededDatabaseQuota
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      
      * UIProcess/WebUIClient.cpp:
      (WebKit::WebUIClient::exceededDatabaseQuota):
      If the client does not implement exceededDatabaseQuota, return a the current quota.
      * UIProcess/WebUIClient.h:
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::exceededDatabaseQuota):
      Send a synchronous message to the UIProcess to ask for the new quota for the origin for the
      given frame.
      
      WebKitTools: 
      
      * MiniBrowser/mac/BrowserWindowController.m:
      (-[BrowserWindowController awakeFromNib]):
      Indicate that exceededDatabaseQuota is not implemented.
      * MiniBrowser/win/BrowserView.cpp:
      (BrowserView::create):
      Ditto.
      * WebKitTestRunner/TestController.cpp:
      (WTR::createOtherPage):
      Ditto.
      (WTR::TestController::initialize):
      Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b646cd5e
  18. 07 Dec, 2010 2 commits
    • bweinstein@apple.com's avatar
      Part of Layering Violation in ContextMenu · 60350d69
      bweinstein@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50586
              
      Reviewed by John Sullivan.
      
      WebCore: 
      
      ContextMenuMac.mm had a WebCoreMenuTarget class, which was responsible for wrapping
      a ContextMenuItem, and calling through to the ContextMenuController to validate it
      and call a function when it was selected.
              
      It was a layering violation to have this class here, because ContextMenu can't know
      about ContextMenuController.
              
      This patch moves the class that wraps the ContextMenuItems to WebKit/mac/WebHTMLView.mm,
      and sets up the menu targets there.
      
      No change in behavior, no new tests.
      
      * WebCore.exp.in: Added function that needs to be exported.
      * platform/mac/ContextMenuMac.mm:
      (WebCore::ContextMenu::ContextMenu): Don't set the sharedMenuTarget anymore.
      (WebCore::ContextMenu::appendItem): Don't call setMenuItemTarget (this is done in WebKit now).
      (WebCore::ContextMenu::insertItem): Ditto.
      
      WebKit/mac: 
      
      Move WebMenuTarget from ContextMenuMac to here, because having it in ContextMenuMac
      was a layering violation. Also, make sure we set the menu item targets for all menu
      items before showing them, because the ContextMenu constructor doesn't do that anymore.
      
      * WebView/WebHTMLView.mm:
      (+[WebMenuTarget sharedMenuTarget]): Moved from ContextMenuMac.mm.
      (-[WebMenuTarget WebCore::]): Ditto.
      (-[WebMenuTarget setMenuController:WebCore::]): Ditto.
      (-[WebMenuTarget forwardContextMenuAction:]): Ditto.
      (-[WebMenuTarget validateMenuItem:]): Ditto.
      
      (setMenuItemTarget): Sets the target of the NSMenuItem to the shared WebMenuTarget.
      (setMenuTargets): Recursively iterates over all NSMenuItems in an NSMenu (including
          submenus), and calls setMenuItemTarget on them.
      (-[WebHTMLView menuForEvent:]): Call setMenuTarget on all the menu items before adding
          them to the menu.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60350d69
    • tkent@chromium.org's avatar
      2010-12-07 Kenichi Ishibashi <bashi@google.com> · 995765c6
      tkent@chromium.org authored
              Reviewed by Kent Tamura.
      
              Let HTMLObjectElement be a form associated element
              https://bugs.webkit.org/show_bug.cgi?id=48821
      
              Introduces FormAssociatedElement class which would be a super class
              of form assocated elements. Some of member functions and variables of
              HTMLFormControlElement are migrated into this class.
              Following the HTML5 spec, HTMLFormControlElement class and
              HTMLObjectElement class are subclasses of it for now.
      
              Test: fast/forms/form-collection-elements-order.html
      
              * Android.mk: Added FormAssociatedElement.cpp
              * CMakeLists.txt: Ditto.
              * GNUmakefile.am: Added FormAssociatedElement.{cpp,h}
              * WebCore.exp.in: Added the symbol for toHTMLElement(FormAssociatedElement*)
              * WebCore.gypi: Added FormAssociatedElement.{cpp,h}
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * dom/CheckedRadioButtons.h: Fixed class forward declaration order.
              * dom/Document.cpp:
              (WebCore::Document::registerFormElementWithFormAttribute): Modified to
              use FormAssociatedElement instead of HTMLFormControlElement
              (WebCore::Document::unregisterFormElementWithFormAttribute): Ditto.
              (WebCore::Document::resetFormElementsOwner):
              * dom/Document.h: Ditto.
              * html/DOMFormData.cpp: Ditto.
              (WebCore::DOMFormData::DOMFormData):
              * html/FormAssociatedElement.cpp: Copied and renamed from WebCore/html/HTMLFormControlElement.cpp.
              (WebCore::FormAssociatedElement::FormAssociatedElement):
              (WebCore::FormAssociatedElement::~FormAssociatedElement):
              (WebCore::FormAssociatedElement::validity):
              (WebCore::FormAssociatedElement::insertedIntoTree):
              (WebCore::FormAssociatedElement::removedFromTree):
              (WebCore::FormAssociatedElement::removeFromForm):
              (WebCore::FormAssociatedElement::resetFormOwner):
              (WebCore::FormAssociatedElement::formAttributeChanged):
              (WebCore::toHTMLElement):
              * html/FormAssociatedElement.h: Ditto.
              (WebCore::FormAssociatedElement::ref):
              (WebCore::FormAssociatedElement::deref):
              (WebCore::FormAssociatedElement::formDestroyed):
              (WebCore::FormAssociatedElement::setForm):
              * html/HTMLElement.h: Changed the access level of findFormAncestor().
              * html/HTMLFormCollection.cpp:
              (WebCore::HTMLFormCollection::item): Modified to use FormAssociatedElement
              instead of HTMLFormControlElement.
              (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
              (WebCore::HTMLFormCollection::updateNameCache): Ditto.
              * html/HTMLFormControlElement.cpp: Modified regarding with the change of class
              hierarchy.
              (WebCore::HTMLFormControlElement::HTMLFormControlElement):
              (WebCore::HTMLFormControlElement::~HTMLFormControlElement):
              (WebCore::HTMLFormControlElement::insertedIntoTree):
              (WebCore::HTMLFormControlElement::removedFromTree):
              (WebCore::HTMLFormControlElement::supportsFocus):
              (WebCore::HTMLFormControlElement::checkValidity):
              (WebCore::HTMLFormControlElement::virtualForm):
              (WebCore::HTMLFormControlElement::isDefaultButtonForForm):
              (WebCore::HTMLFormControlElement::attributeChanged):
              * html/HTMLFormControlElement.h: Ditto.
              (WebCore::HTMLFormControlElement::form):
              (WebCore::HTMLFormControlElement::disabled):
              (WebCore::HTMLFormControlElement::type):
              (WebCore::HTMLFormControlElement::refFormAssociatedElement):
              (WebCore::HTMLFormControlElement::derefFormAssociatedElement):
              * html/HTMLFormElement.cpp: Modified to use FormAssociatedElement
              instead of HTMLFormControlElement.
              (WebCore::HTMLFormElement::submitImplicitly):
              (WebCore::HTMLFormElement::validateInteractively):
              (WebCore::HTMLFormElement::submit):
              (WebCore::HTMLFormElement::reset):
              (WebCore::HTMLFormElement::formElementIndexWithFormAttribute):
              (WebCore::HTMLFormElement::formElementIndex):
              (WebCore::HTMLFormElement::registerFormElement):
              (WebCore::HTMLFormElement::removeFormElement):
              (WebCore::HTMLFormElement::defaultButton):
              (WebCore::HTMLFormElement::checkValidity):
              (WebCore::HTMLFormElement::collectUnhandledInvalidControls):
              (WebCore::HTMLFormElement::documentDidBecomeActive):
              * html/HTMLFormElement.h: Ditto.
              (WebCore::HTMLFormElement::associatedElements):
              * html/HTMLInputElement.cpp: Ditto.
              (WebCore::HTMLInputElement::updateCheckedRadioButtons):
              * html/HTMLObjectElement.cpp: Modified regarding with the change of class
              hierarchy.
              (WebCore::HTMLObjectElement::HTMLObjectElement):
              (WebCore::HTMLObjectElement::~HTMLObjectElement):
              (WebCore::HTMLObjectElement::create):
              (WebCore::HTMLObjectElement::attributeChanged):
              (WebCore::HTMLObjectElement::insertedIntoTree):
              (WebCore::HTMLObjectElement::removedFromTree):
              (WebCore::HTMLObjectElement::appendFormData):
              (WebCore::HTMLObjectElement::formControlName):
              * html/HTMLObjectElement.h: Ditto.
              (WebCore::HTMLObjectElement::form):
              (WebCore::HTMLObjectElement::isFormControlElement):
              (WebCore::HTMLObjectElement::isEnumeratable):
              (WebCore::HTMLObjectElement::refFormAssociatedElement):
              (WebCore::HTMLObjectElement::derefFormAssociatedElement):
              * html/HTMLTagNames.in: Added constructorNeedsFormElement to object tag.
              * html/ValidationMessage.cpp: Modified to use FormAssociatedElement
              instead of HTMLFormControlElement.
              (WebCore::ValidationMessage::ValidationMessage):
              (WebCore::ValidationMessage::create):
              * html/ValidationMessage.h: Ditto.
              * html/ValidityState.cpp: Ditto.
              (WebCore::ValidityState::validationMessage):
              (WebCore::ValidityState::setCustomErrorMessage):
              (WebCore::ValidityState::valueMissing):
              (WebCore::ValidityState::typeMismatch):
              (WebCore::ValidityState::patternMismatch):
              (WebCore::ValidityState::tooLong):
              (WebCore::ValidityState::rangeUnderflow):
              (WebCore::ValidityState::rangeOverflow):
              (WebCore::ValidityState::stepMismatch):
              * html/ValidityState.h: Ditto.
              (WebCore::ValidityState::create):
              (WebCore::ValidityState::ValidityState):
              * loader/FormSubmission.cpp: Ditto.
              (WebCore::FormSubmission::create):
      
      2010-12-07  Kenichi Ishibashi  <bashi@google.com>
      
              Reviewed by Kent Tamura.
      
              Let HTMLObjectElement be a form associated element
              https://bugs.webkit.org/show_bug.cgi?id=48821
      
              Modified to use FormAssociatedElement instead of HTMLFormControlElement.
      
              * src/WebFormElement.cpp: 
              (WebKit::WebFormElement::getFormControlElements): Modified to use
              FormAssociatedElement instead of HTMLFormControlElement.
              * src/WebPasswordFormUtils.cpp:
              (WebKit::findPasswordFormFields): Ditto.
              * src/WebSearchableFormData.cpp:
              (WebCore::GetButtonToActivate): Ditto.
              (WebCore::HasSuitableTextElement): Ditto.
      
      2010-12-07  Kenichi Ishibashi  <bashi@google.com>
      
              Reviewed by Kent Tamura.
      
              Let HTMLObjectElement be a form associated element
              https://bugs.webkit.org/show_bug.cgi?id=48821
      
              Modified to use FormAssociatedElement instead of HTMLFormControlElement.
      
              * WebFrame.cpp:
              (WebFrame::elementWithName): Modified to use FormAssociatedElement
              instead of HTMLFormControlElement.
              (WebFrame::controlsInForm): Ditto.
      
      2010-12-07  Kenichi Ishibashi  <bashi@google.com>
      
              Reviewed by Kent Tamura.
      
              Let HTMLObjectElement be a form associated element
              https://bugs.webkit.org/show_bug.cgi?id=48821
      
              Modified to use FormAssociatedElement instead of HTMLFormControlElement.
      
              * WebView/WebHTMLRepresentation.mm:
              (-[WebHTMLRepresentation elementWithName:inForm:]): Modified to use
              FormAssociatedElement instead of HTMLFormControlElement.
              (-[WebHTMLRepresentation controlsInForm:]): Ditto.
      
      2010-12-07  Kenichi Ishibashi  <bashi@google.com>
      
              Reviewed by Kent Tamura.
      
              Let HTMLObjectElement be a form associated element
              https://bugs.webkit.org/show_bug.cgi?id=48821
      
              Adds a test to ensure the order of form.elements attribute.
              Updates two tests to check whether object elements are handled
              correctly in form.elements attribute.
      
              * fast/forms/form-attribute-expected.txt: Updated.
              * fast/forms/form-collection-elements-order-expected.txt: Added.
              * fast/forms/form-collection-elements-order.html: Added.
              * fast/forms/script-tests/form-attribute.js: Updated.
              * fast/forms/script-tests/form-collection-elements-order.js: Added.
              (checkOrder):
              * fast/forms/script-tests/form-collection-elements.js: Updated.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      995765c6
  19. 06 Dec, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-12-06 Ryosuke Niwa <rniwa@webkit.org> · 5359dff3
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              ApplyStyleCommand should take EditingStyle instead of CSSStyleDeclaration
              https://bugs.webkit.org/show_bug.cgi?id=49938
      
              Modified ApplyStyleCommand::ApplyStyleCommand and ApplyStyleCommand::create to take EditingStyle*
              instead of CSSStyleDeclaration*. Also replaced much of code in Editor::computeAndSetTypingStyle
              by calls to EditingStyle's member functions and extracted EditingStyle::overrideWith and
              EditingStyle::extractAndRemoveBlockProperties.
      
              No new tests are added since this is a refactoring.
      
              * WebCore.exp.in: Added SelectionController::copyTypingStyle and EditingStyle::~EditingStyle.
              * css/CSSMutableStyleDeclaration.cpp: Made CSSMutableStyleDeclaration* in the argument list const.
              (WebCore::CSSMutableStyleDeclaration::merge):
              * css/CSSMutableStyleDeclaration.h:
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::ApplyStyleCommand): Takes EditingStyle* instead of CSSStyleDeclaration*.
              (WebCore::ApplyStyleCommand::doApply): Uses EditingStyle.
              * editing/ApplyStyleCommand.h: m_style is now a ref-pointer to EditingStyle instead of CSSMutableStyleDeclaration.
              (WebCore::ApplyStyleCommand::create): Takes EditingStyle* instead of CSSStyleDeclaration*.
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::applyStyle): Ditto.
              (WebCore::CompositeEditCommand::moveParagraphs): Calls applyStyle.
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
              * editing/CompositeEditCommand.h:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
              * editing/EditCommand.cpp:
              * editing/EditCommand.h:
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::~EditingStyle): Added.
              (WebCore::EditingStyle::overrideWithStyle): Extracted from Editor::calculateTypingStyleAfterDelete.
              (WebCore::EditingStyle::copy): Added.
              (WebCore::EditingStyle::extractAndRemoveBlockProperties): Extracted from Editor::calculateTypingStyleAfterDelete.
              * editing/EditingStyle.h:
              * editing/Editor.cpp:
              (WebCore::Editor::applyStyle): Calls ApplyStyleCommand::create.
              (WebCore::Editor::applyParagraphStyle): Ditto.
              (WebCore::Editor::computeAndSetTypingStyle): Ditto.
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::doApply): Calls applyStyle.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input): Ditto.
              * editing/RemoveFormatCommand.cpp:
              (WebCore::RemoveFormatCommand::doApply): Calls ApplyStyleCommand::create.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Calls applyStyle.
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::copyTypingStyle): Moved from SelectionController.h
              * editing/SelectionController.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5359dff3
  20. 04 Dec, 2010 1 commit
    • mitz@apple.com's avatar
      2010-12-04 Dan Bernstein <mitz@apple.com> · 1506e874
      mitz@apple.com authored
              Reviewed by Sam Weinig.
      
              WebKit part of <rdar://problem/8145955> Add text search API for counting/marking/highlighting matches in a range
              https://bugs.webkit.org/show_bug.cgi?id=50530
      
              * WebView/WebDocumentInternal.h: Added a DOMRange parameter to -countMatchesForText:options:limit:markMatches:
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]): Added DOMRange parameter,
              which is passed through to WebCore.
              * WebView/WebPDFView.mm:
              (isFrameInRange): Added this helper function.
              (-[WebPDFView countMatchesForText:inDOMRange:options:limit:markMatches:]): Added DOMRange parameter and
              a check if the frame is in the range.
              * WebView/WebView.mm:
              (-[WebView countMatchesForText:options:highlight:limit:markMatches:]): Now calls the inDOMRange: version.
              (-[WebView countMatchesForText:inDOMRange:options:highlight:limit:markMatches:]): Added DOMRange
              parameter, which is passed to document views' -countMatchesForText:inDOMRange:options:limit:markMatches:.
              * WebView/WebViewPrivate.h:
      2010-12-04  Dan Bernstein  <mitz@apple.com>
      
              Reviewed by Sam Weinig.
      
              WebCore part of <rdar://problem/8145955> Add text search API for counting/marking/highlighting matches in a range
              https://bugs.webkit.org/show_bug.cgi?id=50530
      
              * WebCore.exp.in: Export Range version of countMatchesForText().
              * editing/Editor.cpp:
              (WebCore::isFrameInRange): Added this helper method.
              (WebCore::Editor::countMatchesForText): Added a Range parameter and restricted the result to
              matches that occur in the range.
              * editing/Editor.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1506e874
  21. 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