2011-01-17 Jon Honeycutt Windows build fix. Unreviewed. * Shared/PrintInfo.cpp: Use #include, not #import. 2011-01-17 Alexey Proskuryakov Actually wrote a FIXME promised for a review comment. * UIProcess/API/mac/WKView.mm: (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): 2011-01-17 Alexey Proskuryakov Reviewed by Anders Carlsson and Darin Adler. 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. 2011-01-17 Tony Gentilcore Reviewed by Alexey Proskuryakov. Fix some headers with missing or misspelled #ifndef guards https://bugs.webkit.org/show_bug.cgi?id=52545 * Shared/UserMessageCoders.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: * WebProcess/WebProcessMain.h: 2011-01-17 Alexey Proskuryakov Build fix. * Platform/Logging.cpp: 2011-01-17 Alexey Proskuryakov Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=52592 Add a logging channel for WKView * Platform/Logging.cpp: * Platform/Logging.h: 2011-01-17 Anders Carlsson Reviewed by Sam Weinig. Factor bitmap context drawing code out into a shared function https://bugs.webkit.org/show_bug.cgi?id=52589 * Platform/cg/CGUtilities.h: Added. * Platform/cg/CGUtilities.cpp: Added. (WebKit::paintBitmapContext): New function that will paint a bitmap context into a CGContext. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::paint): Use paintBitmapContext. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::paint): (WebKit::BackingStore::scroll): Use paintBitmapContext. * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: * win/WebKit2Common.vsprops: Add CGUtilities.{cpp|h}. 2011-01-17 Dan Bernstein Rubber-stamped by Mark Rowe. Update xcodeproj svn:ignore to include xcuserdata. * WebKit2.xcodeproj: Modified property svn:ignore. 2011-01-17 Alexey Proskuryakov Fixing a typo from a bad merge. * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): 2011-01-17 Alexey Proskuryakov Reviewed by John Sullivan. https://bugs.webkit.org/show_bug.cgi?id=52590 Should pass a frame into -[WKView canPrintHeadersAndFooters] * UIProcess/API/mac/WKView.h: * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method to canChangeFrameLayout. 2011-01-17 Anders Carlsson Reviewed by Sam Weinig. Implement scrolling support https://bugs.webkit.org/show_bug.cgi?id=52502 * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::encode): (WebKit::UpdateInfo::decode): * Shared/UpdateInfo.h: Add scrollRect and scrollDelta member variables. * UIProcess/BackingStore.h: Add scroll member function. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::incorporateUpdate): Call scroll. (WebKit::BackingStore::scroll): Paint the backing store into itself. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::display): Pass the scroll information in the update info. 2011-01-17 Andrey Kosyakov Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build. * win/WebKit2.vcproj: * win/WebKit2GeneratedCommon.vsprops: * win/WebKit2WebProcess.vcproj: 2011-01-17 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: simplify debugger enabling routine. https://bugs.webkit.org/show_bug.cgi?id=52472 * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::startJavaScriptDebugging): 2011-01-17 Balazs Kelemen Reviewed by Andreas Kling. [Qt][WK2] Crash due to double destruction of QSharedMemory https://bugs.webkit.org/show_bug.cgi?id=52569 Avoid deleting the QSharedMemory twice. * Platform/qt/SharedMemoryQt.cpp: (WebKit::SharedMemory::~SharedMemory): * Shared/qt/CleanupHandler.cpp: Renamed m_inDeleteObjects to m_hasStartedDeleting and added a getter for it. (WebKit::CleanupHandler::CleanupHandler): (WebKit::CleanupHandler::deleteObjects): * Shared/qt/CleanupHandler.h: (WebKit::CleanupHandler::unmark): (WebKit::CleanupHandler::hasStartedDeleting): 2011-01-15 Adam Barth Rubber-stamped by Eric Seidel. Move WebKit2 into Source https://bugs.webkit.org/show_bug.cgi?id=52438 * DerivedSources.pro: * GNUmakefile.am: * WebKit2.pro: * WebProcess.pro: * win/WebKit2.vcproj: * win/WebKit2WebProcess.vcproj: 2011-01-14 Yuzo Fujishima Reviewed by Antti Koivisto. Rename cache() to memoryCache() https://bugs.webkit.org/show_bug.cgi?id=52433 * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shutdownIfPossible): (WebKit::WebProcess::didClose): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformSetCacheModel): * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformSetCacheModel): 2011-01-13 Geoffrey Garen Reviewed by Oliver Hunt. Split out a MarkedSpace strategy object from Heap. https://bugs.webkit.org/show_bug.cgi?id=52421 * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit): Updated for class move. 2011-01-14 Anders Carlsson Reviewed by Dan Bernstein. Add a new PageClient::displayView function and expose it on WebPageProxy https://bugs.webkit.org/show_bug.cgi?id=52500 * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::displayView): * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::displayView): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::displayView): * UIProcess/WebPageProxy.h: * UIProcess/win/WebView.cpp: (WebKit::WebView::displayView): * UIProcess/win/WebView.h: 2011-01-14 Anders Carlsson Reviewed by Sam Weinig. Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1 https://bugs.webkit.org/show_bug.cgi?id=52499 * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::shouldPaintBoundsRect): Port code from -[WebView _mustDrawUnionedRect:singleRects:count:]. (WebKit::DrawingAreaImpl::display): If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect. 2011-01-14 Brian Weinstein Reviewed by Geoff Garen. ShouldLoadResourceForFrame should use strings, not URLs. https://bugs.webkit.org/show_bug.cgi?id=52476 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of a URL, and rename from subresourceURL to resourceURL. 2011-01-14 Anders Carlsson Reviewed by Sam Weinig. Fix for The web process should be able to read resources from the UI process. Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): Encode and decode the uiProcessBundleResourcePath member variable. * Shared/WebProcessCreationParameters.h: Add uiProcessBundleResourcePath member variable. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Set the uiProcessBundleResourcePath member variable. * WebProcess/com.apple.WebProcess.sb: Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories. * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR. (WebKit::WebProcess::platformInitializeWebProcess): Remove the code that would consume a sandbox extension for the url cache path. 2011-01-14 Anders Carlsson Reviewed by Sam Weinig. Delay initializing the sandbox until we get the InitializeWebProcess message. * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): 2011-01-14 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. Align import/export directives https://bugs.webkit.org/show_bug.cgi?id=52208 * Shared/API/c/WKBase.h: Align import/export directives with JavaScriptCore/API/JSBase.h. 2011-01-14 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: extract InspectorSettings from InspectorState, simplify it. https://bugs.webkit.org/show_bug.cgi?id=52429 * WebProcess/WebCoreSupport/WebInspectorClient.cpp: 2011-01-13 Enrica Casucci Reviewed by Darin Adler. WebKit2: Add support for drag and drop https://bugs.webkit.org/show_bug.cgi?id=52343 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: 2011-01-13 Dan Bernstein Reviewed by John Sullivan. Incorrect assertion in DrawingAreaImpl::scroll() https://bugs.webkit.org/show_bug.cgi?id=52376 * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area. This made the assertion valid, but I removed it anyway. 2011-01-12 Balazs Kelemen Unreviewed. Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init. The argument is unused since http://trac.webkit.org/changeset/75468. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::QGraphicsWKView): * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::init): * UIProcess/API/qt/qwkpage_p.h: 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. Implement DrawingAreaImpl::scroll https://bugs.webkit.org/show_bug.cgi?id=52346 * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::scroll): If there is already an active scroll, compute the area of both scroll rects and invalidate the smallest one. Compute a new dirty region if necessary and also add the scroll repaint region to the dirty region. (WebKit::DrawingAreaImpl::display): Reset the scroll area and scroll delta. * WebProcess/WebPage/DrawingAreaImpl.h: Add scroll area and scroll delta member variables. 2011-01-12 Anders Carlsson Reviewed by Dan Bernstein. Region improvements https://bugs.webkit.org/show_bug.cgi?id=52344 * Platform/Region.cpp: (WebKit::Region::Shape::move): (WebKit::Region::move): Change Region::move to take an IntSize. * Platform/Region.h: (WebKit::intersect): (WebKit::subtract): (WebKit::move): Add convenience functions. 2011-01-12 Ryosuke Niwa Unreviewed Qt build fix for r75661 * Shared/WebEvent.h: Don't declare phase() on non-Mac platforms. 2011-01-12 Beth Dakin Reviewed by Anders Carlsson. Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose fixed layout through WebKit SPI -and corresponding- 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): 2011-01-12 Sam Weinig Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=52337 PlatformWheelEvent should know about the scroll phase on the Mac Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent. * Shared/WebEvent.h: (WebKit::WebWheelEvent::phase): * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): * Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode): (WebKit::WebWheelEvent::decode): * Shared/mac/WebEventFactory.mm: (WebKit::phaseForEvent): (WebKit::WebEventFactory::createWebWheelEvent): 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. Get rid of an unneeded parameter from DrawingArea::scroll https://bugs.webkit.org/show_bug.cgi?id=52336 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::scroll): * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: (WebKit::ChunkedUpdateDrawingArea::scroll): * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::scroll): * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/LayerBackedDrawingArea.cpp: (WebKit::LayerBackedDrawingArea::scroll): * WebProcess/WebPage/LayerBackedDrawingArea.h: * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::scroll): * WebProcess/WebPage/TiledDrawingArea.h: 2011-01-12 Anders Carlsson 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. 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. More work on getting the drawing area proxy to paint https://bugs.webkit.org/show_bug.cgi?id=52328 * UIProcess/API/mac/WKView.mm: (-[WKView drawRect:]): Handle the new drawing area. * UIProcess/BackingStore.cpp: (WebKit::BackingStore::BackingStore): Assert that the size isn't empty. * UIProcess/BackingStore.h: * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::incorporateUpdate): Paint all update rects into the bitmap context. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::display): Create a handle so the shareable bitmap will actually be transferred over. 2011-01-12 Anders Carlsson Fix build. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::incorporateUpdate): 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. Begin stubbing out some more BackingStore member functions https://bugs.webkit.org/show_bug.cgi?id=52323 * UIProcess/BackingStore.cpp: (WebKit::BackingStore::~BackingStore): This was accidentally made into a constructor; it should be a destructor. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::paint): Call the backing store. (WebKit::DrawingAreaProxyImpl::update): Incorporate the update. (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Create the backing store if needed and incorporate the update. * UIProcess/mac/BackingStoreMac.mm: Added. (WebKit::BackingStore::platformInitialize): Create a bitmap context. (WebKit::BackingStore::paint): (WebKit::BackingStore::incorporateUpdate): Add stubs. * WebKit2.xcodeproj/project.pbxproj: Add BackingStoreMac.mm 2011-01-12 Beth Dakin Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose fixed layout through WebKit SPI -and corresponding- 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: 2011-01-12 Anders Carlsson Reviewed by Beth Dakin. Add BackingStore class https://bugs.webkit.org/show_bug.cgi?id=52318 * UIProcess/BackingStore.cpp: Added. (WebKit::BackingStore::create): (WebKit::BackingStore::BackingStore): * UIProcess/BackingStore.h: Added. * WebKit2.xcodeproj/project.pbxproj: 2011-01-12 Brady Eidson Reviewed by Sam Weinig. , , and https://bugs.webkit.org/show_bug.cgi?id=52248 Back/forward list recovery after a WebProcess crash is crashy itself. 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: 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. Send Update and DidUpdate messages https://bugs.webkit.org/show_bug.cgi?id=52316 * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::update): Add empty stub. * UIProcess/DrawingAreaProxy.messages.in: Add Update message. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::update): Just send back a DidUpdate message. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::didUpdate): Add empty stub. * WebProcess/WebPage/DrawingArea.messages.in: Add DidUpdate message. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didUpdate): Call display(). (WebKit::DrawingAreaImpl::display): Send an Update message. 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. Make the new drawing area actually draw something https://bugs.webkit.org/show_bug.cgi?id=52314 * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::encode): (WebKit::UpdateInfo::decode): Encode and decode newly added fields. * Shared/UpdateInfo.h: Add a vector of update rects and a handle for the sharable bitmap. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::display): Get the individual rects from the region and paint them into the shareable bitmap. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mainFrameHasCustomRepresentation): * WebProcess/WebPage/WebPage.h: Add helper function. * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk): Use helper function. 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. Add UpdateInfo class https://bugs.webkit.org/show_bug.cgi?id=52306 * Shared/UpdateInfo.cpp: Added. (WebKit::UpdateInfo::encode): (WebKit::UpdateInfo::decode): * Shared/UpdateInfo.h: Added. (WebKit::UpdateInfo::UpdateInfo): * WebKit2.xcodeproj/project.pbxproj: 2011-01-12 Anders Carlsson Reviewed by Sam Weinig. More work on the new drawing area implementation https://bugs.webkit.org/show_bug.cgi?id=52302 * Platform/Region.cpp: (WebKit::Region::Shape::segments_end): segments_end could end up returning an iterator that is one element past the Vector data, so we can't use operator[] since that will assert. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize the timer. (WebKit::DrawingAreaImpl::setNeedsDisplay): Unite the rect with the dirty region and schedule a display. (WebKit::DrawingAreaImpl::setSize): Tell the web page to resize. (WebKit::DrawingAreaImpl::scheduleDisplay): Start a display timer if needed. (WebKit::DrawingAreaImpl::display): Add a stub. 2011-01-12 Brent Fulgham Unreviewed build fix after r75527. Rename 'BackingStoreCairo.cpp' to 'ShareableBitmapCairo.cpp' to match VS project changes. * Shared/cairo/BackingStoreCairo.cpp: Removed. * Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp. 2011-01-11 Jeff Miller Reviewed by John Sullivan. WebKit2: "Webpages not responding" dialog appears when in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=51269 Patch by Sam Weinig. Insteaed of keeping track of the selected index of a https://bugs.webkit.org/show_bug.cgi?id=51087 * 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 * 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. 2010-12-15 Anders Carlsson Reviewed by Maciej Stachowiak. Semi-reproducible crash in ChunkedUpdateDrawingArea::paintIntoUpdateChunk closing a particular yahoo page https://bugs.webkit.org/show_bug.cgi?id=51126 Laying out the web page can cause the drawing area to change so we need to protect against this. * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: (WebKit::ChunkedUpdateDrawingArea::display): * WebProcess/WebPage/LayerBackedDrawingArea.cpp: (WebKit::LayerBackedDrawingArea::display): * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired): 2010-12-15 Brian Weinstein Reviewed by Adam Roben. WebKit2: WebPageWin needs implementations of hasLocalDataForURL and canHandleRequest https://bugs.webkit.org/show_bug.cgi?id=51090 Implement these functions for WebKit2 on Windows. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::hasLocalDataForURL): Does the cross-platform part of the check for having local data (file URL or subresource), then calls platformHasLocalDataForURL to let the platform do their specific checks. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformHasLocalDataForURL): Moved the cross-platform code from here to WebPage::hasLocalDataForURL. * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::platformHasLocalDataForURL): Renamed from hasLocalDataForURL and implemented with CFNetwork calls. This is the CFNetwork equivalent of the code in WebPageMac::platformHasLocalDataForURL. (WebKit::WebPage::canHandleRequest): Copied the line of code from WebView::canHandleRequest in WebKit1, with a FIXME saying this might not be enough (although it was in WebKit1 on Windows). 2010-12-15 Sheriff Bot Unreviewed, rolling out r74117. http://trac.webkit.org/changeset/74117 https://bugs.webkit.org/show_bug.cgi?id=51113 This broke the GTK1 build. (Requested by mrobinson on #webkit). * GNUmakefile.am: Removed. * Scripts/generate-forwarding-headers.pl: * WebKit2Prefix.h: * gtk/webkit2.pc.in: Removed. 2010-12-15 Amruth Raj and Ravi Kasibhatla Reviewed by Martin Robinson. Changes to enable building WebKit2 for Gtk port. (https://bugs.webkit.org/show_bug.cgi?id=37369) * GNUmakefile.am: Added. * Scripts/generate-forwarding-headers.pl: For GTK port, taking 1 extra argument for copying network headers. * WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header file for WebKit2 sources files. * gtk: Added. * gtk/webkit2.pc.in: Added. 2010-12-15 Jan Erik Hanssen Reviewed by Andreas Kling. [Qt][WK2] webkit2 does not compile on OS X https://bugs.webkit.org/show_bug.cgi?id=50128 prctl(2) is only available on Linux, so use an atexit handler for killing all the child processes when the process is exiting. * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::cleanupProcesses): (WebKit::QtWebProcess::QtWebProcess): (WebKit::QtWebProcess::processStateChanged): (WebKit::ProcessLauncherHelper::instance): 2010-12-14 Anders Carlsson Fix Windows build. * win/WebKit2Common.vsprops: 2010-12-14 Anders Carlsson Fix Qt build. * WebKit2.pro: 2010-12-14 Anders Carlsson Reviewed by TYPO FIX. Fix a typo. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): 2010-12-14 Anders Carlsson Reviewed by Sam Weinig. Cannot type into plugin edit field https://bugs.webkit.org/show_bug.cgi?id=51074 Add a PrognameShouldBeWebKitPluginHost quirk, since it turns out Flash Player calls getprogname() and checks if the return value is "WebKitPluginHost" in order to determine when to handle NPCocoaEventKeyDown events. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::netscapePluginModule): If the plug-in module has the PrognameShouldBeWebKitPluginHost quirk, call setprogname("WebKitPluginHost"). * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::load): Call determineQuirks() * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): Add the PrognameShouldBeWebKitPluginHost quirk for Flash. * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: (WebKit::NetscapePluginModule::determineQuirks): * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::determineQuirks): Add stubs. * Shared/Plugins/PluginQuirks.h: Add new PluginQuirks file. * WebKit2.xcodeproj/project.pbxproj: Add PluginQuirks.h 2010-12-14 Anders Carlsson Reviewed by Sam Weinig. Add a NetscapePluginModuleX11 and move the Qt implementation of PluginInfoStore::getPluginInfo there https://bugs.webkit.org/show_bug.cgi?id=51066 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Copied from WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp. (WebKit::NetscapePluginModule::getPluginInfo): * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp: (WebKit::PluginInfoStore::getPluginInfo): * WebKit2.pro: 2010-12-14 Anders Carlsson Reviewed by Dan Bernstein. Move Windows version of getPluginInfo to NetscapePluginModule https://bugs.webkit.org/show_bug.cgi?id=51073 * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added. (WebKit::getVersionInfo): (WebKit::fileVersion): (WebKit::NetscapePluginModule::getPluginInfo): * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: (WebKit::PluginInfoStore::getPluginInfo): * win/WebKit2.vcproj: 2010-12-14 Alice Liu Fix clang++ build. * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::sendSync): Move the default argument to the declaration. 2010-12-14 Anders Carlsson Reviewed by Adam Roben. Move PluginInfoStore::getPluginInfo to NetscapePluginModule https://bugs.webkit.org/show_bug.cgi?id=51058 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: Move implementation of PluginInfoStore::getPluginInfo and related helper functions here. * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::getPluginInfo): Just call NetscapePluginModule::getPluginInfo here for now. * WebKit2.xcodeproj/project.pbxproj: Add NetscapePluginModuleMac.mm. 2010-12-14 Anders Carlsson Reviewed by John Sullivan. Switch name and description order when fetching Carbon plug-in info https://bugs.webkit.org/show_bug.cgi?id=46211 The plug-in description comes before the name in the Carbon string list resource. * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::getPluginInfoFromCarbonResources): 2010-12-14 Anders Carlsson Reviewed by Adam Roben. Move NetscapePluginModule.{cpp|h} to Shared/Plugins/Netscape https://bugs.webkit.org/show_bug.cgi?id=51052 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.cpp. * Shared/Plugins/Netscape/NetscapePluginModule.h: Renamed from WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.h. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: * win/WebKit2Common.vsprops: 2010-12-14 Anders Carlsson Reviewed by Sam Weinig. Handle complex text input for plug-ins https://bugs.webkit.org/show_bug.cgi?id=51047 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::sendComplexTextInput): Pass along the text input to the plug-in. * PluginProcess/PluginControllerProxy.messages.in: Add SendComplexTextInput message. * UIProcess/API/mac/WKTextInputWindowController.h: Added. * UIProcess/API/mac/WKTextInputWindowController.mm: Added. Add text input window controller, mostly copied from WebKit1. * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): If needed, pass along the event to the text input window controller. (-[WKView inputContext]): Return the input context of the text input window controller. (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]): Notify the input window controller that the input source changed. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sendComplexTextInputToPlugin): Send the complex text input to the web process. * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::convertStringToKeyCodes): Convert a string to a vector of key codes in the current encoding. (WebKit::NetscapePlugin::sendComplexTextInput): In the Cocoa event model, create and dispatch an NPCocoaEventTextInput event. In the Carbon event model, convert the string to individual key codes and send them as key down events. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::sendComplexTextInput): Send the text to the plug-in controller proxy. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::sendComplexTextInput): If the plug-in has a matching text input identifier, call Plugin::sendComplexTextInput. * WebProcess/WebPage/WebPage.messages.in: Add SendComplexTextInputToPlugin message. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::sendComplexTextInputToPlugin): Iterate over all known plug-in views and try to find one to send the text input to. 2010-12-13 Alexey Proskuryakov Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=50953 DNS Prefetch should be an opt-in feature Pass the preference through WebKit2. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetDNSPrefetchingEnabled): (WKPreferencesGetDNSPrefetchingEnabled): * UIProcess/API/C/WKPreferences.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2010-12-13 Anders Carlsson Reviewed by Kevin Decker. Pass the complex text input status to the WKView https://bugs.webkit.org/show_bug.cgi?id=50993 * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setComplexTextInputEnabled): * UIProcess/API/mac/WKView.mm: (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setComplexTextInputEnabled): 2010-12-14 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. WebKit 2 does not send touch cancel events correctly between processes https://bugs.webkit.org/show_bug.cgi?id=50235 The classes WebKit2PlatformTouchPoint and WebKit2PlatformTouchEvent misses the conversion of TouchCancel events and points. This patch add the missing enums when converting from a WebTouchEvent to a PlatformTouchEvent. Testing is already covered by fast/events/touch/send-oncancel-event.html * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint): (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): 2010-12-14 Zalan Bujtas Reviewed by Kenneth Rohde Christiansen. Add loadFinished() for provisional load error This fixes the hanging UI state, when provisional load error occurs due to the async nature of policy check. https://bugs.webkit.org/show_bug.cgi?id=48724 * UIProcess/API/qt/ClientImpl.cpp: (loadFinished): (qt_wk_didFailProvisionalLoadWithErrorForFrame): (qt_wk_didFinishLoadForFrame): (qt_wk_didFailLoadWithErrorForFrame): 2010-12-13 Sam Weinig Reviewed by Anders Carlsson. WebKit2: Need to be able to set the application name for the user agent for a WKPage https://bugs.webkit.org/show_bug.cgi?id=51011 Fixes: WebKit2: Need to be able to set the application name for the user agent for a WKPage WebKit2: Need to be able to get the computed user agent for a WKPage Moves user agent computation to the UIProcess and just passes it to the WebProcess when it has changed. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: Add a user agent to the creation parameters. * UIProcess/API/C/WKPage.cpp: (WKPageCopyUserAgent): (WKPageCopyApplicationNameForUserAgent): (WKPageSetApplicationNameForUserAgent): (WKPageSetCustomUserAgent): * UIProcess/API/C/WKPage.h: Add new API to set the application name and access the computed user agent. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::setUserAgent): (WebKit::WebPageProxy::setApplicationNameForUserAgent): (WebKit::WebPageProxy::setCustomUserAgent): (WebKit::WebPageProxy::processDidCrash): (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::userAgent): (WebKit::WebPageProxy::applicationNameForUserAgent): * UIProcess/mac/WebPageProxyMac.mm: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::setUserAgent): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::userAgent): * WebProcess/WebPage/WebPage.messages.in: Pipe through user agent. (WebKit::callGestalt): (WebKit::macOSXVersionString): (WebKit::userVisibleWebKitVersionString): (WebKit::WebPageProxy::standardUserAgent): * UIProcess/win/WebPageProxyWin.cpp: Added. (WebKit::windowsVersion): (WebKit::userVisibleWebKitVersionString): (WebKit::WebPageProxy::standardUserAgent): Port standardUserAgent computation from WebKit1. * UIProcess/qt/WebPageProxyQt.cpp: Added. (WebKit::WebPageProxy::standardUserAgent): Stub out the user agent so there is no change in behavior. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Add new file. 2010-12-13 Brady Eidson Reviewed by Jon Honeycutt (and Brian Weinstein in heart). and https://bugs.webkit.org/show_bug.cgi?id=50997 Expose "link title" and "link label" to InjectedBundleHitTestResult API * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: (WKBundleHitTestResultCopyLinkLabel): (WKBundleHitTestResultCopyLinkTitle): * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: (WebKit::InjectedBundleHitTestResult::linkLabel): (WebKit::InjectedBundleHitTestResult::linkTitle): * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: 2010-12-13 Brian Weinstein Windows Build Fix. Add a needed include. * UIProcess/win/WebView.cpp: 2010-12-13 Sam Weinig Reviewed by Anders Carlsson. Remove associated page concept from WKView constructor https://bugs.webkit.org/show_bug.cgi?id=50983 Step 2: Remove WebPageNamespace. It no longer does anything. * Shared/APIObject.h: * UIProcess/API/C/WKPage.h: * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:contextRef:pageGroupRef:]): * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkcontext.cpp: (QWKContext::QWKContext): * UIProcess/API/qt/qwkcontext_p.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): (WebKit::WebContext::createWebPage): * UIProcess/WebContext.h: * UIProcess/WebPageNamespace.cpp: Removed. * UIProcess/WebPageNamespace.h: Removed. * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::context): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage): * UIProcess/WebProcessProxy.h: * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): * UIProcess/win/WebView.h: * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2010-12-13 Sam Weinig Fix windows build. * UIProcess/win/WebView.h: 2010-12-13 Sam Weinig Fix windows build. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): * UIProcess/win/WebView.h: (WebKit::WebView::create): 2010-12-13 Sam Weinig Reviewed by Anders Carlsson. Remove associated page concept from WKView constructor https://bugs.webkit.org/show_bug.cgi?id=50983 Step 1: Remove associate page constructors from WKView and make all views use the shared namespace for the context. * UIProcess/API/C/win/WKView.cpp: * UIProcess/API/C/win/WKView.h: * UIProcess/API/mac/WKView.h: * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:contextRef:pageGroupRef:]): * UIProcess/API/qt/qwkcontext.cpp: * UIProcess/API/qt/qwkcontext.h: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage): * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): * UIProcess/win/WebView.h: (WebKit::WebView::create): 2010-12-13 Anders Carlsson Fix build. * UIProcess/WebPageProxy.h: 2010-12-13 Brian Weinstein Reviewed by Adam Roben. WebKit2: Leaks a WebView when opening/closing Web Inspector on Windows https://bugs.webkit.org/show_bug.cgi?id=50975 Make m_inspectorView be a RefPtr, instead of a WebView*. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): If we are on Windows, include WebView.h. * UIProcess/WebInspectorProxy.h: Change the type of m_inspectorView to a RefPtr. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Remove the call to leakRef when creating the WebView. 2010-12-13 Anders Carlsson Reviewed by Darin Adler. Pass the complex text input state all the way to the UI process https://bugs.webkit.org/show_bug.cgi?id=50980 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::setComplexTextInputEnabled): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setComplexTextInputEnabled): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier): * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::pluginComplexTextInputIdentifier): (WebKit::PluginProxy::setComplexTextInputEnabled): * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginProxy.messages.in: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setComplexTextInputEnabled): 2010-12-13 Sam Weinig Reviewed by Anders Carlsson. Change the WebKit2 public API so there is no explicit WKPageNamespace object https://bugs.webkit.org/show_bug.cgi?id=50898 * Shared/API/c/WKBase.h: Remove definition of WKPageNamespaceRef. * UIProcess/API/C/WKAPICast.h: Remove toAPI/toImpl for WKPageNamespaceRef. * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/WKPage.h: Replace WKPageGetPageNamespace with WKPageGetContext. * UIProcess/API/C/WKPageNamespace.cpp: Removed. * UIProcess/API/C/WKPageNamespace.h: Removed. * UIProcess/API/C/WebKit2.h: Remove #include of WKPageNamespace.h. * UIProcess/API/C/win/WKView.cpp: (WKViewCreate): Changed to take a WKContextRef instead of a WKPageNamespaceRef. (WKViewCreateUsingSharedProcess): Added. Similar to WKViewCreate except that all callers of it will have their views end up in the same shared process, whereas with WKViewCreate, a new internal page namespace will be created and could place the view's WebPage into a new process. (WKViewCreateForAssociatedPage): Added. Creates a view that is forced to use the same process as the passed in page. * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): (WebKit::WebView::initialize): * UIProcess/win/WebView.h: (WebKit::WebView::create): (WebKit::WebView::createUsingSharedProcess): (WebKit::WebView::createForAssociatedPage): Implementation of the WKView create functions. * UIProcess/API/C/win/WKView.h: * UIProcess/API/mac/WKView.h: * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:]): (-[WKView initWithFrame:contextRef:]): (-[WKView initWithFrame:contextRef:pageGroupRef:]): (-[WKView initWithFrame:contextRef:usingSharedProcess:]): (-[WKView initWithFrame:contextRef:pageGroupRef:usingSharedProcess:]): (-[WKView initWithFrame:forAssociatedPageRef:]): (-[WKView initWithFrame:forAssociatedPageRef:pageGroupRef:]): (-[WKView initWithFrame:pageNamespace:pageGroup:]): Add new initializers for the objective-c WKView. It follows the same pattern as WKViewRef. * UIProcess/API/qt/qwkcontext.cpp: (QWKContext::QWKContext): * UIProcess/API/qt/qwkcontext.h: Remove uses of WKPageNamespaceRef. * UIProcess/WebContext.cpp: (WebKit::WebContext::sharedPageNamespace): Returns a shared page namespace used by the view's createUsingSharedProcess constructions. (WebKit::WebContext::createPageNamespace): Change to return a PassRefPtr to make things clearer. (WebKit::WebContext::pageNamespaceWasDestroyed): Clear the shared namespace if it is cleared. * UIProcess/WebContext.h: * UIProcess/WebPageNamespace.h: Remove unused "struct WKContextStatistics". * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::context): * UIProcess/WebPageProxy.h: Add context getter. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage): * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Use forAssociatedPageRef constructor for the WebInspector view. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: * win/WebKit2Generated.make: Remove WKPageNamespace.h/cpp. 2010-12-13 Brent Fulgham Unreviewed build fix. * UIProcess/win/WebInspectorProxyWin.cpp: Non-Apple builds need to include . 2010-12-13 Brent Fulgham Unreviewed build fix after r73807. Added stub implementation of Download object. * WebProcess/Downloads/curl: Added. * WebProcess/Downloads/curl/DownloadCurl.cpp: Added. (WebKit::Download::start): (WebKit::Download::startWithHandle): (WebKit::Download::cancel): (WebKit::Download::platformInvalidate): * win/WebKit2.vcproj: Exclude DownloadCFNet for Cairo builds, added DownloadCurl (excluded for regular Apple builds.) 2010-12-13 Anders Carlsson Reviewed by Sam Weinig. Add the ability for plug-ins to toggle complex text input https://bugs.webkit.org/show_bug.cgi?id=50966 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): Initialize m_isComplexTextInputEnabled. (WebKit::PluginControllerProxy::setComplexTextInputEnabled): Update m_isComplexTextInputEnabled. * PluginProcess/PluginControllerProxy.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_pluginHasFocus and m_windowHasFocus. * WebProcess/Plugins/Netscape/NetscapePlugin.h: (WebKit::NetscapePlugin::isWindowActive): Return m_windowHasFocus. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformSetFocus): Update m_pluginHasFocus and call setComplexTextInputEnabled. (WebKit::NetscapePlugin::windowFocusChanged): Update m_windowHasFocus and call setComplexTextInputEnabled. * WebProcess/Plugins/PluginController.h: Add setComplexTextInputEnabled. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setComplexTextInputEnabled): * WebProcess/Plugins/PluginView.h: Add setComplexTextInputEnabled 2010-12-13 David Hyatt Reviewed by Adam Roben. Remove the space behavior that I added. It's covered in EventHandler in WebCore already for Windows. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::WebPage::performDefaultBehaviorForKeyEvent): 2010-12-13 David Hyatt Reviewed by Sam Weinig. 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. * 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): 2010-12-13 Brian Weinstein Reviewed by Darin Adler. WebKit2: Focusing Web Inspector window doesn't focus contents on Windows https://bugs.webkit.org/show_bug.cgi?id=50947 When we get the notification that the inspector window has focused, focus the inner inspector view. * UIProcess/WebInspectorProxy.h: * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::onSetFocusEvent): Set the focus of the inspector view, because that is what needs to be focused in the inspector window. 2010-12-13 Dan Bernstein Coding style fix. * WebProcess/Downloads/mac/DownloadMac.mm: (WebKit::originatingURLFromBackForwardList): 2010-12-13 Balazs Kelemen Unreviewed trivial build fix (linux, 64 bit, gcc-4.5.1) * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::exceededDatabaseQuota): Don't use unsigned long long as alias for uint64_t. 2010-12-13 Anders Carlsson Reviewed by John Sullivan. Crash when clicking a download link that targets a new tab https://bugs.webkit.org/show_bug.cgi?id=50935 Check for a null history item. * WebProcess/Downloads/mac/DownloadMac.mm: (WebKit::originatingURLFromBackForwardList): 2010-12-13 Andras Becsi Reviewed by Csaba Osztrogonác. [Qt][WK2] Fix build if WebKitTools are not available https://bugs.webkit.org/show_bug.cgi?id=50242 * DerivedSources.pro: Remove dependency to WebKitTools. * Scripts/generate-forwarding-headers.pl: Moved from WebKitTools/Scripts/generate-forwarding-headers.pl. 2010-12-13 Csaba Osztrogonác Unreviewed. * WebKit2.pro: Remove non-existant Shared/DrawingAreaBase.h from build system. 2010-10-28 MORITA Hajime 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-12-12 Brian Weinstein Reviewed by Tim Hatcher. WebKit2: Implement WebInspector::localizedStringsURL on Windows https://bugs.webkit.org/show_bug.cgi?id=50896 Find the localized strings file using CFBundleCopyResourceURL. * WebProcess/WebPage/win/WebInspectorWin.cpp: (WebKit::WebInspector::localizedStringsURL): 2010-12-12 Sam Weinig Reviewed by Anders Carlsson. Give LogTextInput a sensible flag value. * Platform/Logging.cpp: 2010-12-12 Sam Weinig Reviewed by Anders Carlsson. Remove incorrect assertion that has been firing in the API tester. * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy): 2010-12-12 Sam Weinig Reviewed by Anders Carlsson. Disable WebKit2 logging by default. https://bugs.webkit.org/show_bug.cgi?id=50878 * Platform/Logging.cpp: (initializeLogChannelsIfNecessary): 2010-12-11 Brian Weinstein Reviewed by Sam Weinig. Web Inspector: Make inspector on Windows show and be usable in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=50877 Hook up the unimplemented methods in WebInspectorProxyWin to get the web inspector showing and usable in WebKit2 on Windows. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize Windows-specific variables to 0. * UIProcess/WebInspectorProxy.h: * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::registerInspectorViewWindowClass): Sets up the inspector view class. (WebKit::WebInspectorProxy::InspectorViewWndProc): Calls through to the WebInspectorProxy's non-static WndProc. (WebKit::WebInspectorProxy::wndProc): Handles WM_SIZE, WM_CLOSE, and WM_GETMINMAXINFO, the rest go to ::DefWindowProc. (WebKit::WebInspectorProxy::onSizeEvent): Resize the WKView that has the inspector page to match the outer window that was just resized. (WebKit::WebInspectorProxy::onMinMaxInfoEvent): Set the minimum size the window can be resized to. (WebKit::WebInspectorProxy::onCloseEvent): Hide the window, and call WebInspectorProxy::close. (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WKView and return its page. (WebKit::WebInspectorProxy::platformOpen): Create an HWND for the inspector, put the inspector's WKView inside of it, and show the window. (WebKit::WebInspectorProxy::platformClose): Destroy the inspector's window (which destroys the child WKView), and 0 out instance variables. (WebKit::WebInspectorProxy::inspectorPageURL): Finds inspector/inspector.html in the WebKit bundle. 2010-12-12 Balazs Kelemen Reviewed by Andreas Kling. [Qt][WK2] Crash in WebPage constructor. https://bugs.webkit.org/show_bug.cgi?id=50892 * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Disable runtime enabled features that have no WebKit2 implementation yet. 2010-12-10 Jon Honeycutt Select menus with short option titles do not paint properly https://bugs.webkit.org/show_bug.cgi?id=50860 The backing stores used for painting the popup menu items were only as wide as the widest option title, but the popup window that we create is at least as wide as the , as well. Reviewed by Sam Weinig. * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::paint): Paint using the width of the backing store. * WebProcess/WebCoreSupport/WebPopupMenu.cpp: (WebKit::WebPopupMenu::show): Pass the page coordinates of the element, and use that width when painting the items to the backing store. 2010-12-11 Csaba Osztrogonác Unreviewed Qt buildfix after r73808. WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager https://bugs.webkit.org/show_bug.cgi?id=50606 * DerivedSources.pro: 2010-12-11 Sheriff Bot Unreviewed, rolling out r73834. http://trac.webkit.org/changeset/73834 https://bugs.webkit.org/show_bug.cgi?id=50866 It broke Qt-WebKit2 build, because of missing WK2_DIR variable (Requested by Ossy on #webkit). * WebKit2.pro: 2010-12-10 Siddharth Mathur Reviewed by Eric Seidel. [Qt][WK2] Make WebKit2 static library compile on Symbian https://bugs.webkit.org/show_bug.cgi?id=50861 * WebKit2.pro: 2010-12-10 Sam Weinig Reviewed by Anders Carlsson. Ensure that we are not getting too many wheel events Add simple coalescing of wheel events being sent to the WebProcess. This adds two models, one which drops interim events and one which merges events together. For now, we are using the simpler dropping model. * Shared/WebEvent.h: (WebKit::WebEvent::modifiers): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::coalesceWheelEvents): (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::didReceiveEvent): * UIProcess/WebPageProxy.h: 2010-12-10 Anders Carlsson Reviewed by John Sullivan. Make WKContextGetStatistics gather global statistics https://bugs.webkit.org/show_bug.cgi?id=50850 Change WKContextGetStatistics to work on all objects in the process, and make it more robust by incrementing/decrementing the counts in the constructor and destructor respectively. Also, rename WKContextGetStatistics to WKContextGetGlobalStatistics to better match what it's actually doing. * UIProcess/API/C/WKContext.cpp: (WKContextGetStatistics): * UIProcess/API/C/WKContextPrivate.h: * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): (-[WKView dealloc]): * UIProcess/WebContext.cpp: (WebKit::WebContext::statistics): * UIProcess/WebContext.h: * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::WebFrameProxy): (WebKit::WebFrameProxy::~WebFrameProxy): * UIProcess/WebPageNamespace.cpp: * UIProcess/WebPageNamespace.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::~WebPageProxy): * UIProcess/WebPageProxy.h: 2010-12-10 Brian Weinstein Reviewed by Darin Adler. WebKit2: Context menu support on Windows Implment showing of the context menu on Windows for WebKit2, and calling through to WebPageProxy::contextMenuItemSelected. * UIProcess/win/WebContextMenuProxyWin.cpp: (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin): Initialize the member variables. (WebKit::WebContextMenuProxyWin::populateMenu): Iterate over the vector of WebContextMenuItemData that was passed in, adding the menu items and recursively calling back into this function to populate any submenus that are needed. This function also sets up the map from action identifierss to WebContextMenuItemData, to use to find the WebContextMenuItemData from a selected menu item. (WebKit::WebContextMenuProxyWin::showContextMenu): Destroy any menu we have already created, populate the menu to show, and show the context menu. Once TrackPopupMenuEx returns, it returns identifier of the selected menu item. Look up that identifier in the map we created, and tell the WebPageProxy that a context menu item was selected. (WebKit::WebContextMenuProxyWin::hideContextMenu): Destroy the HMENU if it is non-null, and clear the identifier map. * UIProcess/win/WebContextMenuProxyWin.h: (WebKit::WebContextMenuProxyWin::create): Call through to the constructor, and change the arguments that it takes. * UIProcess/win/WebView.cpp: (WebKit::WebView::createContextMenuProxy): Call with the correct arguments. 2010-12-10 Jessie Berlin Qt Build Fix. Unreviewed. * WebKit2.pro: Add the Messages.h and MessageReceivers.h. 2010-12-10 Jessie Berlin Reviewed by Adam Roben and Sam Weinig. WebKit2: Need a WebKit2 equivalent of the WebKit1 WebDatabaseManager https://bugs.webkit.org/show_bug.cgi?id=50606 Add a WebDatabaseManagerProxy owned by the WebContext. Expose API (similar to the WebKit1 API) to get a list of origins for which there are Databases, delete all the databases for a given origin, and delete all the databases. Add WebDatabaseManager and WebDatabaseManagerProxy as messages receivers. * DerivedSources.make: * Platform/CoreIPC/MessageID.h: Add the WebDatabaseManagerProxy as a UIProcess type (DatabaseManager). * Shared/API/c/WKBase.h: * Shared/APIObject.h: * UIProcess/API/C/WKAPICast.h: * UIProcess/API/C/WKContext.cpp: (WKContextGetDatabaseManager): Expose API to get the DatabaseManager. * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKDatabaseManager.cpp: Added. (WKDatabaseManagerGetTypeID): (WKDatabaseManagerGetDatabaseOrigins): (callGetDatabaseOriginsBlockBlockAndDispose): (WKDatabaseManagerGetDatabaseOrigins_b): (WKDatabaseManagerDeleteDatabasesForOrigin): (WKDatabaseManagerDeleteAllDatabases): * UIProcess/API/C/WKDatabaseManager.h: Added. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Create the WebDatabaseManagerProxy. (WebKit::WebContext::processDidClose): Invalidate the WebDatabaseManagerProxy. (WebKit::WebContext::didReceiveMessage): Forward messages to the WebDatabaseManagerProxy. * UIProcess/WebContext.h: (WebKit::WebContext::databaseManagerProxy): * UIProcess/WebDatabaseManagerProxy.cpp: Added. (WebKit::WebDatabaseManagerProxy::create): (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy): (WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy): (WebKit::WebDatabaseManagerProxy::invalidate): Invalidate the map of callbacks for getDatabaseOrigins. (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins): Store the callback and send the request for the origins which have databases to the WebProcess. (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins): Call the callback function with the SecurityOrigins created from the identifiers received. (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin): If the origin exists, send the message on to the WebProcess to delete the databases associated with that origin. (WebKit::WebDatabaseManagerProxy::deleteAllDatabases): Send the message to the WebProcess to delete all the databases. * UIProcess/WebDatabaseManagerProxy.h: Added. (WebKit::WebDatabaseManagerProxy::type): * UIProcess/WebDatabaseManagerProxy.messages.in: Added. * UIProcess/WebPageProxy.cpp: Move invalidateCallbackMap from here ... * UIProcess/GenericCallback.h: (WebKit::invalidateCallbackMap): .. to here so that it can be used elsewhere (e.g. by WebDatabaseManagerProxy). * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): Forward on all messages destined for the WebDatabaseManagerProxy to the WebContext. * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::didReceiveMessage): (WebKit::WebDatabaseManager::getDatabaseOrigins): Send an array of the identifiers for the SecurityOrigins for which there are databases to the UIProcess. (WebKit::WebDatabaseManager::deleteDatabasesForOrigin): If the SecurityOrigin with that identifier exists, tell the DatabaseTracker to delete the databases for that origin. (WebKit::WebDatabaseManager::deleteAllDatabases): Tell the DatabaseTracker to delete the databases for that origin. * WebProcess/WebCoreSupport/WebDatabaseManager.h: * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): * WebKit2.pro: Add WKDatabaseManager.cpp/.h and WebDatabaseManagerProxy.cpp/.h * WebKit2.xcodeproj/project.pbxproj: Ditto, also add WebDatabaseManagerProxy.messages.in and WebDatabaseManager.messages.in. * win/WebKit2.vcproj: Ditto. * win/WebKit2Generated.make: Make sure WKDatabaseManager.h is copied into WebKitBuild on Windows. 2010-12-10 Ada Chan Reviewed by Anders Carlsson. Implement Download::start() and Download::startWithHandle() on Windows. https://bugs.webkit.org/show_bug.cgi?id=50844 * WebProcess/Downloads/Download.h: * WebProcess/Downloads/cf/DownloadCFNet.cpp: (WebKit::Download::start): Create a CFURLDownloadRef and schedule it. (WebKit::Download::startWithHandle): Create a CFURLDownloadRef with the loading connection retrieved from the ResourceHandle. (WebKit::Download::platformInvalidate): (WebKit::downloadFromClientInfo): (WebKit::didStartCallback): (WebKit::willSendRequestCallback): (WebKit::didReceiveAuthenticationChallengeCallback): (WebKit::didReceiveResponseCallback): (WebKit::willResumeWithResponseCallback): (WebKit::didReceiveDataCallback): (WebKit::shouldDecodeDataOfMIMETypeCallback): (WebKit::decideDestinationWithSuggestedObjectNameCallback): (WebKit::didCreateDestinationCallback): (WebKit::didFinishCallback): (WebKit::didFailCallback): 2010-12-10 Enrica Casucci Windows build fix. Unreviewed. Adding a dummy synchronous message for platforms that don't have any. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::dummy): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2010-12-09 Brian Weinstein Reviewed by Adam Roben. Prep for WebKit2: Context menu support on Windows https://bugs.webkit.org/show_bug.cgi?id=50514 Update WebKit2 to call the correct code when CROSS_PLATFORM_CONTEXT_MENUS is set. * Shared/WebContextMenuItemData.cpp: (WebKit::WebContextMenuItemData::WebContextMenuItemData): Add a branch based on whether or not CROSS_PLATFORM_CONTEXT_MENUS is set. * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::customizeMenu): Define different functions based on whether or not CROSS_PLATFORM_CONTEXT_MENUS. Both of these are stubs, so functionality doesn't need to be shared. * WebProcess/WebCoreSupport/WebContextMenuClient.h: Define different functions based on whether or not CROSS_PLATFORM_CONTEXT_MENUS. * WebProcess/WebPage/WebContextMenu.cpp: (WebKit::WebContextMenu::show): Add a branch based on whether or not CROSS_PLATFORM_CONTEXT_MENUS is set. 2010-12-09 Enrica Casucci Reviewed by Alexey Proskuryakov. Implement IME support for Mac. WebKit2: Implement IME support for Mac. https://bugs.webkit.org/show_bug.cgi?id=50788 This patch addes support for input methods in WebKit2. In order to support IME, it was necessary to add synchronous calls from the UIProcess to the WebProcess. These calls all have a timeout of 1 second. The current implementation still uses the NSTextInput protocol, but the plan is to move to the NSTextInputClient protocol. This has not been done yet for ease of comparison with WebKit. attributedSubstringFromRange is the only method that has not been implemented, because I have not yet decided what is the best way to send an NSAttributedString across the process boundary. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added template for member function. with four reply arguments. * Scripts/webkit2/messages.py: Added CompositionUnderline and relevant header. * Shared/WebCoreArgumentCoders.h: (CoreIPC::): Added encoder/decoder for CompositionUnderline. * UIProcess/API/mac/PageClientImpl.h: Added parameters to interceptKeyEvent and selectionChanged. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::selectionChanged): Added parameters. (WebKit::PageClientImpl::interceptKeyEvent): Added parameters. * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:pageNamespaceRef:pageGroupRef:]): Added initialization of new private members. (-[WKView insertText:]): (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:range:]): Added parameters. (-[WKView _interceptKeyEvent:hasComposition:start:end:lines:WebCore::]): Added parameters. (-[WKView keyDown:]): Modified to reset state on each keyDown. (-[WKView selectedRange]): Added. (-[WKView hasMarkedText]): Added. (-[WKView unmarkText]): Added. (-[WKView validAttributesForMarkedText]): Added. (extractUnderlines): Added. (-[WKView setMarkedText:selectedRange:]): Added. (-[WKView markedRange]): Added. (-[WKView attributedSubstringFromRange:]): Added. (-[WKView characterIndexForPoint:]): Added. (-[WKView firstRectForCharacterRange:]): Added. (-[WKView conversationIdentifier]): Added. * UIProcess/API/mac/WKViewInternal.h: Added parameters to _interceptKeyEvent and _selectionChanged. * UIProcess/PageClient.h: Added parameters to interpretKeyEvent and selectionChanged. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getMarkedRange): Added. (WebKit::WebPageProxy::characterIndexForPoint): Added. (WebKit::WebPageProxy::firstRectForCharacterRange): Added. (WebKit::WebPageProxy::interpretKeyEvent): Additional parameters. (WebKit::WebPageProxy::didSelectionChange): Additional parameters for Mac platform. * UIProcess/WebPageProxy.h: Added new methods and parameters to didSelectionChange and interpretKeyEvent. * UIProcess/WebPageProxy.messages.in: Added parameters to interpretKeyEvent and selectionChanged messages. * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::sendSync): Added support for synchronous messages. The default timeout is 1 second. * WebProcess/WebCoreSupport/WebEditorClient.cpp: respondToChangedSelection is now only for non Mac platform. * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: (WebKit::WebEditorClient::respondToChangedSelection): Added implementation for Mac platform. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveSyncMessage): Added. * WebProcess/WebPage/WebPage.h: Added new methods and support for synchronous messages. * WebProcess/WebPage/WebPage.messages.in: Added new messages. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::interceptEditingKeyboardEvent): Added parameters. (WebKit::WebPage::convertRangeToPlatformRange): Added. (WebKit::WebPage::getMarkedRange): Added. (WebKit::characterRangeAtPoint): Added. (WebKit::WebPage::characterIndexForPoint): Added. (WebKit::convertToRange): Added. (WebKit::WebPage::firstRectForCharacterRange): Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveSyncMessage): Added. * WebProcess/WebProcess.h: Added didReceiveSyncMessage. 2010-12-10 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Add the QWKContext API class to wrap the WebContext. https://bugs.webkit.org/show_bug.cgi?id=50750 * UIProcess/API/qt/WKView.h: * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::QGraphicsWKView): Change the WKPageNamespaceRef argument to QWKContext* * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkcontext.cpp: Added. * UIProcess/API/qt/qwkcontext.h: Added. * UIProcess/API/qt/qwkcontext_p.h: Added. * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): (QWKPage::QWKPage): Change the WKPageNamespaceRef argument to QWKContext* * UIProcess/API/qt/qwkpage.h: * UIProcess/API/qt/qwkpage_p.h: * WebKit2.pro: 2010-12-10 Kimmo Kinnunen Reviewed by Kenneth Rohde Christiansen. Flush IPC connection send buffer after each message. [Qt] [WK2] IPC messages are not sent until send buffer fills up https://bugs.webkit.org/show_bug.cgi?id=50667 * Platform/CoreIPC/qt/ConnectionQt.cpp: (CoreIPC::Connection::sendOutgoingMessage): 2010-12-09 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Use a single QNetworkAccessManager per web process. https://bugs.webkit.org/show_bug.cgi?id=50757 This allows a better management of network resources and the use of global cookie jar and disk cache across all frames. * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext): (WebCore::WebFrameNetworkingContext::networkAccessManager): * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::shutdownIfPossible): * WebProcess/WebProcess.h: (WebKit::WebProcess::networkAccessManager): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::platformShutdown): * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::platformShutdown): * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::platformShutdown): 2010-12-09 Mark Rowe Fix the 32-bit build. * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::sizeForNumberType): 2010-12-09 Maciej Stachowiak Reviewed by Brady Eidson. WebKit2: Control-click doesn't invoke context menu https://bugs.webkit.org/show_bug.cgi?id=50793 * WebProcess/WebPage/WebPage.cpp: (WebKit::isContextClick): New helper function - on Mac, not only right clicks but also control-left-clicks are context clicks. (WebKit::handleMouseEvent): Use above. 2010-12-09 Anders Carlsson Fix clang++ build. * Scripts/webkit2/messages.py: DrawingAreaInfo is a struct. * Shared/WebPreferencesStore.cpp: (WebKit::valueForKey): Move valueForKey above code that uses it. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WebInspectorProxyObjCAdapter windowWillClose:]): Remove trailing semicolon. 2010-12-09 Timothy Hatcher 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. 2010-12-09 Anders Carlsson Reviewed by Sam Weinig. Cannot use NSKeyedArchiver in WK2 for ResourceResponses https://bugs.webkit.org/show_bug.cgi?id=50792 When encoding, first convert the requests and responses to the serializable dictionary representation and use the newly added CF CoreIPC encoders. When decoding, do the opposite. * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::encodeResourceRequest): (CoreIPC::decodeResourceRequest): (CoreIPC::encodeResourceResponse): (CoreIPC::decodeResourceResponse): 2010-12-09 Anders Carlsson Reviewed by Sam Weinig. Add CoreIPC coders for CF types https://bugs.webkit.org/show_bug.cgi?id=50791 * Platform/CoreIPC/ArgumentDecoder.h: (CoreIPC::ArgumentDecoder::decodeEnum): * Platform/CoreIPC/ArgumentEncoder.h: (CoreIPC::ArgumentEncoder::encodeEnum): * Shared/cf/ArgumentCodersCF.cpp: Added. (CoreIPC::tokenNullTypeRef): (CoreIPC::typeFromCFTypeRef): (CoreIPC::encode): (CoreIPC::decode): (CoreIPC::sizeForNumberType): * Shared/cf/ArgumentCodersCF.h: Added. * WebKit2.xcodeproj/project.pbxproj: 2010-12-09 Brady Eidson Reviewed by Sam Weinig. and https://bugs.webkit.org/show_bug.cgi?id=50786 WK2 authentication never consults WebCore session credential storage. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Since we don't need to expose this as API at this time, always return true. 2010-12-09 Sam Weinig Reviewed by Alexey Proskuryakov. WebKit2: Add support for access keys https://bugs.webkit.org/show_bug.cgi?id=49832 * WebProcess/WebPage/WebPage.cpp: (WebKit::handleKeyEvent): Match windows WebKit and call the event handler's for handleAccessKey function for system keys. This will never be hit on the Mac. 2010-12-09 Darin Adler Qt build fix. * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: Include "NotImplemented.h". 2010-12-09 Steve Falkenburg Windows build fix. * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: 2010-12-09 Brady Eidson Reviewed by Anders Carlsson. and https://bugs.webkit.org/show_bug.cgi?id=50777 WebKit2 ContextMenuClient support 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: 2010-12-09 Anders Carlsson Reviewed by Sam Weinig. Don't leak the PDFDocument https://bugs.webkit.org/show_bug.cgi?id=50771 * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData): 2010-12-09 Anders Carlsson Reviewed by Sam Weinig. Add a basic implementation of PDF support on Mac https://bugs.webkit.org/show_bug.cgi?id=50768 * UIProcess/API/mac/PDFViewController.h: * UIProcess/API/mac/PDFViewController.mm: Added. (-[WKPDFView initWithFrame:PDFViewController:WebKit::]): Setup the view hierarchy. (-[WKPDFView invalidate]): Set the controller to null. (-[WKPDFView pdfView]): Return the PDF view. (WebKit::PDFViewController::create): (WebKit::PDFViewController::PDFViewController): Create a WKPDFView and insert it as a subview of the WKView. (WebKit::PDFViewController::~PDFViewController): Remove the WKPDFView from the view hierarchy and invalidate it. (WebKit::convertPostScriptDataSourceToPDF): Convert the data in the data reference to PDF and return it as a CFDataRef. (WebKit::PDFViewController::setPDFDocumentData): Create a PDFDocument and set it on the PDF view. (WebKit::PDFViewController::pdfDocumentClass): (WebKit::PDFViewController::pdfPreviewViewClass): (WebKit::PDFViewController::pdfKitBundle): Add soft-linking helper functions. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didCommitLoadForMainFrame): (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): Call the WKView methods. * UIProcess/API/mac/WKView.mm: (-[WKView _setPageHasCustomRepresentation:]): Create a PDF view controller if necessary. (-[WKView _didFinishLoadingDataForCustomRepresentation:CoreIPC::]): Pass the data along to the PDF view controller. * WebKit2.xcodeproj/project.pbxproj: Add new files. 2010-12-09 Anders Carlsson Reviewed by Sam Weinig. Add support for custom representation https://bugs.webkit.org/show_bug.cgi?id=50767 * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: Add mimeTypesWithCustomRepresentation and encode and decode accordingly. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didCommitLoadForMainFrame): (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation): Add empty stubs for now. * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::didCommitLoadForMainFrame): (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation): * UIProcess/API/qt/qwkpage_p.h: Add empty stubs. * UIProcess/PageClient.h: Add new functions for custom representations. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::canShowMIMEType): Check that the mime type is not null. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): This now takes an additional frameHasCustomRepresentation parameter. Call the page client function. (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation): Call the page client function. * UIProcess/WebPageProxy.messages.in: Change DidCommitLoadForFrame message, add DidFinishLoadingDataForCustomRepresentation message. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): We want to use custom representations for PDF and PostScript MIME types. * UIProcess/win/WebView.cpp: (WebKit::WebView::didCommitLoadForMainFrame): (WebKit::WebView::didFinishLoadingDataForCustomRepresentation): * UIProcess/win/WebView.h: Add stubs. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::WebFrameLoaderClient): Initialize m_frameHasCustomRepresentation. (WebKit::WebFrameLoaderClient::hasHTMLView): The frame has a HTML view unless it has a custom representation. (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): Pass along whether the frame has a custom representation. (WebKit::WebFrameLoaderClient::committedLoad): Don't send data back to WebCore if the frame has a custom representation. (WebKit::WebFrameLoaderClient::finishedLoading): Send all the data to the UI process. (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Update the m_frameHasCustomRepresentation state based on the MIME type. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebKit::WebFrameLoaderClient::frameHasCustomRepresentation): Add getter. * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk): Don't do any painting if the main frame has a custom representation. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Add all the MIME types with custom representations. * WebProcess/WebProcess.h: (WebKit::WebProcess::shouldUseCustomRepresentationForMIMEType): Add getter. 2010-12-09 Maciej Stachowiak Reviewed by Dan Bernstein. Implement "Use Selection for Find" in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=50737 * UIProcess/API/mac/WKView.mm: Add support for the takeFindStringFromSelection: selector as a command. 2010-12-09 Brady Eidson Reviewed by Maciej Stachowiak. and https://bugs.webkit.org/show_bug.cgi?id=50191 WebKit2 Authentication Support 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: 2010-12-08 Sam Weinig Reviewed by Geoffrey "Error" Garen. Fix typo: Diplaying -> Displaying * UIProcess/API/C/WKFrame.cpp: (WKFrameIsDisplayingStandaloneImageDocument): (WKFrameIsDisplayingMarkupDocument): * UIProcess/API/C/WKFrame.h: * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::canProvideSource): (WebKit::WebFrameProxy::isDisplayingStandaloneImageDocument): (WebKit::WebFrameProxy::isDisplayingMarkupDocument): * UIProcess/WebFrameProxy.h: 2010-12-08 Sam Weinig Reviewed by Gavin Barraclough. Add WebKit2 Preference for TabsToLinks behavior. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetTabsToLinks): (WKPreferencesGetTabsToLinks): * UIProcess/API/C/WKPreferences.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::tabsToLinks): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::tabsToLinks): 2010-12-08 Benjamin Poulain Reviewed by Andreas Kling. WebTouchEvent::isTouchEventType() does not take into account the type TouchCancel https://bugs.webkit.org/show_bug.cgi?id=50680 Add the missing type check to WebTouchEvent::isTouchEventType(). * Shared/WebTouchEvent.cpp: (WebKit::WebTouchEvent::isTouchEventType): 2010-12-08 Sam Weinig Reviewed by Darin Adler. Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement https://bugs.webkit.org/show_bug.cgi?id=50726 Adds WKBundleNodeHandleCopyDocumentFrame, WKBundleNodeHandleCopyHTMLFrameElementContentFrame and WKBundleNodeHandleCopyHTMLIFrameElementContentFrame, to handle the document, and