1. 24 Jan, 2011 1 commit
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · 34341a9c
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Reset the page scale factor on standard frame loads
              https://bugs.webkit.org/show_bug.cgi?id=53058
              <rdar://problem/8908844>
      
              Add a symbol needed by WebKit2.
      
              * WebCore.exp.in:
      2011-01-24  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Reset the page scale factor on standard frame loads
              https://bugs.webkit.org/show_bug.cgi?id=53058
              <rdar://problem/8908844>
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::scaleWebView):
              Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
      
              (WebKit::WebPageProxy::viewScaleFactorDidChange):
              Update m_viewScaleFactor.
      
              * UIProcess/WebPageProxy.h:
              Add viewScaleFactorDidChange.
      
              * UIProcess/WebPageProxy.messages.in:
              Add ViewScaleFactorDidChange message.
      
              * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
              Set the scale factor.
      
              (WebKit::WebFrameLoaderClient::restoreViewState):
              Inform the UI process about the new view scale factor.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::scaleWebView):
              Send a ViewScaleFactorDidChange message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34341a9c
  2. 23 Jan, 2011 1 commit
  3. 22 Jan, 2011 1 commit
    • andersca@apple.com's avatar
      2011-01-22 Anders Carlsson <andersca@apple.com> · f3248c7d
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Add an asynchronous WKPageForceRepaint
              https://bugs.webkit.org/show_bug.cgi?id=52964
              <rdar://problem/8898527>
      
              * UIProcess/API/C/WKPage.cpp:
              (WKPageForceRepaint):
              Call WebPageProxy::forceRepaint.
      
              * UIProcess/API/C/WKPage.h:
              Add WKPageForceRepaint.
      
              * UIProcess/GenericCallback.h:
              Add a "generic" VoidCallback class.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::forceRepaint):
              Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
      
              (WebKit::WebPageProxy::voidCallback):
              Call the right void callback.
      
              (WebKit::WebPageProxy::processDidCrash):
              Invalidate m_voidCallbacks.
      
              * UIProcess/WebPageProxy.messages.in:
              Add a VoidCallback message.
      
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
              (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
              Force a repaint.
      
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
              Add forceRepaint.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::forceRepaint):
              Call forceRepaint on the drawing area.
      
              * WebProcess/WebPage/WebPage.messages.in:
              Add a ForceRepaint message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3248c7d
  4. 21 Jan, 2011 1 commit
    • darin@apple.com's avatar
      WebKit2: Implement showModalDialog · 3ed100bb
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52855
      
      Reviewed by Dan Bernstein.
      
      Source/WebKit2: 
      
      * Shared/WebPageCreationParameters.h: Added canRunModal.
      
      * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
      WKPageUIClient. Also removed a lot of redundant typedefs and added
      a new one, WKPageCallback, for callbacks without arguments or return
      values.
      
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage): Added a runModal function pointer of 0.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::creationParameters): Set canRunModal
      based on return value of WebUIClient::canRunModal.
      
      * UIProcess/WebPageProxy.h: Added runModal.
      Calls WebUIClient::runModal.
      
      * UIProcess/WebPageProxy.messages.in: Added RunModal message.
      Also removed the periods from the phrases in the comments
      as Maciej requested a while back.
      
      * UIProcess/WebUIClient.cpp:
      (WebKit::WebUIClient::canRunModal): Added. Returns true or false
      based on whether a runModal function was supplied in the
      WKPageUIClient structure.
      (WebKit::WebUIClient::runModal): Added. Calls the runModal
      function from the WKPageUIClient structure.
      * UIProcess/WebUIClient.h: Declared the above functions.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
      (WebKit::WebChromeClient::runModal): Ditto.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
      creation parameters. Initialize m_isRunningModal to false.
      (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
      (WebKit::WebPage::runModal): Send a message to ask the UI process to run
      modal and then start a nested run loop. It gets stopped when the page is closed.
      * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
      and declared the runModal function.
      
      Tools: 
      
      This fixes WebKitTestRunner to compile, but more work is probably
      needed to get it to pass the tests.
      
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::runModal): Added. Calls through to the
      platform-specific version of runModal.
      (WTR::TestController::createOtherPage): Changed to be a private
      static member function so it can refer to runModal, which is
      a private static member function.
      (WTR::TestController::initialize): Pass 0 for the runModal
      function since we don't need to run the main window modal.
      I suspect this is wrong and will need to change.
      * WebKitTestRunner/TestController.h: Added declarations for
      the functions added above.
      * WebKitTestRunner/mac/TestControllerMac.mm:
      (WTR::TestController::runModal): Added. Untested implementation.
      * WebKitTestRunner/qt/TestControllerQt.cpp:
      (WTR::TestController::runModal): Added.
      * WebKitTestRunner/win/TestControllerWin.cpp:
      (WTR::TestController::runModal): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ed100bb
  5. 20 Jan, 2011 1 commit
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · 02315226
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=52849
              Make window.print work with WebKit2
      
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPage::QWKPage):
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::printFrame):
              * UIProcess/WebPageProxy.h:
              * UIProcess/WebPageProxy.messages.in:
              * UIProcess/WebUIClient.cpp:
              (WebKit::WebUIClient::printFrame):
              * UIProcess/WebUIClient.h:
              * WebProcess/WebCoreSupport/WebChromeClient.cpp:
              (WebKit::WebChromeClient::print):
              Just pass through deelagte call to a WebKit2 client.
      
              * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
              types.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02315226
  6. 19 Jan, 2011 3 commits
    • enrica@apple.com's avatar
      WebKit2: add support for drag and drop · 3c5560ef
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      This patch contains the remaining work to support drag and drop on Mac.
      I've added a PasteboardTypes class to encapsulate all the pasteboard formats
      supported for drag and drop.
      In this implementation we don't support the promised types, since I could not
      find an efficient way to do this across processes.
      The bulk of the patch consists in creating a shareable bitmap for the drag image,
      pass its handle to the UI process and create a new NSImage from it to be given to
      AppKit for dragging.
      I've added the missing implementation of the methods in the drag client to hook
      up the placement of the data in the pasteboard.
              
      * Shared/mac/PasteboardTypes.h: Added.
      * Shared/mac/PasteboardTypes.mm: Added.
      (WebKit::PasteboardTypes::forEditing):
      (WebKit::PasteboardTypes::forURL):
      (WebKit::PasteboardTypes::forImages):
      (WebKit::PasteboardTypes::forImagesWithArchive):
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::setDragImage): Added.
      * UIProcess/API/mac/WKView.mm:
      (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView _setMouseDownEvent:]):
      (-[WKView _mouseHandler:]):
      (-[WKView mouseDown:]):
      (-[WKView mouseUp:]):
      (-[WKView mouseDragged:]):
      (-[WKView draggedImage:endedAt:operation:]):
      (-[WKView draggingEntered:]):
      (-[WKView _setDragImage:at:linkDrag:]):
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::setDragImage):
      (WebKit::WebPageProxy::dragEnded):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
      (WebKit::fontFromNSFont):
      (WebKit::WebDragClient::startDrag): Added implementation.
      (WebKit::WebDragClient::createDragImageForLink): Ditto.
      (WebKit::writeURL): Helper function.
      (WebKit::writeImage): Helper function.
      (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::dragEnded):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c5560ef
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · c44bd669
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=52739
              Make it possible for a WebKit2 client to print headers and footers
      
              * UIProcess/API/C/WKPage.h:
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::headerHeight):
              (WebKit::WebPageProxy::footerHeight):
              (WebKit::WebPageProxy::drawHeader):
              (WebKit::WebPageProxy::drawFooter):
              * UIProcess/WebPageProxy.h:
              * UIProcess/WebUIClient.cpp:
              (WebKit::WebUIClient::headerHeight):
              (WebKit::WebUIClient::footerHeight):
              (WebKit::WebUIClient::drawHeader):
              (WebKit::WebUIClient::drawFooter):
              * UIProcess/WebUIClient.h:
              Pass UIClient calls through.
      
              * UIProcess/API/mac/WKView.mm:
              (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
              (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
              print info to account for header and footer height as provided by the client.
              (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
              (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
              to do that. Code adapted form WebKit1.
      
              * UIProcess/API/qt/qwkpage:
              (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c44bd669
    • andersca@apple.com's avatar
      2011-01-19 Anders Carlsson <andersca@apple.com> · 89d89361
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Suspend/resume painting as the WKView visibility changes
              https://bugs.webkit.org/show_bug.cgi?id=52738
      
              * UIProcess/DrawingAreaProxy.h:
              (WebKit::DrawingAreaProxy::visibilityDidChange):
              Add new member function. It should really be pure virtual once setPageIsVisible
              is removed.
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
              Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
      
              (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
              Make this a stub; it should really be removed.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::viewStateDidChange):
              Call visibilityDidChange.
      
              * UIProcess/WebPageProxy.h:
              (WebKit::WebPageProxy::isViewVisible):
              Add new getter.
      
              * WebProcess/WebPage/DrawingArea.messages.in:
              Add SuspendPainting and ResumePainting messages.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::DrawingAreaImpl):
              Initialize m_isPaintingSuspended.
      
              (WebKit::DrawingAreaImpl::suspendPainting):
              Set m_isPaintingSuspended to true and stop the display timer.
      
              (WebKit::DrawingAreaImpl::resumePainting):
              Set m_isPaintingSuspended to false.
      
              (WebKit::DrawingAreaImpl::scheduleDisplay):
              (WebKit::DrawingAreaImpl::display):
              Bail if m_isPaintingSuspended is true.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89d89361
  7. 18 Jan, 2011 4 commits
    • mjs@apple.com's avatar
      2011-01-18 Maciej Stachowiak <mjs@apple.com> · 54741f66
      mjs@apple.com authored
              Reviewed by Sam Weinig.
      
              WebKitTestRunner should track loading more like DumpRenderTree
              https://bugs.webkit.org/show_bug.cgi?id=52692
      
              Change load tracking to track the current top loading frame, in the manner of DumpRenderTree.
              This makes some tests that call notifyDone multiple times pass.
              
              * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
              (WTR::InjectedBundle::InjectedBundle):
              (WTR::InjectedBundle::done):
              * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
              (WTR::InjectedBundle::topLoadingFrame):
              (WTR::InjectedBundle::setTopLoadingFrame):
              * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
              (WTR::InjectedBundlePage::InjectedBundlePage):
              (WTR::InjectedBundlePage::stopLoading):
              (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
              (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
              (WTR::InjectedBundlePage::didFinishLoadForFrame):
              (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
              * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
              * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
              (WTR::LayoutTestController::notifyDone):
              * WebKitTestRunner/TestController.cpp:
              (WTR::TestController::didReceiveMessageFromInjectedBundle):
      2011-01-18  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Sam Weinig.
      
              WebKitTestRunner should track loading more like DumpRenderTree
              https://bugs.webkit.org/show_bug.cgi?id=52692
              
              Relax the message check in didSaveFrameToPageCache a bit more, since
              layout tests were still hitting the old one.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::isDisconnectedFrame):
              (WebKit::WebPageProxy::didSaveFrameToPageCache):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      54741f66
    • beidson@apple.com's avatar
      <rdar://problem/8860833> and https://bugs.webkit.org/show_bug.cgi?id=52599 · 0e7ea9b0
      beidson@apple.com authored
      UIProcess crash in WebPageProxy::reattachToWebProcess when web process crashes with a new tab/window.
      
      Reviewed by Darin Adler.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::reattachToWebProcessWithItem): Null check item *both* places it is used.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e7ea9b0
    • beidson@apple.com's avatar
      <rdar://problem/8752200> and https://bugs.webkit.org/show_bug.cgi?id=52664 · 53329382
      beidson@apple.com authored
      Need WebKit2 API to asynchronously get the resource data for a URL
      
      Reviewed by Maciej Stachowiak. 
      
      Rename WKFrameGetMainResourceDataFunction to WKFrameGetResourceDataFunction, and add
      new API to get a resource by URL:
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameGetMainResourceData):
      (WKFrameGetResourceData):
      (callGetResourceDataBlockAndDispose):
      (WKFrameGetMainResourceData_b):
      (WKFrameGetResourceData_b):
      * UIProcess/API/C/WKFrame.h:
      
      Implement the new API in the UIProcess side:
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::getResourceData):
      * UIProcess/WebFrameProxy.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::getResourceDataFromFrame):
      * UIProcess/WebPageProxy.h:
      
      Have the WebProcess get the data and call back to the UIProcess:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::getResourceDataFromFrame):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53329382
    • andersca@apple.com's avatar
      2011-01-18 Anders Carlsson <andersca@apple.com> · 987ad2e1
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Ask the web page proxy to scroll the view when needed
              https://bugs.webkit.org/show_bug.cgi?id=52665
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::scrollView):
              * UIProcess/WebPageProxy.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      987ad2e1
  8. 17 Jan, 2011 1 commit
    • ap@apple.com's avatar
      Reviewed by Anders Carlsson and Darin Adler. · 0909d924
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=52595
              Make basic printing work in WebKit2
      
              * Shared/WebPreferencesStore.h:
              * UIProcess/API/C/WKPreferences.cpp:
              (WKPreferencesSetShouldPrintBackgrounds):
              (WKPreferencesGetShouldPrintBackgrounds):
              * UIProcess/API/C/WKPreferences.h:
              Implement a preference for printing backgrounds.
      
              * Shared/PrintInfo.cpp: Added.
              (WebKit::PrintInfo::encode):
              (WebKit::PrintInfo::decode):
              * Shared/PrintInfo.h: Added.
              * Shared/mac/PrintInfoMac.mm: Added.
              (WebKit::PrintInfo::PrintInfo):
              A new class for passing page setup information down to the web process.
      
              * WebKit2.xcodeproj/project.pbxproj:
              * GNUmakefile.am:
              * WebKit2.pro:
              * win/WebKit2.vcproj:
              Added PrintInfo.
      
              * Scripts/webkit2/messages.py: Added PrintInfo.h to a list of structs.
      
              * UIProcess/API/mac/WKView.mm:
              (WKViewData): Cache page count and geometry.
              (WebFrameWrapper): Added a wrapper class for adding a WebFrameProxy to an NSDictionary.
              (-[WKView drawRect:]): Added logging.
              (setFrameBeingPrinted): Store a frame into NSPrintOperation's NSPrintInfo, so that all 
              methods invoked for this operation would know what's being printed.
              (frameBeingPrinted): Retrieve this data.
              (-[WKView printOperationWithPrintInfo:forFrame:]): Create a print operation that's appropriate
              for the frame.
              (-[WKView knowsPageRange:]): Ask the web process.
              (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
              Take over printing, because I couldn't make drawRect: work correctly with WebKit custom fit
              to page implementation.
              (-[WKView _provideTotalScaleFactorForPrintOperation:]): Help AppKit clip correctly.
              (-[WKView rectForPage:]): Return a pre-calculated rect.
      
              * UIProcess/WebPageProxy.h: Added m_isInPrintingMode to track whether the web page is in
              printing mode. The UI process controls that.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::WebPageProxy): Initialize m_isInPrintingMode.
              (WebKit::WebPageProxy::beginPrinting): Change printing mode in web process if the value changes.
              (WebKit::WebPageProxy::endPrinting): Ditto.
              (WebKit::WebPageProxy::computePagesForPrinting): Ask the web process about output page geometry.
              (WebKit::WebPageProxy::drawRectToPDF): Ask the web process about printed page data.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::close): Delete m_printContext while there is still a Frame pointer.
              (WebKit::WebPage::updatePreferences): Pass through ShouldPrintBackgrounds.
              (WebKit::WebPage::beginPrinting): Switch into printing mode (or update parameters if we're
              already in printing mode).
              (WebKit::WebPage::endPrinting): Delete m_printContext, implicitly calling end().
              (WebKit::WebPage::computePagesForPrinting): Make sure that we're in printing mode, and
              copmute page rects.
              (WebKit::WebPage::drawRectToPDF): Added a CG specific function to create a PDF document out
              of a page rect. It should really work for onscreen content, but we only need it for printing.
      
              * WebProcess/WebPage/WebPage.h:
      
              * WebProcess/WebPage/WebPage.messages.in: Added BeginPrinting, EndPrinting,
              ComputePagesForPrinting and DrawRectToPDF.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0909d924
  9. 15 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move WebKit2 into Source · be159d97
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=52438
      
      Rubber-stamped by Eric Seidel.
      
      .: 
      
      Update reference to WebKit2.
      
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * Source/cmake/WebKitPackaging.cmake:
      * WebKit.pro:
      * configure.ac:
      
      Source/WebCore: 
      
      * WebCore.pro:
      
      Source/WebKit2: 
      
      * DerivedSources.pro:
      * GNUmakefile.am:
      * WebKit2.pro:
      * WebProcess.pro:
      * win/WebKit2.vcproj:
      * win/WebKit2WebProcess.vcproj:
      
      Tools: 
      
      * MiniBrowser/qt/MiniBrowser.pro:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/test-webkitpy:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/style/checker.py:
      * WebKitTestRunner/DerivedSources.pro:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      
      WebKit/win: 
      
      Update reference to WebKit2.
      
      * WebKit.vcproj/WebKit.sln:
      
      Websites/bugs.webkit.org: 
      
      Remove WebKit2 from the list of top-level source directories.
      
      * PrettyPatch/PrettyPatch.rb:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be159d97
  10. 14 Jan, 2011 1 commit
  11. 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::dragO...
      9d9813d0
  12. 12 Jan, 2011 3 commits
    • andersca@apple.com's avatar
      2011-01-12 Anders Carlsson <andersca@apple.com> · 2cdef2fb
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Get the new drawing area painting to the screen
              https://bugs.webkit.org/show_bug.cgi?id=52331
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
              Call setViewNeedsDisplay on all the update rects.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::setViewNeedsDisplay):
              Call through to the page client.
      
              (WebKit::WebPageProxy::processDidCrash):
              Null out the drawing area proxy.
              
              * UIProcess/mac/BackingStoreMac.mm:
              (WebKit::BackingStore::paint):
              Paint.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2cdef2fb
    • 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
    • beidson@apple.com's avatar
      <rdar://problem/8837307>, <rdar://problem/8637038>, and... · f10ee4cb
      beidson@apple.com authored
      <rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
      Back/forward list recovery after a WebProcess crash is crashy itself.
      
      Reviewed by Sam Weinig.
      
      Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
      * Shared/SessionState.cpp:
      (WebKit::SessionState::isEmpty):
      * Shared/SessionState.h:
      
      Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
      * Shared/WebBackForwardListItem.cpp:
      (WebKit::WebBackForwardListItem::WebBackForwardListItem):
      (WebKit::WebBackForwardListItem::highedUsedItemID):
      * Shared/WebBackForwardListItem.h:
      * WebProcess/WebPage/WebBackForwardListProxy.cpp:
      (WebKit::generateHistoryItemID):
      (WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
      (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
        now tells the WebProcess that a previous WebProcess created.
      * WebProcess/WebPage/WebBackForwardListProxy.h:
      
      Encode/decode data relevant to restoring a session on WebPage creation:
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
      
      If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to 
      update the current back/forward item (if necessary) then relaunch the process:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::reattachToWebProcessWithItem):
      (WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
      (WebKit::WebPageProxy::initializeWebPage):
      (WebKit::WebPageProxy::loadURL):
      (WebKit::WebPageProxy::loadURLRequest):
      (WebKit::WebPageProxy::reload):
      (WebKit::WebPageProxy::goForward):
      (WebKit::WebPageProxy::goBack):
      (WebKit::WebPageProxy::goToBackForwardItem):
      (WebKit::WebPageProxy::creationParameters):
      * UIProcess/WebPageProxy.h:
      
      Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
      * WebProcess/WebPage/WebPage.messages.in:
      * UIProcess/cf/WebPageProxyCF.cpp:
      (WebKit::WebPageProxy::restoreFromSessionStateData):
      
      Restore a session on page creation if the parameters include it:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Call restoreSession if session state exists.
      (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
      (WebKit::WebPage::restoreSession):
      * WebProcess/WebPage/WebPage.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f10ee4cb
  13. 11 Jan, 2011 7 commits
  14. 10 Jan, 2011 9 commits
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r75460. · 05e1b4fc
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/75460
      https://bugs.webkit.org/show_bug.cgi?id=52191
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-01-10
      It broke Qt-WK2 build (Requested by Ossy on #webkit).
      
      * Shared/API/c/WKBase.h:
      * Shared/APIObject.h:
      * UIProcess/API/C/WKAPICast.h:
      * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
      * UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/C/WebKit2.h:
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage):
      * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
      * UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
      * UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
      * UIProcess/GeolocationPermissionRequestProxy.h: Removed.
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::close):
      (WebKit::WebPageProxy::processDidCrash):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebUIClient.cpp:
      * UIProcess/WebUIClient.h:
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
      * WebProcess/Geolocation/WebGeolocationManager.cpp:
      * WebProcess/Geolocation/WebGeolocationManager.h:
      * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
      (WebKit::WebGeolocationClient::requestPermission):
      (WebKit::WebGeolocationClient::cancelPermissionRequest):
      * WebProcess/WebCoreSupport/WebGeolocationClient.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05e1b4fc
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r75459 · 00e619ec
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/75459
      
      Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
      https://bugs.webkit.org/show_bug.cgi?id=52184
      
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      * UIProcess/API/mac/WKView.mm:
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/API/qt/qwkpage.cpp:
      * UIProcess/API/qt/qwkpage_p.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::initializeWebPage):
      (WebKit::WebPageProxy::reinitializeWebPage):
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::WebView):
      * UIProcess/win/WebView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00e619ec
    • andersca@apple.com's avatar
      2011-01-10 Anders Carlsson <andersca@apple.com> · 87a20681
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Remove size parameter to WebPageProxy::initializeWebPage
              https://bugs.webkit.org/show_bug.cgi?id=52188
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView initWithFrame:contextRef:pageGroupRef:]):
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPagePrivate::init):
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::initializeWebPage):
              * UIProcess/WebPageProxy.h:
              * UIProcess/win/WebView.cpp:
              (WebKit::WebView::WebView):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87a20681
    • andersca@apple.com's avatar
      Didn't mean to land this. · 8d7653d7
      andersca@apple.com authored
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::initializeWebPage):
      * UIProcess/WebPageProxy.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d7653d7
    • andersca@apple.com's avatar
      2011-01-10 Anders Carlsson <andersca@apple.com> · 40fe2a87
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              WebPageProxy::creationParameters no longer needs to take a size
              https://bugs.webkit.org/show_bug.cgi?id=52187
      
              WebPageProxy::creationParameters can just ask the page client for the view size now.
      
              * UIProcess/WebInspectorProxy.cpp:
              (WebKit::WebInspectorProxy::createInspectorPage):
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::initializeWebPage):
              (WebKit::WebPageProxy::reinitializeWebPage):
              (WebKit::WebPageProxy::createNewPage):
              (WebKit::WebPageProxy::creationParameters):
              * UIProcess/WebPageProxy.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40fe2a87
    • andersca@apple.com's avatar
      2011-01-10 Anders Carlsson <andersca@apple.com> · 9e04e300
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Pass information about the view in the WebPageCreationParameters
              https://bugs.webkit.org/show_bug.cgi?id=52186
      
              * Shared/WebPageCreationParameters.cpp:
              (WebKit::WebPageCreationParameters::encode):
              (WebKit::WebPageCreationParameters::decode):
              Encode and decode the state flags.
      
              * Shared/WebPageCreationParameters.h:
              Add new state flags.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::creationParameters):
              Initialize the state flags.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::WebPage):
              Update the page state from the state flags.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e04e300
    • weinig@apple.com's avatar
      Make Geolocation features work in WebKit2 · ff6d2876
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52078
      
      Reviewed by Anders Carlsson.
      
      Step 2 - Add support for requesting and granting permission for geolocation.
      
      * Shared/API/c/WKBase.h:
      * Shared/APIObject.h:
      * UIProcess/API/C/WebKit2.h:
      * UIProcess/API/C/WKAPICast.h:
      * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Added.
      * UIProcess/API/C/WKGeolocationPermissionRequest.h: Added.
      Add new API type, WKGeolocationPermissionRequestRef.
      
      * UIProcess/API/C/WKPage.h:
      Add new UIClient function for requesting permission.
      
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage): 
      Stub out the UIClient.
      
      * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Added.
      * UIProcess/GeolocationPermissionRequestManagerProxy.h: Added.
      * UIProcess/GeolocationPermissionRequestProxy.cpp: Added.
      * UIProcess/WebPageProxy.cpp:
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebUIClient.cpp:
      * UIProcess/WebUIClient.h:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added.
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Added.
      * WebProcess/Geolocation/WebGeolocationManager.cpp:
      * WebProcess/Geolocation/WebGeolocationManager.h:
      * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
      * WebProcess/WebCoreSupport/WebGeolocationClient.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::geolocationPermissionRequestManager):
      * WebProcess/WebPage/WebPage.messages.in:
      Track the permission request through both sides of the process divide.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff6d2876
    • andersca@apple.com's avatar
      2011-01-10 Anders Carlsson <andersca@apple.com> · de7f919a
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
              https://bugs.webkit.org/show_bug.cgi?id=52184
      
              * UIProcess/API/mac/PageClientImpl.h:
              * UIProcess/API/mac/PageClientImpl.mm:
              (WebKit::PageClientImpl::createDrawingAreaProxy):
              Call -[WKView _createDrawingAreaProxy].
      
              (WebKit::PageClientImpl::setViewNeedsDisplay):
              Call setNeedsDisplayInRect on the WKView.
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView initWithFrame:contextRef:pageGroupRef:]):
              No need to set the drawing area proxy anymore.
      
              (-[WKView _createDrawingAreaProxy]):
              Create a chunked update drawing area proxy for now.
      
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPagePrivate::createDrawingAreaProxy):
              (QWKPagePrivate::setViewNeedsDisplay):
              Add stubs.
          
              * UIProcess/PageClient.h:
              Add new pure virtual member functions.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::initializeWebPage):
              (WebKit::WebPageProxy::reinitializeWebPage):
              Set the new drawing area proxy.
      
              * UIProcess/win/WebView.cpp:
              (WebKit::WebView::WebView):
              No need to set the drawing area proxy anymore.
      
              (WebKit::WebView::createDrawingAreaProxy):
              Create a chunked update drawing area proxy for now.
      
              (WebKit::WebView::setViewNeedsDisplay):
              Invalidate the window.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de7f919a
    • andersca@apple.com's avatar
      2011-01-10 Anders Carlsson <andersca@apple.com> · 21766f36
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Use a pull model for view state changes
              https://bugs.webkit.org/show_bug.cgi?id=52175
      
              Instead of having the WKView call setFocused, setActive etc on the WebPageProxy, the
              WKView now simply informs the WebPageProxy what has changed, using the WebPageProxy::viewStateDidChange
              function. The WebPageProxy can then fetch the relevant information using newly added PageClient functions.
      
              * UIProcess/API/mac/PageClientImpl.h:
              * UIProcess/API/mac/PageClientImpl.mm:
              (WebKit::PageClientImpl::viewSize):
              (WebKit::PageClientImpl::isViewWindowActive):
              (WebKit::PageClientImpl::isViewFocused):
              (WebKit::PageClientImpl::isViewVisible):
              (WebKit::PageClientImpl::isViewInWindow):
              * UIProcess/API/mac/WKView.mm:
              (-[WKView initWithFrame:contextRef:pageGroupRef:]):
              (-[WKView becomeFirstResponder]):
              (-[WKView resignFirstResponder]):
              (-[WKView viewDidMoveToWindow]):
              (-[WKView _windowDidBecomeKey:]):
              (-[WKView _windowDidResignKey:]):
              (-[WKView viewDidHide]):
              (-[WKView viewDidUnhide]):
              (-[WKView _isFocused]):
              (-[WKView _didRelaunchProcess]):
              * UIProcess/API/mac/WKViewInternal.h:
              * UIProcess/API/qt/qgraphicswkview.cpp:
              (QGraphicsWKView::focusInEvent):
              (QGraphicsWKView::focusOutEvent):
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPagePrivate::QWKPagePrivate):
              (QWKPagePrivate::viewSize):
              (QWKPagePrivate::isViewWindowActive):
              (QWKPagePrivate::isViewFocused):
              (QWKPagePrivate::isViewVisible):
              (QWKPagePrivate::isViewInWindow):
              * UIProcess/API/qt/qwkpage_p.h:
              * UIProcess/PageClient.h:
              * UIProcess/WebContext.cpp:
              (WebKit::WebContext::createWebPage):
              * UIProcess/WebContext.h:
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::create):
              (WebKit::WebPageProxy::WebPageProxy):
              (WebKit::WebPageProxy::viewStateDidChange):
              * UIProcess/WebPageProxy.h:
              * UIProcess/WebProcessProxy.cpp:
              (WebKit::WebProcessProxy::createWebPage):
              * UIProcess/WebProcessProxy.h:
              * UIProcess/win/WebView.cpp:
              (WebKit::WebView::WebView):
              (WebKit::WebView::onSetFocusEvent):
              (WebKit::WebView::onKillFocusEvent):
              (WebKit::WebView::onShowWindowEvent):
              (WebKit::WebView::updateActiveState):
              (WebKit::WebView::viewSize):
              (WebKit::WebView::isViewWindowActive):
              (WebKit::WebView::isViewFocused):
              (WebKit::WebView::isViewVisible):
              (WebKit::WebView::isViewInWindow):
              (WebKit::WebView::didRelaunchProcess):
              (WebKit::WebView::setIsInWindow):
              * UIProcess/win/WebView.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21766f36
  15. 08 Jan, 2011 1 commit
    • mitz@apple.com's avatar
      In WebKit2, page zooming does not work with PDF · 4063ec7c
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52113
      
      Reviewed by Maciej Stachowiak.
      
      * UIProcess/API/C/WKPage.cpp:
      (WKPageSupportsTextZoom): Added. Returns whether the page currently supports text-only zoom.
      * UIProcess/API/C/WKPage.h:
      * UIProcess/API/mac/PDFViewController.h: Made pdfDocumentClass() private and declared new
      member functions.
      * UIProcess/API/mac/PDFViewController.mm:
      (WebKit::PDFViewController::zoomFactor): Added.
      (WebKit::PDFViewController::setZoomFactor): Added.
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::customRepresentationZoomFactor): Added. Calls through to the WKView.
      (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
      * UIProcess/API/mac/WKView.mm:
      (-[WKView _customRepresentationZoomFactor]): Added. Calls through to the PDFViewController.
      (-[WKView _setCustomRepresentationZoomFactor:]): Ditto.
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/API/qt/qwkpage_p.h:
      (QWKPagePrivate::customRepresentationZoomFactor): Added.
      (QWKPagePrivate::setCustomRepresentationZoomFactor): Added.
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy): Coding style fix.
      (WebKit::WebPageProxy::supportsTextZoom): Added. Returns false if the main frame has a custom
      representation or is a standalone image, true otherwise.
      (WebKit::WebPageProxy::setTextZoomFactor): Bail out if the main frame has a custom representation.
      (WebKit::WebPageProxy::pageZoomFactor): If the main frame has a custom representation, get the
      zoom factor from the page client.
      (WebKit::WebPageProxy::setPageZoomFactor): If the main frame has a custom representation, have
      the client set the zoom factor.
      (WebKit::WebPageProxy::setPageAndTextZoomFactors): Ditto.
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::textZoomFactor): Changed to return 1 if the main frame has a custom
      representation.
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::customRepresentationZoomFactor): Added.
      (WebKit::WebView::setCustomRepresentationZoomFactor): Added.
      * UIProcess/win/WebView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4063ec7c
  16. 06 Jan, 2011 1 commit
    • darin@apple.com's avatar
      2011-01-05 Darin Adler <darin@apple.com> · 30fcbfca
      darin@apple.com authored
              Reviewed by Geoff Garen.
      
              Back/Forward entries in WebKit2 leak
              https://bugs.webkit.org/show_bug.cgi?id=51983
      
              Besides fixing the leak, this also fixes a problem where
              all history items were sent over to the UI process, but
              we wanted to send only back/forward items.
      
              * UIProcess/WebBackForwardList.cpp:
              (WebKit::WebBackForwardList::pageClosed): Added.
              Tells the web process about all the back/forward
              items being removed.
              (WebKit::WebBackForwardList::addItem): Ditto.
              Also removed a redundant call to didChangeBackForwardList.
              (WebKit::WebBackForwardList::clear): Ditto.
      
              * UIProcess/WebBackForwardList.h: Added pageClosed.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::close): Added a call to pageClosed.
              (WebKit::WebPageProxy::backForwardRemovedItem): Added.
              Sends a message to the web page in the web process.
      
              * UIProcess/WebPageProxy.h: Added backForwardRemovedItem.
      
              * WebProcess/WebPage/WebBackForwardListProxy.cpp:
              (WebKit::updateBackForwardItem): Added an itemID argument,
              since callers will now be getting it and we don't want to
              get it twice. Removed the code to generate an ID. Also
              removed some local variables to make the code a little
              tighter and clearer.
              (WebKit::WK2NotifyHistoryItemChanged): Only call
              updateBackForwardItem for items that already have IDs.
              We don't want to send cross-process messages for every
              history item; just the ones that are top level back/forward
              items.
              (WebKit::WebBackForwardListProxy::removeItem):
              Added. For use when the UI process tells us to remove it.
              (WebKit::WebBackForwardListProxy::addItem): Added code to
              assign an ID and put this item into the maps. This is called
              exactly once on each back/forward item.
      
              * WebProcess/WebPage/WebBackForwardListProxy.h: Added
              removeItem.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::didRemoveBackForwardItem): Added.
      
              * WebProcess/WebPage/WebPage.h: Added didRemoveBackForwardItem.
      
              * WebProcess/WebPage/WebPage.messages.in: Added
              DidRemoveBackForwardItem message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30fcbfca
  17. 05 Jan, 2011 3 commits
    • andersca@apple.com's avatar
      <rdar://problem/8750248> · f33fd63b
      andersca@apple.com authored
      Need a way to create a new DownloadProxy from an arbitrary resource request
      
      Reviewed by Sam Weinig.
      
      <rdar://problem/8750465>
      Need a way to start a download in WKDownload
              
      <rdar://problem/8752204>
      WK2 Context Menus - "Save linked file" support
      
      * Shared/ContextMenuState.h: Added.
      Add a ContextMenuState struct which contains state for context menus.
      
      * UIProcess/API/C/WKContext.cpp:
      (WKContextDownloadURLRequest):
      Call WebContext::download.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::download):
      Send a DownloadRequest message to the web process.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::showContextMenu):
      Set the active context menu state.
      
      (WebKit::WebPageProxy::contextMenuItemSelected):
      Handle ContextMenuItemTagDownloadImageToDisk and ContextMenuItemTagDownloadLinkToDisk by calling
      WebContext::Download, passing the respective URLs.
      
      * UIProcess/WebPageProxy.messages.in:
      ShowContextMenu now takes state as well.
      
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      (WebKit::WebContextMenuClient::downloadURL):
      Assert that this is never reached; downloads are handled in the UI process.
      
      * WebProcess/WebPage/WebContextMenu.cpp:
      (WebKit::WebContextMenu::show):
      Pass the context menu state along when sending the ShowContextMenu message.
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::downloadRequest):
      Call the shared DownloadManager.
      
      * WebProcess/WebProcess.messages.in:
      Add DownloadRequest message.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      Add ContextMenuState.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f33fd63b
    • andersca@apple.com's avatar
      2011-01-05 Anders Carlsson <andersca@apple.com> · 2fa2dba4
      andersca@apple.com authored
              Reviewed by Adele Peterson.
      
              Implement word transformation
              https://bugs.webkit.org/show_bug.cgi?id=51943
      
              Export Editor functions needed by WebKit2.
      
              * WebCore.exp.in:
      2011-01-05  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Sam Weinig.
      
              Handle smart insert/delete
              https://bugs.webkit.org/show_bug.cgi?id=51946
      
              * Shared/WebPageCreationParameters.cpp:
              (WebKit::WebPageCreationParameters::encode):
              (WebKit::WebPageCreationParameters::decode):
              * Shared/WebPageCreationParameters.h:
              Add isSmartInsertDelete enabled.
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView validateUserInterfaceItem:]):
              Handle toggleSmartInsertDelete:.
      
              (-[WKView toggleSmartInsertDelete:]):
              Toggle the smart insert/delete state.
      
              * UIProcess/TextChecker.h:
              Add isSmartInsertDeleteEnabled and setSmartInsertDeleteEnabled.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::WebPageProxy):
              Initialize m_isSmartInsertDeleteEnabled.
      
              (WebKit::WebPageProxy::contextMenuItemSelected):
              Handle ContextMenuItemTagSmartCopyPaste.
      
              (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
              Update the state and send a SetSmartInsertDeleteEnabled message.
      
              (WebKit::WebPageProxy::creationParameters):
              Initialize isSmartInsertDeleteEnabled.
      
              * UIProcess/WebPageProxy.h:
              (WebKit::WebPageProxy::isSmartInsertDeleteEnabled):
              Return m_isSmartInsertDeleteEnabled.
      
              * UIProcess/mac/TextCheckerMac.mm:
              (WebKit::TextChecker::isSmartInsertDeleteEnabled):
              (WebKit::TextChecker::setSmartInsertDeleteEnabled):
              Store and fetch the smart insert delete state.
      
              * WebProcess/WebCoreSupport/WebEditorClient.cpp:
              (WebKit::WebEditorClient::smartInsertDeleteEnabled):
              Call WebPage::isSmartInsertDeleteEnabled.
      
              * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
              (WebKit::WebEditorClient::toggleSmartInsertDelete):
              Assert that this is never called.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::WebPage):
              Initialize m_isSmartInsertDeleteEnabled
      
              * WebProcess/WebPage/WebPage.h:
              (WebKit::WebPage::isSmartInsertDeleteEnabled):
              (WebKit::WebPage::setSmartInsertDeleteEnabled):
              Add getter and setter.
      
              * WebProcess/WebPage/WebPage.messages.in:
              Add SetSmartInsertDeleteEnabled message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2fa2dba4
    • andersca@apple.com's avatar
      2011-01-05 Anders Carlsson <andersca@apple.com> · 1b08cf93
      andersca@apple.com authored
              Reviewed by Adele Peterson.
      
              Implement word transformation
              https://bugs.webkit.org/show_bug.cgi?id=51943
      
              Export Editor functions needed by WebKit2.
      
              * WebCore.exp.in:
      2011-01-05  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Adele Peterson.
      
              Implement word transformation
              https://bugs.webkit.org/show_bug.cgi?id=51943
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView validateUserInterfaceItem:]):
              Handle the word transformation selectors.
      
              (-[WKView uppercaseWord:]):
              (-[WKView lowercaseWord:]):
              (-[WKView capitalizeWord:]):
              Call down to the WebPageProxy.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::uppercaseWord):
              (WebKit::WebPageProxy::lowercaseWord):
              (WebKit::WebPageProxy::capitalizeWord):
              Send messages to the WebPage.
      
              * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
              (WebKit::changeWordCase):
              Add helper function.
      
              (WebKit::WebEditorClient::uppercaseWord):
              (WebKit::WebEditorClient::lowercaseWord):
              (WebKit::WebEditorClient::capitalizeWord):
              Call helper function.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::changeSpellingToWord):
              Call replaceSelectionWithText.
      
              (WebKit::WebPage::uppercaseWord):
              (WebKit::WebPage::lowercaseWord):
              (WebKit::WebPage::capitalizeWord):
              Call the editor functions.
      
              (WebKit::WebPage::replaceSelectionWithText):
              New helper function that replaces the selected string with another string.
      
              * WebProcess/WebPage/WebPage.messages.in:
              Add new messages.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b08cf93