diff options
Diffstat (limited to 'Source/WebKit2/ChangeLog')
-rw-r--r-- | Source/WebKit2/ChangeLog | 5472 |
1 files changed, 5472 insertions, 0 deletions
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index e83c4ed..9f916ac 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,5475 @@ +2011-02-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej Stachowiak. + + Speculative fix for + + <rdar://problem/8995361> + CrashTracer: [USER] 47 crashes in WebProcess at com.apple.WebKit2: WebKit::WebPage::layoutIfNeeded + 4 + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::~DrawingAreaImpl): + Invalidate the layer tree host. + +2011-02-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + The plug-in process heap should be executable by default + https://bugs.webkit.org/show_bug.cgi?id=54364 + <rdar://problem/8990563> + + * UIProcess/Launcher/ProcessLauncher.h: + Add executableHeap flag. + + * UIProcess/Launcher/mac/ProcessLauncherMac.mm: + (WebKit::ProcessLauncher::launchProcess): + Set the right posix_spawn flag if executableHeap is true. + + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::PluginProcessProxy): + Initialize executableHeap to true. + + * UIProcess/WebProcessProxy.cpp: + (WebKit::WebProcessProxy::connect): + Initialize executableHeap to false. + +2011-02-13 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Messages waited on are never dispatched + https://bugs.webkit.org/show_bug.cgi?id=54362 + <rdar://problem/8995051> + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::processIncomingMessage): + Get the argument encoder from the incoming message. + +2011-02-13 Jeremy Moskovich <jeremy@chromium.org> + + Reviewed by Adam Barth. + + Add a compile-time option to completely disable WebArchive support. + https://bugs.webkit.org/show_bug.cgi?id=52712 + + Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::updatePreferences): + +2011-02-13 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=54348 + Crash when printing a document with no pages + + * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPagesToPDF): Don't fail on a fake + page that computePagesForPrinting() added to a pageless document. + +2011-02-13 Chris Fleizach <cfleizach@apple.com> + + Reviewed and landed by Sam Weinig. + + AX: Update WK2 usage of remote accessibility api + https://bugs.webkit.org/show_bug.cgi?id=54220 + + Rename some of the remote accessibility methods to be more accurate. + Make sure to unregister the AccessibilityWebPageObject on dealloc. + Send the window remote token along with the WKView remote token. + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived): + * UIProcess/API/mac/WKView.mm: + (-[WKView _updateRemoteAccessibilityRegistration:]): + (-[WKView initWithFrame:contextRef:pageGroupRef:]): + (-[WKView viewDidMoveToWindow]): + (-[WKView _processDidCrash]): + (-[WKView _pageClosed]): + (-[WKView _setAccessibilityWebProcessToken:]): + * UIProcess/API/mac/WKViewInternal.h: + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::registerWebProcessAccessibilityToken): + (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: + (-[AccessibilityWebPageObject dealloc]): + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::platformInitialize): + (WebKit::WebPage::registerUIProcessAccessibilityTokens): + +2011-02-11 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=54335 + <rdar://problem/8895141> Make window.print() work with WebKit2 + + * Platform/CoreIPC/Connection.h: Corrected a typo in FIXME comment. + + * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: + (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible): + (WebKit::ChunkedUpdateDrawingAreaProxy::update): + (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize): + * UIProcess/TiledDrawingAreaProxy.cpp: + (WebKit::TiledDrawingAreaProxy::sizeDidChange): + (WebKit::TiledDrawingAreaProxy::setPageIsVisible): + (WebKit::TiledDrawingAreaProxy::takeSnapshot): + (WebKit::TiledDrawingAreaProxy::removeTile): + * UIProcess/LayerBackedDrawingAreaProxy.cpp: + (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange): + (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible): + (WebKit::LayerBackedDrawingAreaProxy::update): + * UIProcess/WebContext.cpp: + (WebKit::WebContext::ensureWebProcess): + (WebKit::WebContext::postMessageToInjectedBundle): + Updated for send() -> deprecatedSend() rename. + + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::WebPageProxy): Added a flag that's true while serving window.print(). + (WebKit::WebPageProxy::printFrame): Set and unset m_isPerformingDOMPrintOperation. + (WebKit::WebPageProxy::beginPrinting): Force message processing in web process when serving + window.print(). + (WebKit::WebPageProxy::endPrinting): Ditto. + (WebKit::WebPageProxy::computePagesForPrinting): Ditto. + (WebKit::WebPageProxy::drawRectToPDF): Ditto. + (WebKit::WebPageProxy::drawPagesToPDF): Ditto. + + * UIProcess/WebProcessProxy.cpp: + (WebKit::WebProcessProxy::~WebProcessProxy): + (WebKit::WebProcessProxy::sendMessage): + (WebKit::WebProcessProxy::didFinishLaunching): + When waiting for a web process to launch, store message flags, too. This is not practically + important for DispatchMessageEvenWhenWaitingForSyncReply, but it's easier to store flags + than to remember about this pitfall. + + * UIProcess/WebProcessProxy.h: + (WebKit::WebProcessProxy::send): Added a flags argument, matching Connection::send(). + (WebKit::WebProcessProxy::deprecatedSend): Renamed one of send() overloads, because it was + conflicting with the other one after adding a flags argument. This matches a change previously + made to CoreIPC::Connection. + +2011-02-12 Chris Marrin <cmarrin@apple.com> + + Reviewed by Dan Bernstein. + + Crash in RenderLayerCompositor::updateCompositingLayers when loading some sites + https://bugs.webkit.org/show_bug.cgi?id=54345 + + Some sites flip between composited and non-comosited state while loading. When the timing is + right, when we flip out of compositing we will need to do a display while tossing all the + compositing layers. This causes us to reenter RenderLayerCompositor::computeCompositingRequirements() + while we are in the middle of tossing layers, which leads to a crash. + + The solution is to defer the logic of exiting compositing mode until the DrawingArea is finished + doing its display, using a timer. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::DrawingAreaImpl): + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon): + * WebProcess/WebPage/DrawingAreaImpl.h: + +2011-02-12 Kevin Decker <kdecker@apple.com> + + Reviewed by Dan Bernstein. + + Follow up fix to: + https://bugs.webkit.org/show_bug.cgi?id=54341 - optionally scale snapshots in document view coordinates + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Fixed the order of the scale and translate. + +2011-02-12 Kevin Decker <kdecker@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=54341 - optionally scale snapshots in document view coordinates + <rdar://problem/8990069> + + * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: + (WKBundlePageCreateScaledSnapshotInDocumentCoordinates): Added. + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added above new function. + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Added. + (WebKit::WebPage::snapshotInDocumentCoordinates): Call scaledSnapshotInDocumentCoordinates with a scale of 1. + * WebProcess/WebPage/WebPage.h: Added scaledSnapshotInDocumentCoordinates(). + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej Stachowiak. + + Can’t open local files on reload or navigation from the back/forward cache + https://bugs.webkit.org/show_bug.cgi?id=54332 + <rdar://problem/8903076> + + * UIProcess/WebInspectorProxy.cpp: + (WebKit::WebInspectorProxy::isInspectorPage): + * UIProcess/WebInspectorProxy.h: + Check whether the given page is a web inspector page. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::initializeSandboxExtensionHandle): + If this is a web inspector page, we don't want to make a sandbox extension. + + (WebKit::WebPageProxy::reattachToWebProcessWithItem): + (WebKit::WebPageProxy::goForward): + (WebKit::WebPageProxy::goBack): + (WebKit::WebPageProxy::goToBackForwardItem): + Pass a sandbox extension along when sending the message. + + * UIProcess/WebPageProxy.h: + Make initializeSandboxExtensionHandle a member function. + + * UIProcess/cf/WebPageProxyCF.cpp: + (WebKit::WebPageProxy::restoreFromSessionStateData): + Pass a sandbox extension along. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::goForward): + (WebKit::WebPage::goBack): + (WebKit::WebPage::goToBackForwardItem): + Hand the sandbox extension to the sandbox extension tracker. + + (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): + Pass the sandbox extension to goToBackForwardItem. + + (WebKit::shouldReuseCommittedSandboxExtension): + New function that checks whether a committed sandbox extension should be re-used. We + do this for page reloads, as well as regular page navigations when both the committed + and provisional documents have file URLs. + + (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): + Reuse the committed sandbox extension if necessary. + + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Fix Snow Leopard build. + + * PluginProcess/PluginProcess.cpp: + (WebKit::PluginProcess::didFailToSendSyncMessage): + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::didFailToSendSyncMessage): + +2011-02-11 Yael Aharon <yael.aharon@nokia.com> + + Unreviewed Qt webkit2 build fix after r78392. + + * WebProcess/WebProcess.h: + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + WebProcess hung communicating with the plug-in process + https://bugs.webkit.org/show_bug.cgi?id=54328 + <rdar://problem/8854075> + + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::createWebProcessConnection): + Add the DispatchMessageEvenWhenWaitingForSyncReply message send flag when sending the + PluginProcess::CreateWebProcessConnection message, since the plug-in process can be busy waiting + for a sync reply from the web process. + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Incoming synchronous messages should always be processed regardless of connection waiting for a reply + https://bugs.webkit.org/show_bug.cgi?id=54326 + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::SyncMessageState::getOrCreate): + Assert that the map has a non-null SyncMessageState object. + + (CoreIPC::Connection::SyncMessageState::SyncMessageState): + Initialize m_waitForSyncReplyCount. + + (CoreIPC::Connection::SyncMessageState::beginWaitForSyncReply): + Increment m_waitForSyncReplyCount. + + (CoreIPC::Connection::SyncMessageState::endWaitForSyncReply): + Decrement m_waitForSyncReplyCount. If it's 0, enqueue any incoming sync messages. + + (CoreIPC::Connection::SyncMessageState::processIncomingMessage): + If this is a message that needs to be dispatched, add it to the queue and wake up the client run loop. + + (CoreIPC::Connection::SyncMessageState::dispatchMessages): + Go through the queue of incoming messages and dispatch them. + + (CoreIPC::Connection::sendSyncMessage): + call beginWaitForSyncReply/endWaitForSyncReply. + + (CoreIPC::Connection::waitForSyncReply): + Dispatch messages. + + (CoreIPC::Connection::processIncomingMessage): + Call SyncMessageState::processIncomingMessage. + + (CoreIPC::Connection::enqueueIncomingMessage): + Add helper function for enqueuing an incoming message. + + * Platform/CoreIPC/Connection.h: + (CoreIPC::Connection::Message::destinationID): + +2011-02-11 Sam Weinig <sam@webkit.org> + + Reviewed by Maciej Stachowiak. + + WebKit2: Going to Ars Technica crashes WebProcess in WebCore::ResourceRequestBase::url() const + 9 + <rdar://problem/8978832> + + Speculative fix for crash accessing a bad ResourceRequest in policy + client code. Remove early returns from dispatchDecidePolicyForMIMEType + and dispatchDecidePolicyForNavigationAction that are not present in the WebKit1 + equivalent code. This should be safe, now that the IPC calls are synchronous. + + Also removes some invalid assertions in WebFrameProxy that were getting hit. It is okay + for the url to empty. + + * UIProcess/WebFrameProxy.cpp: + (WebKit::WebFrameProxy::didReceiveServerRedirectForProvisionalLoad): + (WebKit::WebFrameProxy::didFailProvisionalLoad): + (WebKit::WebFrameProxy::didFailLoad): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): + +2011-02-11 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler and Anders Carlsson. + + https://bugs.webkit.org/show_bug.cgi?id=53593 + <rdar://problem/8948380> Crash beneath HistoryController::recursiveSetProvisionalItem in web + process (preceded by assertion failure) if UI process exits while + Messages::WebPage::RestoreSessionAndNavigateToCurrentItem is being handled + + Can't test exiting the UI process. + + * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage): + * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::Client::didFailToSendSyncMessage): + Notify connection client when the connection fails to send a sync message. + + * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didFailToSendSyncMessage): + * WebProcess/WebProcess.h: + Quit the web process immediately if it tried to send a sync message to a dead UI process. + It never needs to continue and handle an unexpected null "reply". + + * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::didFailToSendSyncMessage): + * PluginProcess/PluginProcess.h: + Ditto. There is no need for a plug-in to keep running even briefly if it couldn't get a + reply to a sync message. + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add a way to send async messages that can't get out of order with sync ones + https://bugs.webkit.org/show_bug.cgi?id=54319 + <rdar://problem/8894844> + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::sendMessage): + sendMessage now takes a messageSendFlags. Update the messageID if the + messageSendFlags contain DispatchMessageEvenWhenWaitingForSyncReply. + + (CoreIPC::Connection::waitForSyncReply): + Process asynchronous messages as well. + + (CoreIPC::Connection::processIncomingMessage): + Check if a message should be dispatched even when we're waiting for a + synchronous reply. + + * Platform/CoreIPC/Connection.h: + (CoreIPC::Connection::send): + Send now takes a messageSendFlags parameter. + + * Platform/CoreIPC/MessageID.h: + (CoreIPC::MessageID::messageIDWithAddedFlags): + Return a new MessageID object with the given flags added. + + (CoreIPC::MessageID::shouldDispatchMessageWhenWaitingForSyncReply): + Add getter. + +2011-02-11 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Crash with dynamic popup menu use + <rdar://problem/8716952> + + Invalidate popup menus when forcing them closed, since they might still be + in their tracking loop. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::showPopupMenu): + (WebKit::WebPageProxy::hidePopupMenu): + * UIProcess/WebPopupMenuProxy.h: + (WebKit::WebPopupMenuProxy::invalidate): + * UIProcess/mac/WebPopupMenuProxyMac.mm: + (WebKit::WebPopupMenuProxyMac::showPopupMenu): + * UIProcess/win/WebPopupMenuProxyWin.cpp: + (WebKit::WebPopupMenuProxyWin::showPopupMenu): + (WebKit::WebPopupMenuProxyWin::setFocusedIndex): + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Actually initialize m_syncMessageState. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::Connection): + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Move the binary semaphore into SyncMessageState + https://bugs.webkit.org/show_bug.cgi?id=54311 + + With this change, all connections that belong to the same run loop will use same binary semaphore. + This is in preparation for making any connection be able to wakeup the client run loop. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::SyncMessageState::wakeUpClientRunLoop): + (CoreIPC::Connection::SyncMessageState::wait): + (CoreIPC::Connection::waitForSyncReply): + (CoreIPC::Connection::processIncomingMessage): + (CoreIPC::Connection::connectionDidClose): + * Platform/CoreIPC/Connection.h: + +2011-02-11 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Add a SyncMessageState class to CoreIPC::Connection + https://bugs.webkit.org/show_bug.cgi?id=54309 + + SyncMessageState objects are shared between all connections scheduled on + a given run loop. It will be used to keep track of state when waiting + for replies for a synchronous message. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::SyncMessageState::syncMessageStateMap): + (CoreIPC::Connection::SyncMessageState::syncMessageStateMapMutex): + Add a global RunLoop -> SyncMessageState map and a mutex for locking. + + (CoreIPC::Connection::SyncMessageState::getOrCreate): + Look in the map for an existing SyncMessageState object and create a new + one if none is found. + + (CoreIPC::Connection::SyncMessageState::SyncMessageState): + Initialize m_runLoop. + + (CoreIPC::Connection::SyncMessageState::~SyncMessageState): + Remove the object from the map. + +2011-02-11 Enrica Casucci <enrica@apple.com> + + Reviewed by Darin Adler. + + crashes in WebProcess at WebCore::Range::startPosition const + 16 + https://bugs.webkit.org/show_bug.cgi?id=54294 + <rdar://problem/8982710> + + I don't have a repro case for this bugs, but the side-by-side + comparison of the IME support implementation in WebKit and WebKi2 + shows a missing null check on a Range that could very well explain + this crash. + I tried running platform/mac/editing/input tests with a version of WebKit + without the null check and I can reproduce a crash with the same signature. + These tests are not yet enabled for WebKit2. + + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::firstRectForCharacterRange): + +2011-02-11 Jeff Miller <jeffm@apple.com> + + Reviewed by Steve Falkenburg. + + Eliminate /DELAYLOAD:msimg32.dll ignored warning when building WebKit project + https://bugs.webkit.org/show_bug.cgi?id=54296 + + * win/WebKit2Common.vsprops: Remove msimg32.dll from the list of DelayLoadDLLs. + +2011-02-11 Chandra Vallala <chandra.vallala@motorola.com> and Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Implement UpdateChunk, ChunkedUpdateDrawingArea/Proxy + classes for WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=54080 + + * GNUmakefile.am: + * Shared/gtk/UpdateChunk.cpp: Added. + (WebKit::UpdateChunk::UpdateChunk): + (WebKit::UpdateChunk::~UpdateChunk): + (WebKit::UpdateChunk::encode): + (WebKit::UpdateChunk::decode): + (WebKit::UpdateChunk::createImage): + * Shared/gtk/UpdateChunk.h: Added. + (WebKit::UpdateChunk::rect): + (WebKit::UpdateChunk::isEmpty): + (WebKit::UpdateChunk::size): + * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: + (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy): + Initialize the surface. + * UIProcess/ChunkedUpdateDrawingAreaProxy.h: + * UIProcess/DrawingAreaProxy.h: Added cairo variables. + * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Added. + (WebKit::ChunkedUpdateDrawingAreaProxy::page): + (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore): + (WebKit::ChunkedUpdateDrawingAreaProxy::invalidateBackingStore): + (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): + (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): + * WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp: Added. + (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk): + +2011-02-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Repro crash with Sony Google TV ad at Gizmodo + https://bugs.webkit.org/show_bug.cgi?id=54150 + <rdar://problem/8782346> + + Re-landing this fix, bug without the test case, since it causes hangs on the bots. + https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding back the test. + + Since PluginView::evaluate can cause the plug-in element to go away, we need to protect it. + + * WebProcess/Plugins/PluginView.cpp: + (WebKit::PluginView::~PluginView): + Null out m_pluginElement here so we'll catch crashes earlier. + + (WebKit::PluginView::evaluate): + Add a plug-in protector. + +2011-02-10 Alice Liu <alice.liu@apple.com> + + Reviewed by Enrica Casucci and Adele Peterson. + + WebKit2 pages gobble up cmd-I as an editing command in some cases where it shouldn't + https://bugs.webkit.org/show_bug.cgi?id=54254 + + * UIProcess/API/mac/WKView.mm: + (-[WKView _handleStyleKeyEquivalent:]): + Return early if we're not in an editable region. + +2011-02-10 Andreas Kling <kling@webkit.org> + + Unreviewed Qt build fix. + + waitFor() -> deprecatedWaitFor() + + * UIProcess/TiledDrawingAreaProxy.cpp: + (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete): + +2011-02-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Move code to dispatch an incoming message out into a new function + https://bugs.webkit.org/show_bug.cgi?id=54239 + + This also fixes a leak where we wouldn't free ArgumentDecoder objects + after a connection has been invalidated. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::dispatchMessage): + (CoreIPC::Connection::dispatchMessages): + * Platform/CoreIPC/Connection.h: + +2011-02-10 Anders Carlsson <andersca@apple.com> + + Try again to fix the Qt build. + + * UIProcess/TiledDrawingAreaProxy.cpp: + (WebKit::TiledDrawingAreaProxy::sizeDidChange): + (WebKit::TiledDrawingAreaProxy::setPageIsVisible): + (WebKit::TiledDrawingAreaProxy::takeSnapshot): + (WebKit::TiledDrawingAreaProxy::removeTile): + +2011-02-10 Anders Carlsson <andersca@apple.com> + + Attempt to fix the Qt build. + + * UIProcess/TiledDrawingAreaProxy.cpp: + (WebKit::TiledDrawingAreaProxy::sizeDidChange): + (WebKit::TiledDrawingAreaProxy::setPageIsVisible): + (WebKit::TiledDrawingAreaProxy::requestTileUpdate): + (WebKit::TiledDrawingAreaProxy::takeSnapshot): + (WebKit::TiledDrawingAreaProxy::removeTile): + * WebProcess/WebPage/TiledDrawingArea.cpp: + (WebKit::TiledDrawingArea::display): + (WebKit::TiledDrawingArea::setSize): + (WebKit::TiledDrawingArea::updateTile): + (WebKit::TiledDrawingArea::tileUpdateTimerFired): + (WebKit::TiledDrawingArea::didReceiveMessage): + +2011-02-10 Adam Roben <aroben@apple.com> + + Handle a null FindIndicator correctly + + We are passed a null FindIndicator when the find indicator becomes hidden. + + Fixes <http://webkit.org/b/54213> <rdar://problem/8983261> REGRESSION (r78198): Crash in + FindIndicator::contentImage when scrolling page + + Reviewed by Steve Falkenburg. + + * Platform/win/SharedMemoryWin.cpp: + (WebKit::SharedMemory::Handle::isNull): Implemented. + (WebKit::SharedMemory::create): Bail out if the handle is null, just like Mac does. + Otherwise assert that ::MapViewOfFile succeeded. This doesn't fix the bug, but should help + catch other errors. + + * UIProcess/win/WebView.cpp: + (WebKit::WebView::setFindIndicator): Null-check the FindIndicator before dereferencing it. + Also changed the function to store the FindIndicator in a RefPtr. + +2011-02-10 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add 'deprecated' to the deprecated CoreIPC functions + https://bugs.webkit.org/show_bug.cgi?id=54223 + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::sendMessage): + * Platform/CoreIPC/Connection.h: + (CoreIPC::Connection::send): + (CoreIPC::Connection::deprecatedSendSync): + (CoreIPC::Connection::deprecatedSend): + (CoreIPC::Connection::deprecatedWaitFor): + * Platform/CoreIPC/mac/ConnectionMac.cpp: + (CoreIPC::Connection::open): + * PluginProcess/PluginProcess.cpp: + * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: + (WebKit::ChunkedUpdateDrawingAreaProxy::paint): + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::createWebProcessConnection): + * WebProcess/InjectedBundle/InjectedBundle.cpp: + (WebKit::InjectedBundle::postMessage): + (WebKit::InjectedBundle::postSynchronousMessage): + * WebProcess/Plugins/PluginProcessConnectionManager.cpp: + (WebKit::PluginProcessConnectionManager::getPluginProcessConnection): + * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: + (WebKit::ChunkedUpdateDrawingArea::display): + (WebKit::ChunkedUpdateDrawingArea::setSize): + * WebProcess/WebPage/LayerBackedDrawingArea.cpp: + (WebKit::LayerBackedDrawingArea::setSize): + * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: + (WebKit::LayerBackedDrawingArea::attachCompositingContext): + +2011-02-10 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Window resizer does not have a border when there are scrollbars in WebKit2 windows + <rdar://problem/8488476> + https://bugs.webkit.org/show_bug.cgi?id=54222 + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame): + * UIProcess/API/mac/WKView.mm: + (-[WKView _updateGrowBoxForWindowFrameChange]): + (-[WKView _didChangeScrollbarsForMainFrame]): + * UIProcess/API/mac/WKViewInternal.h: + * UIProcess/API/qt/qwkpage_p.h: + (QWKPagePrivate::didChangeScrollbarsForMainFrame): + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame): + * UIProcess/win/WebView.cpp: + (WebKit::WebView::didChangeScrollbarsForMainFrame): + * UIProcess/win/WebView.h: + +2011-02-10 Ivan Krstić <ike@apple.com> + + Reviewed by Adam Roben. + + Rename remaining instances of _HOME sandbox parameter. + <rdar://problem/8983428> + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-10 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Anders Carlsson. + + AX: AX needs to stop using WebCoreViewFactory + https://bugs.webkit.org/show_bug.cgi?id=54153 + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-02-10 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Sandbox violations trying to read crypto preferences. + <rdar://problem/8981151> + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-10 Peter Varga <pvarga@webkit.org> + + Reviewed by Csaba Osztrogonác. + + Remove PCRE source from trunk + https://bugs.webkit.org/show_bug.cgi?id=54188 + + * WebKit2.pro: + +2011-02-09 Adam Roben <aroben@apple.com> + + Turn on the new drawing area on Windows + + Fixes <http://webkit.org/b/53805> <rdar://problem/8960666> WebKit2 on Windows should use + DrawingAreaProxyImpl + + Reviewed by Darin Adler. + + * UIProcess/win/WebView.cpp: + (WebKit::useNewDrawingArea): Return true! + +2011-02-09 Adam Roben <aroben@apple.com> + + Hook up WM_PRINT to the new drawing area + + Fixes <http://webkit.org/b/54145> <rdar://problem/8979559> WM_PRINT doesn't work with new + drawing area (assertion failure in DrawingAreaProxyImpl in Debug builds) + + Reviewed by Darin Adler. + + * UIProcess/win/WebView.cpp: + (WebKit::WebView::paint): Added. Code came from onPaintEvent. + + (WebKit::WebView::onPaintEvent): + (WebKit::WebView::onPrintClientEvent): + Changed to call paint. + + * UIProcess/win/WebView.h: Added paint. Also separated message handler functions into their + own paragraph. + +2011-02-09 Adam Roben <aroben@apple.com> + + Notice when the backing store goes away after DidSetSize + + Fixes <http://webkit.org/b/54142> <rdar://problem/8979365> Crash in + DrawingAreaProxyImpl::paint when WKView paints after being resized while hidden + + Reviewed by Darin Adler. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::paint): Null-check m_backingStore after waiting for + DidSetSize, as m_backingStore can go away when we receive that message. This is the bug fix. + Also moved the accelerated compositing check inside the block where we wait for DidSetSize. + If we didn't wait for DidSetSize, we already know that we're not in accelerated compositing + mode (and asserted so earlier in this function). + +2011-02-09 Adam Roben <aroben@apple.com> + + Decode a null SharedMemory::Handle correctly on Windows + + Fixes <http://webkit.org/b/54141> <rdar://problem/8979195> WKView draws at wrong size, + performs badly if is resized while hidden (assertion fails in + BackingStore::incorporateUpdate in Debug builds) + + Reviewed by Darin Adler. + + * Platform/win/SharedMemoryWin.cpp: + (WebKit::getDuplicatedHandle): Added. Code came from decode. The only changes were to + null-check sourceHandle (this is the bug fix) and to assert when ::DuplicateHandle fails + (which would have caught the bug earlier). + (WebKit::SharedMemory::Handle::decode): Changed to use getDuplicatedHandle. + +2011-02-09 Adam Roben <aroben@apple.com> + + Don't invalidate outside of the WebPage's bounds + + Fixes <http://webkit.org/b/54123> <rdar://problem/8978383> Assertion failure in + BackingStore::BackingStore if a new WebPage becomes active before receiving a size + + Reviewed by Darin Adler. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setNeedsDisplay): Intersect the dirty rect with our bounds before + doing anything else. + (WebKit::DrawingAreaImpl::display): Added an assertion to help catch the bad case a little + earlier. + +2011-02-10 Eric Seidel <eric@webkit.org> + + Unreviewed, rolling out r78157. + http://trac.webkit.org/changeset/78157 + https://bugs.webkit.org/show_bug.cgi?id=54150 + + Fails on a bunch of bots + + * WebProcess/Plugins/PluginView.cpp: + (WebKit::PluginView::~PluginView): + (WebKit::PluginView::evaluate): + +2011-02-09 Brian Weinstein <bweinstein@apple.com> + + Rubber-stamped by Sam Weinig. + + Fix a typo in WebSecurityOrigin::protocol. + + * Shared/WebSecurityOrigin.h: + (WebKit::WebSecurityOrigin::protocol): This should return the protocol, not the domain. + +2011-02-09 Sam Weinig <sam@webkit.org> + + Reviewed by Darin Adler. + + File uploads do not work within the sandbox + <rdar://problem/8950518> + https://bugs.webkit.org/show_bug.cgi?id=54154 + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didChooseFilesForOpenPanel): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::extendSandboxForFileFromOpenPanel): + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + +2011-02-09 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=54148 + <rdar://problem/8973887> REGRESSION (WebKit2): Opening two print dialogs causes havoc + + * UIProcess/API/mac/WKPrintingView.h: Moved _isForcingPreviewUpdate into a static variable, + because dispatching a notification affects all WKPrintingViews at once. + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView _updatePreview]): Updated for new variable name. + (-[WKPrintingView knowsPageRange:]): Don't break if the method is called twice in a row + (we already had this logic when printing from separate thread, but not for preview). + (-[WKPrintingView drawRect:]): Changed all LOG messages to have view object address for + easier matching. + (-[WKPrintingView rectForPage:]): Ditto. + (-[WKPrintingView beginDocument]): Ditto. + (-[WKPrintingView endDocument]): Ditto. + +2011-02-09 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Repro crash with Sony Google TV ad at Gizmodo + https://bugs.webkit.org/show_bug.cgi?id=54150 + + Since PluginView::evaluate can cause the plug-in element to go away, we need to protect it. + + * WebProcess/Plugins/PluginView.cpp: + (WebKit::PluginView::~PluginView): + Null out m_pluginElement here so we'll catch crashes earlier. + + (WebKit::PluginView::evaluate): + Add a plug-in protector. + +2011-02-09 Sam Weinig <sam@webkit.org> + + Reviewed by Maciej Stachowiak. + + Google Maps says it has horizontal scrollbars when it doesn't + <rdar://problem/8978005> + + We were updating the main frame's scrollbar state for changes to + frames other than the main frame. + + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::contentsSizeChanged): + * WebProcess/WebCoreSupport/WebChromeClient.h: + (WebKit::WebChromeClient::WebChromeClient): + Change to bail out early if we are not looking at the main frame. Also + fix some silly typos and rename the variables to be more specific. + +2011-02-09 Ivan Krstić <ike@apple.com> + + Reviewed by Sam Weinig. + + Allow read-only access to mouse preferences from sandboxed WebProcess. + <rdar://problem/8975279> + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-09 Steve Falkenburg <sfalken@apple.com> + + Build fix. + + * win/MainWin.cpp: + (wWinMain): + +2011-02-09 Amruth Raj <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com> + + Reviewed by Martin Robinson. + + [GTK] Implement Module class for WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=48510 + + * GNUmakefile.am: + * Platform/Module.h: Added GModule handle for GTK port. + * Platform/gtk/ModuleGtk.cpp: Initial code using GModule calls. + (WebKit::Module::load): + (WebKit::Module::unload): + (WebKit::Module::platformFunctionPointer): + +2011-02-09 Chandra Vallala <chandra.vallala@motorola.com> and Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Implement WKBaseGtk API for Webkit2 + https://bugs.webkit.org/show_bug.cgi?id=54081 + + * GNUmakefile.am: Added new files to compilation. + * Shared/API/c/WKBase.h: Included WKBaseGtk.h in this file. + * Shared/API/c/gtk: Added. + * Shared/API/c/gtk/WKBaseGtk.h: Added. Declaration of WKViewRef + for GTK port. + * UIProcess/API/C/WKAPICast.h: Included WKAPICastGtk.h in this + file. + * UIProcess/API/C/gtk: Added. + * UIProcess/API/C/gtk/WKAPICastGtk.h: Added. Type definition + template for WKViewRef to WebView and vice-versa. + * UIProcess/API/C/gtk/WKView.cpp: Added. Implementation of WKView + API interface. + (WKViewCreate): + (WKViewGetWindow): + (WKViewGetPage): + (WKURLCreateWithURL): + * UIProcess/API/C/gtk/WKView.h: Added. Declaration of WKView API + interface. + +2011-02-09 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Add WebGraphicsContext stub to the compilation + https://bugs.webkit.org/show_bug.cgi?id=54078 + + * GNUmakefile.am: + * Shared/API/c/gtk/WKGraphicsContextGtk.cpp: Added stub just for + compilation. + (WKGraphicsContextGetGtkContext): + * Shared/API/c/gtk/WKGraphicsContextGtk.h: Added stub just for + compilation. + * Shared/WebGraphicsContext.cpp: + (WebKit::WebGraphicsContext::WebGraphicsContext): + * Shared/WebGraphicsContext.h: + (WebKit::WebGraphicsContext::platformContext): + +2011-02-09 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Add geolocation support to the webkit2 compilation + https://bugs.webkit.org/show_bug.cgi?id=54077 + + Add Geolocation files to the GTK compilation. + + * GNUmakefile.am: + +2011-02-09 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt][WK2] Don't generate superfluous forwarding header for config.h. + + * Scripts/generate-forwarding-headers.pl: + +2011-02-09 Adam Roben <aroben@apple.com> + + Hide the ugly details of WebView::m_window initialization from WebPageProxy, and make it + less ugly + + WebView::WebView was initially creating a hidden window, then showing it. It would tell + WebPageProxy about the window while it was still hidden, and then have to inform + WebPageProxy that the window had become shown. This resulted in WebPageProxy sending + unnecessary messages to the web process, and confused code that assumed that the window + would be in the same state after WebView's constructor exited as it was when WebPageProxy + first found out about the window. + + We now don't hide the window when creating it, which simplifies the code, and only tell + WebPageProxy about the window after we're done modifying it, which fixes the bug. + + Fixes <http://webkit.org/b/53878> <rdar://problem/8977306> Assertion failure in + DrawingAreaImpl::resumePainting after window.open or when opening Web Inspector + + Reviewed by Anders Carlsson. + + * UIProcess/win/WebView.cpp: + (WebKit::WebView::WebView): Changed ::CreateWindowEx to ::CreateWindowExW, to match other + Win32 API calls in WebKit2. Pass WS_VISIBLE to ::CreateWindowExW rather than waiting until + later to show the window. Added an assertion that m_isVisible matches the window's visible + state. Don't even create our WebPageProxy, or tell it about our window, until we're done + initializing our window, so that it doesn't get informed about our window's internal state + changes that happen beneath ::CreateWindowExW. + (WebKit::WebView::onSizeEvent): Null-check m_page since we can receive this message beneath + ::CreateWindowExW. + (WebKit::WebView::onShowWindowEvent): Ditto. Replaced one FIXME with another. Always set + handled to false so that ::DefWindowProcW can do its thing. (MSDN says this is when it + actually shows/hides the window, though I couldn't find any consequences of not calling + ::DefWindowProcW here.) + +2011-02-09 Pavel Feldman <pfeldman@chromium.org> + + Reviewed by Yury Semikhatsky. + + Web Inspector: follow up on InspectorAgent split - + removing unnecessary methods from InspectorController. + https://bugs.webkit.org/show_bug.cgi?id=54093 + + * WebProcess/WebPage/WebInspector.cpp: + (WebKit::WebInspector::showConsole): + (WebKit::WebInspector::stopJavaScriptProfiling): + +2011-02-09 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Avoid WebProcessMain compilation, we are used a gtk specific main + https://bugs.webkit.org/show_bug.cgi?id=54015 + + Avoided the compilation of the general WebProcessMain, and added + soup initialization to WebProcessMainGtk.cpp. + + * GNUmakefile.am: + * WebProcess/gtk/WebProcessMainGtk.cpp: + (WebKit::WebProcessMainGtk): + +2011-02-08 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Incorrect assertion in WorkQueueGtk, we need to register + more than one handle + https://bugs.webkit.org/show_bug.cgi?id=54014 + + Fixed assertion condition we need to register more than one + handler for the same file descriptor. + + * Platform/gtk/WorkQueueGtk.cpp: + (WorkQueue::registerEventSourceHandler): + +2011-02-08 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + Fix typo in the include guards name in ChunkedUpdateDrawingAreaProxy.h + https://bugs.webkit.org/show_bug.cgi?id=54013 + + * UIProcess/ChunkedUpdateDrawingAreaProxy.h: + +2011-02-08 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [GTK] Fix after r77874, m_isConnected is initialized before the + socket is opened + https://bugs.webkit.org/show_bug.cgi?id=54011 + + Fixed connection breakage after r77874, we have to wait until open + the socket to open the connection. + + * Platform/CoreIPC/gtk/ConnectionGtk.cpp: + (CoreIPC::Connection::platformInitialize): + (CoreIPC::Connection::open): + +2011-02-08 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + [WK2] LayerTreeContext is used outside the ACCELERATED_COMPOSITING + guards but not defined in DrawingAreaProxy.h + https://bugs.webkit.org/show_bug.cgi?id=54009 + + Removed the guards in the forward declaration, this will fail if + the class is finally used in the function, but it works for the + moment. + + * UIProcess/DrawingAreaProxy.h: + +2011-02-08 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Martin Robinson. + + WebKit2 GTK Fails to Build #include nested too deeply + https://bugs.webkit.org/show_bug.cgi?id=52219 + + * GNUmakefile.am: Removed the commands to create the directories + for the forwarding headers, the script already does it for us. + * config.h: Removed the config.h inclusion and added the + autotoolsconfig.h directly, also added a condition to share the + defines with QT. + +2011-02-08 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Mark Rowe. + + Crash when going back/forward when back/forward list is in a bad state. + https://bugs.webkit.org/show_bug.cgi?id=54059 + <rdar://problem/8975244> + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::goForward): Add a null check. + (WebKit::WebPageProxy::goBack): ditto + +2011-02-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Beth Dakin. + + Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyImpl::incorporateUpdate() + https://bugs.webkit.org/show_bug.cgi?id=54046 + <rdar://problem/8973960> + + DrawingAreaImpl::setRootCompositingLayer can be called with a new layer even when already + in accelerated compositing mode. Similarly, it can be called with a null layer even when not + in accelerated compositing mode. Make the drawing area and layer tree host handle both these cases. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + Only call enterAcceleratedCompositingMode if there is no layer tree host, otherwise + just call LayerTreeHost::setRootCompositingLayer. + + (WebKit::DrawingAreaImpl::setSize): + Add an assert. + + (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): + Assert that we don't have a layer tree host. + + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + Assert that we do have a layer tree host. + + (WebKit::DrawingAreaImpl::display): + If the call to display caused the page to enter accelerated compositing mode, we don't + want to send back an Update message. + + * WebProcess/WebPage/LayerTreeHost.cpp: + (WebKit::LayerTreeHost::create): + * WebProcess/WebPage/LayerTreeHost.h: + Create no longer takes a graphics layer. + + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::create): + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + Create no longer takes a graphics layer. + + (WebKit::LayerTreeHostMac::setRootCompositingLayer): + Set the new root compositing layer. + +2011-02-08 Adam Roben <aroben@apple.com> + + Implement WorkQueue::scheduleWorkAfterDelay on Windows + + Each WorkQueue now owns its own timer queue. When scheduleWorkAfterDelay is called, we + create a timer-queue timer with the given delay. When the timer fires, we schedule the work + on the queue and clean up the timer. + + Fixes <http://webkit.org/b/54040> <rdar://problem/8974230> Web process sticks around forever + if it's hung when UI process goes away + + Reviewed by Anders Carlsson. + + * Platform/WorkQueue.h: Added timerCallback and m_timerQueue. + + * Platform/win/WorkQueueWin.cpp: + (WorkQueue::platformInitialize): Initialize m_timerQueue. + (WorkQueue::platformInvalidate): Clean up m_timerQueue. + (TimerContext::TimerContext): Added this helper object to hold the context needed by the + timer callback. + (WorkQueue::timerCallback): Added. Schedules the WorkItem on the WorkQueue and cleans up the + timer. + (WorkQueue::scheduleWorkAfterDelay): Create a timer-queue timer on our timer queue that will + fire after the given delay. Pass a new TimerContext object to the timer callback that + contains the information it needs. + +2011-02-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Rename PluginProcess::initializeConnection to PluginProcess::initialize + https://bugs.webkit.org/show_bug.cgi?id=54039 + + * PluginProcess/PluginProcess.cpp: + (WebKit::PluginProcess::initialize): + * PluginProcess/PluginProcess.h: + * PluginProcess/mac/PluginProcessMainMac.mm: + (WebKit::PluginProcessMain): + * WebProcess/WebProcess.h: + +2011-02-08 Brady Eidson <beidson@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/8972913> and https://bugs.webkit.org/show_bug.cgi?id=54036 + didChangeBackForwardList should include some context about what changed + + Update the implementation of this API to include the new item (if any) and removed items (if any): + * UIProcess/API/C/WKPage.h: + * UIProcess/WebLoaderClient.cpp: + (WebKit::WebLoaderClient::didChangeBackForwardList): + * UIProcess/WebLoaderClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didChangeBackForwardList): + * UIProcess/WebPageProxy.h: + + Have WebBackForwardList pass the new items and/or removed items when calling the notifier: + * UIProcess/WebBackForwardList.cpp: + (WebKit::WebBackForwardList::addItem): + (WebKit::WebBackForwardList::goToItem): + (WebKit::WebBackForwardList::clear): + +2011-02-08 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Sandbox violations visiting MobileMe. + <rdar://problem/8961330> + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Rename PluginProcess::initialize to PluginProcess::initializePluginProcess + https://bugs.webkit.org/show_bug.cgi?id=54037 + + Rename PluginProcess::initialize to PluginProcess::initializePluginProcess to better + match the WebProcess initialization code, in preparation of sharing more code. + + * PluginProcess/PluginProcess.cpp: + (WebKit::PluginProcess::initializePluginProcess): + * PluginProcess/PluginProcess.h: + * PluginProcess/PluginProcess.messages.in: + * UIProcess/Plugins/PluginProcessProxy.cpp: + (WebKit::PluginProcessProxy::didFinishLaunching): + +2011-02-08 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + WK2: Add ability to pass context to policy delegate methods + https://bugs.webkit.org/show_bug.cgi?id=54031 + + * Platform/CoreIPC/HandleMessage.h: + (CoreIPC::callMemberFunction): + (CoreIPC::handleMessageVariadic): + * Scripts/webkit2/messages.py: + Add ability to pass variadic messages to sync messages. + + * Shared/API/c/WKBase.h: + * Shared/APIObject.h: + Add WKBundleNavigation type. + + * UIProcess/API/C/WKPage.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::decidePolicyForNavigationAction): + (WebKit::WebPageProxy::decidePolicyForNewWindowAction): + (WebKit::WebPageProxy::decidePolicyForMIMEType): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/WebPolicyClient.cpp: + (WebKit::WebPolicyClient::decidePolicyForNavigationAction): + (WebKit::WebPolicyClient::decidePolicyForNewWindowAction): + (WebKit::WebPolicyClient::decidePolicyForMIMEType): + * UIProcess/WebPolicyClient.h: + Update policy client for new data. + + * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: + * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: Added. + (WKBundleNavigationActionGetTypeID): + (WKBundleNavigationActionGetNavigationType): + (WKBundleNavigationActionGetEventModifiers): + (WKBundleNavigationActionGetEventMouseButton): + (WKBundleNavigationActionCopyHitTestResult): + (WKBundleNavigationActionCopyFormElement): + * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.h: Added. + * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: + (WKBundlePageSetPolicyClient): + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: Added. + (WebKit::mouseEventForNavigationAction): + (WebKit::mouseButtonForMouseEvent): + (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction): + (WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction): + (WebKit::InjectedBundleNavigationAction::create): + (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): + * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: Added. + (WebKit::InjectedBundleNavigationAction::navigationType): + (WebKit::InjectedBundleNavigationAction::modifiers): + (WebKit::InjectedBundleNavigationAction::mouseButton): + (WebKit::InjectedBundleNavigationAction::hitTestResult): + (WebKit::InjectedBundleNavigationAction::formElement): + (WebKit::InjectedBundleNavigationAction::type): + * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: Added. + (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction): + (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction): + (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType): + * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: Added. + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::createWindow): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::initializeInjectedBundlePolicyClient): + * WebProcess/WebPage/WebPage.h: + (WebKit::WebPage::injectedBundlePolicyClient): + Pipe the policy client through the bundle to allow setting user data. + + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + * win/WebKit2Generated.make: + Add new files. + +2011-02-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Crash calling -setFrame:andScrollBy: in windowDidResize + https://bugs.webkit.org/show_bug.cgi?id=54030 + <rdar://problem/8969760> + + * Platform/mac/SharedMemoryMac.cpp: + (WebKit::SharedMemory::create): + Assert that size is not zero here; we never want to try to create shared memory with a zero size. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setSize): + Always invalidate the entire visible page when resizing. + +2011-02-08 Adam Barth <abarth@webkit.org> + + Reviewed by Eric Seidel. + + Remove orphan code from old parser + https://bugs.webkit.org/show_bug.cgi?id=53984 + + * WebProcess/WebCoreSupport/WebChromeClient.cpp + * WebProcess/WebCoreSupport/WebChromeClient.h + +2011-02-08 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + UI process crashes if web process crashes while web inspector is focused + https://bugs.webkit.org/show_bug.cgi?id=53965 + <rdar://problem/8961633> + + Make sure to close the web inspector web page proxy before calling platformClose, since + platformClose can cause the web page proxy to try to send messages (such as SetActive) + to the web process while it's in a bad state. + + The original fix, http://trac.webkit.org/changeset/77866, put the call to m_page->close() in + WebInspectorProxy::didClose, which was wrong and lead to crashes. The right place to close the page + is in WebInspectorProxy::invalidate. + + * UIProcess/WebInspectorProxy.cpp: + (WebKit::WebInspectorProxy::invalidate): + +2011-02-08 Jessie Berlin <jberlin@apple.com> + + Reviewed by Adam Roben. + + ASSERTION FAILURE: ASSERT_NOT_REACHED() in Connection::writeEventHandler() after the Web + Process crashes. + https://bugs.webkit.org/show_bug.cgi?id=54005 + + * Platform/CoreIPC/win/ConnectionWin.cpp: + (CoreIPC::Connection::writeEventHandler): + Handle ERROR_BROKEN_PIPE by calling connectionDidClose() and returning early. + +2011-02-08 Adam Roben <aroben@apple.com> + + Handle WM_TIMER messages for stopped timers + + Whenever we stop a timer, we call ::KillTimer to cancel any future firings of the timer. But + ::KillTimer doesn't do anything about WM_TIMER messages that have already been posted to the + message queue. We need to handle those, too. + + Fixes <http://webkit.org/b/53999> Occasional assertion failures in + RunLoop::TimerBase::timerFired + + Reviewed by Darin Adler. + + * Platform/win/RunLoopWin.cpp: + (RunLoop::TimerBase::timerFired): Just bail if the timer has already been stopped. + +2011-02-08 Adam Roben <aroben@apple.com> + + Don't mark a Connection as connected until open() is called on Windows + + This matches Mac. Even though the Connection's pipe is connected before open() is called, + the Connection itself isn't really connected to the pipe until then, and we won't actually + read any data from before that point. + + Fixes <http://webkit.org/b/53998> <rdar://problem/8971207> REGRESSION (r77874): Assertion + failure on launch in Connection::setDidCloseOnConnectionWorkQueueCallback on Windows + + Reviewed by Darin Adler. + + * Platform/CoreIPC/win/ConnectionWin.cpp: + (CoreIPC::Connection::platformInitialize): Moved code to set m_isConnected from here to + open. + (CoreIPC::Connection::platformInvalidate): Unset m_isConnected, to match Mac. (This isn't + part of the bug fix, but seemed worthwhile.) + (CoreIPC::Connection::open): Set m_isConnected now that we're going to listen on the pipe. + +2011-02-08 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r77866. + http://trac.webkit.org/changeset/77866 + https://bugs.webkit.org/show_bug.cgi?id=53981 + + caused all WebKit2 inspector tests to crash (Requested by + othermaciej on #webkit). + + * UIProcess/WebInspectorProxy.cpp: + (WebKit::WebInspectorProxy::didClose): + +2011-02-07 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Dan Bernstein. + + Add resource load client for injected bundle and move willSendRequest there + https://bugs.webkit.org/show_bug.cgi?id=53972 + + * GNUmakefile.am: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: + (WKBundlePageSetPageLoaderClient): + (WKBundlePageSetResourceLoadClient): + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: + * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: + * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: Added. + (WebKit::InjectedBundlePageResourceLoadClient::didInitiateLoadForResource): + (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): + (WebKit::InjectedBundlePageResourceLoadClient::didReceiveResponseForResource): + (WebKit::InjectedBundlePageResourceLoadClient::didReceiveContentLengthForResource): + (WebKit::InjectedBundlePageResourceLoadClient::didFinishLoadForResource): + (WebKit::InjectedBundlePageResourceLoadClient::didFailLoadForResource): + * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h: Added. + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): + (WebKit::WebFrameLoaderClient::dispatchWillSendRequest): + (WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse): + (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength): + (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading): + (WebKit::WebFrameLoaderClient::dispatchDidFailLoading): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::initializeInjectedBundleResourceLoadClient): + * WebProcess/WebPage/WebPage.h: + (WebKit::WebPage::injectedBundleResourceLoadClient): + * win/WebKit2.vcproj: + +2011-02-07 Mark Rowe <mrowe@apple.com> + + Fix the 32-bit build. + + * UIProcess/cf/WebBackForwardListCF.cpp: + (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Add some casts + to prevent warnings about mixing signed and unsigned comparisons. + +2011-02-07 Qi Zhang <qi.2.zhang@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl + https://bugs.webkit.org/show_bug.cgi?id=52974 + + Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific. + + * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: + (WebKit::WebPlatformStrategies::contextMenuItemTagCopyImageUrlToClipboard): + * WebProcess/WebCoreSupport/WebPlatformStrategies.h: + +2011-02-07 Enrica Casucci <enrica@apple.com> + + Reviewed by Sam Weinig. + + Fixing a build break on Mac caused by http://trac.webkit.org/changeset/77874 + + Removed unused static function. + + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + <rdar://problem/8969888> + The WebProcess should set LSFileQuarantineEnabled to true + + * WebProcess/Info.plist: + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Crash in web process after the connection had been closed + https://bugs.webkit.org/show_bug.cgi?id=51115 + <rdar://problem/8964255> + + Remove didCloseOnConnectionWorkQueue from Connection::Client and add + Connection::setDidCloseOnConnectionWorkQueueCallback which takes a static + function, eliminating the race condition in connectionDidClose where m_client could be + nulled out in the client thread right before we try to dereference it. + + * Platform/CoreIPC/Connection.cpp: + (CoreIPC::Connection::Connection): + Initialize m_didCloseOnConnectionWorkQueueCallback. + + (CoreIPC::Connection::setDidCloseOnConnectionWorkQueueCallback): + Update m_didCloseOnConnectionWorkQueueCallback. + + (CoreIPC::Connection::connectionDidClose): + Call m_didCloseOnConnectionWorkQueueCallback. + + * Platform/WorkQueue.h: + Make WorkQueue noncopyable. + + * PluginProcess/PluginProcess.cpp: + (WebKit::PluginProcess::initializeConnection): + Call setDidCloseOnConnectionWorkQueueCallback. + + * Shared/ChildProcess.cpp: + (WebKit::ChildProcess::didCloseOnConnectionWorkQueue): + * Shared/ChildProcess.h: + didCloseOnConnectionWorkQueue is now a static member function. + + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::initialize): + Call setDidCloseOnConnectionWorkQueueCallback. + +2011-02-07 Enrica Casucci <enrica@apple.com> + + Reviewed Adam Roben and Darin Adler. + + WebKit2: drag and drop support on Windows. + https://bugs.webkit.org/show_bug.cgi?id=52775 + <rdar://problem/8514409> + + This patch contains the remaining work to support + a WebKit window as drag source on Windows. + I've added the code to generate the image for dragging a link as + well as the steps necessary to package the HBITMAP into a SharedMemory + object and send it over to the UI process where DoDragDrop is performed. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setDragImage): + (WebKit::WebPageProxy::startDragDrop): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * WebProcess/WebCoreSupport/WebDragClient.cpp: + (WebKit::WebDragClient::startDrag): Made startDrag for + platforms other than Windows and Mac. + * WebProcess/WebCoreSupport/WebDragClient.h: + * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: + (WebKit::WebDragClient::startDrag): + * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Added. + (WebKit::draggingSourceOperationMaskToDragCursors): + (WebKit::WebDragClient::startDrag): + * WebProcess/WebCoreSupport/win/WebDragSource.cpp: Added. + This object implements the IDropSource interface. + (WebDragSource::createInstance): + (WebDragSource::WebDragSource): + (WebDragSource::QueryInterface): + (WebDragSource::AddRef): + (WebDragSource::Release): + (WebDragSource::QueryContinueDrag): + (WebDragSource::GiveFeedback): + * WebProcess/WebCoreSupport/win/WebDragSource.h: Added. + * win/WebKit2.vcproj: + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + UI process crashes if web process crashes while web inspector is focused + https://bugs.webkit.org/show_bug.cgi?id=53965 + <rdar://problem/8961633> + + Make sure to close the web inspector web page proxy before calling platformClose, since + platformClose can cause the web page proxy to try to send messages (such as SetActive) + to the web process while it's in a bad state. + + * UIProcess/WebInspectorProxy.cpp: + (WebKit::WebInspectorProxy::didClose): + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Find bouncy is missing content on pages with framesets + https://bugs.webkit.org/show_bug.cgi?id=53958 + <rdar://problem/8904447> + + Fix paint rect computation; FrameView::paint expects the paint rect to be in the + parent widget's coordinate system. + + * WebProcess/WebPage/FindController.cpp: + (WebKit::FindController::updateFindIndicator): + +2011-02-07 Brady Eidson <beidson@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/8960434> and https://bugs.webkit.org/show_bug.cgi?id=53957 + Crash after incorrectly restoring bogus session state. + + In some cases we're writing an invalid session state for a back/forward list where the current entry is 0 + but the number of entries is also 0. + In such cases the current entry should be "NoCurrentEntryIndex." + + When we later read this state in, we set ourselves up to crash later. + + Amusingly an ASSERT caught this, but we should've rejected it before the ASSERT fired. + + * UIProcess/cf/WebBackForwardListCF.cpp: + (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fail the restore if the "current index past the end + of the list" case occurs, and speculatively bail out of the case where we have no current index but do have a list. + Also remove the unhelpful ASSERT. + +2011-02-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Add bundle API to get the background color of a frame + <rdar://problem/8962670> + https://bugs.webkit.org/show_bug.cgi?id=53952 + + * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: + (WKBundleFrameGetBodyBackgroundColor): + * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: + Add API function. + + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::getDocumentBackgroundColor): + * WebProcess/WebPage/WebFrame.h: + Call down into the document to get either the body's, or if there is no body, + the root element's, background color. + +2011-02-07 Sam Weinig <sam@webkit.org> + + Fix typo. vectical -> vertical. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame): + +2011-02-07 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Inform the UIProcess when main frame scrollbars change + <rdar://problem/8967496> + https://bugs.webkit.org/show_bug.cgi?id=53941 + + * UIProcess/API/C/WKPage.cpp: + (WKPageHasHorizontalScrollbar): + (WKPageHasVerticalScrollbar): + * UIProcess/API/C/WKPage.h: + Add API to query whether the main frame has scrollbars. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::WebPageProxy): + (WebKit::WebPageProxy::close): + (WebKit::WebPageProxy::processDidCrash): + (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame): + * UIProcess/WebPageProxy.h: + (WebKit::WebPageProxy::hasHorizontalScrollbar): + (WebKit::WebPageProxy::hasVerticalScrollbar): + Store/update main frame scrollbar state. + + * UIProcess/WebPageProxy.messages.in: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::contentsSizeChanged): + * WebProcess/WebCoreSupport/WebChromeClient.h: + (WebKit::WebChromeClient::WebChromeClient): + Post message when main frame scrollbar state changes. + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Some content is not covered by Find-on-page overlay + https://bugs.webkit.org/show_bug.cgi?id=53937 + <rdar://problem/8711353> + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::didInstallPageOverlay): + Call LayerTreeHost::didInstallPageOverlay. + + (WebKit::DrawingAreaImpl::didUninstallPageOverlay): + Call LayerTreeHost::didUninstallPageOverlay. + + (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): + Call LayerTreeHost::setPageOverlayNeedsDisplay. + + * WebProcess/WebPage/FindController.cpp: + (WebKit::FindController::drawRect): + Remove a bogus assertion. + + * WebProcess/WebPage/LayerTreeHost.h: + Add new pure virtual member functions. + + * WebProcess/WebPage/PageOverlay.cpp: + (WebKit::PageOverlay::setNeedsDisplay): + Call DrawingArea::setPageOverlayNeedsDisplay. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::installPageOverlay): + Make sure to call PageOverlay::setNeedsDisplay after the page overlay has been installed. + + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + Create the page overlay layer if needed. + + (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): + Invalidate the page overlay layer as well. + + (WebKit::LayerTreeHostMac::sizeDidChange): + Resize the page overlay layer. + + (WebKit::LayerTreeHostMac::didInstallPageOverlay): + Create the page overlay layer. + + (WebKit::LayerTreeHostMac::didUninstallPageOverlay): + Destroy the page overlay layer. + + (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay): + Call setNeedsDisplay on the page overlay layer. + + (WebKit::LayerTreeHostMac::paintContents): + Handle painting the page overlay layer. + + (WebKit::LayerTreeHostMac::flushPendingLayerChanges): + Flush the page overlay layer changes as well. + + (WebKit::LayerTreeHostMac::createPageOverlayLayer): + Create a layer and add it as a sublayer of the root layer. + + (WebKit::LayerTreeHostMac::destroyPageOverlayLayer): + Destroy the page overlay layer. + +2011-02-06 Adam Roben <aroben@apple.com> + + Make it possible to use DrawingAreaProxyImpl on Windows + + It can be optionally turned on by setting the WEBKIT2_USE_NEW_DRAWING_AREA environment + variable. Turning it on by default is covered by <http://webkit.org/b/53805>. + + Fixes <http://webkit.org/b/53879>. + + Reviewed by Anders Carlsson. + + * UIProcess/BackingStore.h: Add an m_bitmap member on Windows. + + * UIProcess/win/BackingStoreWin.cpp: + (WebKit::BitmapDC::operator HDC): + (WebKit::BitmapDC::BitmapDC): + (WebKit::BitmapDC::~BitmapDC): + Added this helper class, which uses RAII to select a bitmap into a new memory DC. + (WebKit::BackingStore::paint): Wrap our bitmap in a BitmapDC and use ::BitBlt to copy the + specified rect into the destination DC. + (WebKit::createBitmap): New helper function, just creates a DIB section with the specified + size. + (WebKit::BackingStore::incorporateUpdate): Ported from BackingStoreMac.mm. It seems like + this code could be shared at some point. + (WebKit::BackingStore::scroll): Wrap our bitmap in a BitmapDC and use ::ScrollDC to scroll + the specified rect. + + * UIProcess/win/WebView.cpp: + (WebKit::useNewDrawingArea): Added. Returns true if the WEBKIT2_USE_NEW_DRAWING_AREA + environment variable is set. + (WebKit::drawPageBackground): New helper function. Code came from onPaintEvent. + (WebKit::WebView::onPaintEvent): Ported from -[WKView drawRect:]. + (WebKit::WebView::createDrawingAreaProxy): Create a DrawingAreaProxyImpl if we're using the + new drawing area. + + (WebKit::WebView::enterAcceleratedCompositingMode): + (WebKit::WebView::exitAcceleratedCompositingMode): + (WebKit::WebView::pageDidEnterAcceleratedCompositing): + (WebKit::WebView::pageDidLeaveAcceleratedCompositing): + Added some assertions to make sure these are only called when expected. We don't expect + enter/exitAcceleratedCompositingMode to be called at all right now, because accelerated + compositing is turned off in WebKit2 on Windows. + + (WebKit::WebView::switchToDrawingAreaTypeIfNecessary): Ditto, and added a case for the + DrawingAreaInfo::Impl constant. + +2011-02-07 Adam Roben <aroben@apple.com> + + Start compiling DrawingArea[Proxy]Impl and dependencies on Windows + + Fixes <http://webkit.org/b/53875> WebKit2 on Windows should build DrawingArea[Proxy]Impl + + Reviewed by Sam Weinig and Darin Adler. + + * Platform/Region.cpp: + (WebKit::Region::Shape::shapeOperation): Initialize variable to avoid a bogus "potentially + uninitialized variable" warning. + + * UIProcess/BackingStore.cpp: Removed #error for non-Mac platforms. + + * UIProcess/BackingStore.h: Added a PlatformGraphicsContext typedef for Windows. + + * UIProcess/DrawingAreaProxy.h: + * UIProcess/DrawingAreaProxyImpl.cpp: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didReceiveMessage): + Allow Windows to compile the new drawing area code. + + * WebProcess/WebPage/DrawingArea.cpp: + (WebKit::DrawingArea::create): Allow creating a DrawingAreaImpl on Windows, too. + + * WebProcess/WebPage/DrawingArea.h: + * WebProcess/WebPage/DrawingAreaImpl.cpp: + * WebProcess/WebPage/LayerTreeHost.cpp: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::didReceiveMessage): + Allow Windows to compile the new drawing area code. + + * Shared/win/LayerTreeContextWin.cpp: Added. + * UIProcess/win/BackingStoreWin.cpp: Added. + Stubbed out these files. + + * win/WebKit2.vcproj: Added new files. + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Rename some drawing area related member functions + https://bugs.webkit.org/show_bug.cgi?id=53935 + + * WebProcess/WebPage/DrawingArea.h: + (WebKit::DrawingArea::setPageOverlayNeedsDisplay): + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setNeedsDisplay): + (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): + * WebProcess/WebPage/DrawingAreaImpl.h: + * WebProcess/WebPage/LayerTreeHost.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): + (WebKit::LayerTreeHostMac::scrollNonCompositedContents): + +2011-02-07 Adam Roben <aroben@apple.com> + + Use the right calling convention when calling WebKitMain + + Fixes <http://webkit.org/b/53923> REGRESSION (r77678): Crash on quit in web process in + wWinMain + + Reviewed by Steve Falkenburg. + + * win/MainWin.cpp: + (wWinMain): Use __cdecl instead of WINAPI (__stdcall) when calling WebKitMain, since that is + how that function is declared. + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + The drawing area should be in charge of drawing the page overlay + https://bugs.webkit.org/show_bug.cgi?id=53927 + + * WebProcess/WebPage/DrawingArea.h: + (WebKit::DrawingArea::didInstallPageOverlay): + (WebKit::DrawingArea::didUninstallPageOverlay): + (WebKit::DrawingArea::setOverlayNeedsDisplay): + Add empty stubs. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::didInstallPageOverlay): + Add empty function. This will eventually ask the layer tree host to + create a GraphicsLayer for the page overlay. + + (WebKit::DrawingAreaImpl::didUninstallPageOverlay): + Tell the page that it needs to be repainted. + + (WebKit::DrawingAreaImpl::setOverlayNeedsDisplay): + Just call setNeedsDisplay for now. + + (WebKit::DrawingAreaImpl::display): + Paint the page overlay too. + + * WebProcess/WebPage/DrawingAreaImpl.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::drawRect): + Only call drawPageOverlay if we have an old drawing area. + + (WebKit::WebPage::drawPageOverlay): + Draw the page overlay. Code moved here from WebPage::drawRect. + + (WebKit::WebPage::installPageOverlay): + Call DrawingArea::installPageOverlay. + + (WebKit::WebPage::uninstallPageOverlay): + Call DrawingArea::uninstallPageOverlay. + + * WebProcess/WebPage/WebPage.h: + (WebKit::WebPage::hasPageOverlay): + Add getter. + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add WebPage::bounds and use it + https://bugs.webkit.org/show_bug.cgi?id=53926 + + * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: + (WebKit::ChunkedUpdateDrawingArea::resumePainting): + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::resumePainting): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + * WebProcess/WebPage/WebPage.h: + (WebKit::WebPage::bounds): + +2011-02-07 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej Stachowiak. + + Don't exclude overlay scrollers from the page overlay bounds + https://bugs.webkit.org/show_bug.cgi?id=53924 + + Don't subtract the scrollbars from the page overlay bounds if + overlay scrollers are enabled. + + * WebProcess/WebPage/PageOverlay.cpp: + (WebKit::PageOverlay::bounds): + +2011-02-07 Adam Roben <aroben@apple.com> + + Windows build fix after r77794 + + * win/WebKit2.def: Export WebCore symbols used by WebKitTestRunner. + +2011-02-07 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Antti Koivisto. + + Add WKURLRequestCopyURL API (needed for tests and also generally useful) + https://bugs.webkit.org/show_bug.cgi?id=53909 + + * Shared/API/c/WKURLRequest.cpp: + (WKURLRequestCopyURL): + * Shared/API/c/WKURLRequest.h: + * Shared/WebURLRequest.h: + (WebKit::WebURLRequest::url): + +2011-02-06 Ryosuke Niwa <rniwa@webkit.org> + + Unreviewed; speculative Qt build fix. + + * WebKit2.pro: + +2011-02-06 Ryosuke Niwa <rniwa@webkit.org> + + Reviewed by Darin Adler. + + OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h + https://bugs.webkit.org/show_bug.cgi?id=52867 + + * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: + (WebKit::NetscapePluginModule::getPluginInfo): Calls adoptArrayPtr. + +2011-02-06 Benjamin Poulain <ikipou@gmail.com> + + Reviewed by Andreas Kling. + + [Qt] WebKit does not build on Mac with WebKit 2 + https://bugs.webkit.org/show_bug.cgi?id=53380 + + * Platform/CoreIPC/qt/ConnectionQt.cpp: Use fcntl() to set close on exec so + we do not rely on recent kernel. + (CoreIPC::Connection::readyReadHandler): + * Platform/qt/SharedMemoryQt.cpp: ditto + (WebKit::SharedMemory::create): + (WebKit::SharedMemory::createHandle): + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Guard prctl() since it is + a Linux specific function. + (WebKit::QtWebProcess::setupChildProcess): + * UIProcess/DrawingAreaProxy.h: Differentiate between building on Mac + and the Mac port. + * UIProcess/DrawingAreaProxyImpl.cpp: ditto + * UIProcess/WebPageProxy.cpp: ditto + (WebKit::WebPageProxy::didReceiveMessage): + * WebProcess/WebPage/DrawingArea.cpp: ditto + (WebKit::DrawingArea::create): + * WebProcess/WebPage/DrawingArea.h: + * WebProcess/WebPage/DrawingAreaImpl.cpp: ditto + * WebProcess/WebPage/WebPage.cpp: ditto + (WebKit::WebPage::didReceiveMessage): + +2011-02-05 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Dan Bernstein. + + REGRESSION: New drawing area is causing some WebProcess crashes in layout tests + https://bugs.webkit.org/show_bug.cgi?id=53865 + <rdar://problem/8963148> + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Handle the case + where this is called repeatedly without exiting accelerated composting mode + first. + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Handle the case + of being called more than once. + +2011-02-05 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Need a way to resize and scroll the page at the same time + https://bugs.webkit.org/show_bug.cgi?id=53814 + <rdar://problem/8498008> + + Add -[WKView setFrame:andScrollBy:]. + + * UIProcess/API/mac/WKView.h: + * UIProcess/API/mac/WKView.mm: + (-[WKView setFrame:andScrollBy:]): + Stash away the scroll offset and call setFrame:. + + (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]): + (-[WKView _setDrawingAreaSize:]): + * UIProcess/API/qt/qwkpage.cpp: + (QWKPage::setViewportSize): + DrawingAreaProxy::setSize now takes a scroll offset. + + * UIProcess/DrawingAreaProxy.cpp: + (WebKit::DrawingAreaProxy::setSize): + This now takes a scroll offset and stores it in m_scrollOffset. + + * UIProcess/DrawingAreaProxy.h: + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::sendSetSize): + Send along the scroll offset and set it back to zero. + + * UIProcess/LayerBackedDrawingAreaProxy.cpp: + (WebKit::LayerBackedDrawingAreaProxy::didSetSize): + * UIProcess/TiledDrawingAreaProxy.cpp: + (WebKit::TiledDrawingAreaProxy::didSetSize): + * UIProcess/win/WebView.cpp: + (WebKit::WebView::onSizeEvent): + (WebKit::WebView::switchToDrawingAreaTypeIfNecessary): + DrawingAreaProxy::setSize now takes a scroll offset. + + * WebProcess/WebPage/DrawingArea.h: + (WebKit::DrawingArea::setSize): + Add a scrollOffset parameter. + + * WebProcess/WebPage/DrawingArea.messages.in: + Add a scroll offset parameter to the SetSize message. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setSize): + Call WebPage::scrollMainFrameIfNotAtMaxScrollPosition. + + * WebProcess/WebPage/DrawingAreaImpl.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::scrollMainFrameIfNotAtMaxScrollPosition): + Compute a scroll offset and call setScrollPosition on the main frame view. + +2011-02-04 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Maciej Stachowiak. + + WebKit2: Crash when InjectedBundlePageLoaderClient::willSendRequestForFrame returns a null WKURLRequestRef + https://bugs.webkit.org/show_bug.cgi?id=53829 + + Store the result of m_client.willSendRequestForFrame in a RefPtr, and null check it before + calling resourceRequest() on it. + + * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: + (WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame): + +2011-02-04 Anders Carlsson <andersca@apple.com> + + Fix build. + + * WebProcess/mac/WebProcessMac.mm: + +2011-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + Link opened in background tab fails to paint when activated if it completes loading before tab is selected + https://bugs.webkit.org/show_bug.cgi?id=53827 + <rdar://problem/8962355> + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::resumePainting): + Invalidate the entire page. + +2011-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fix <rdar://problem/8961227> WebKit2 does not work with symlinked home directories. + + * WebProcess/mac/WebProcessMac.mm: + (WebKit::WebProcess::platformSetCacheModel): + Don't adopt an autoreleased pointer, this would lead to a crash. + + (WebKit::appendSandboxParameterPath): + (WebKit::appendSandboxParameterConfPath): + (WebKit::initializeSandbox): + Clean up the sandbox parameter code and make sure that realpath is called for all parameters. + +2011-02-04 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Sandbox violations when visiting a site using HTTP authentication + <rdar://problem/8951079> + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-04 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=53823 + Print layout sometimes seen on screen + + <rdar://problem/8948742> REGRESSION (WebKit2) - When I print a page, I visually see it re-layout + <rdar://problem/8899389> REGRESSION(WebKit2): Wrong content can appear when print dialog is up + + * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setAutodisplay): Removed a + branch that didn't do anything useful. + + * UIProcess/API/mac/WKPrintingView.h: + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView _suspendAutodisplay]): + (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): + (-[WKPrintingView _delayedResumeAutodisplay]): + (-[WKPrintingView knowsPageRange:]): + (-[WKPrintingView beginDocument]): + (-[WKPrintingView endDocument]): + When page setup changes, or when going from print preview to actual printing, AppKit calls + -endDocument just to begin it again. Delay resuming autodisplay until the next run loop + iteration. + + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::invalidateContentsAndWindow): + (WebKit::WebChromeClient::invalidateContentsForSlowScroll): + Tightened it up from other side - we should never send pixels to UI process while in + printing mode. This is not 100% reliable, because relayout doesn't happen immediately, + and we can still have print layout in screen mode - but it helps. + +2011-02-04 Sam Weinig <sam@webkit.org> + + Reviewed by Mark Rowe. + + Fix for <rdar://problem/8961580>. + Work around for <rdar://problem/8957845>. + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-04 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + WebKit2 doesn't hide mouse pointer on keypress + https://bugs.webkit.org/show_bug.cgi?id=53821 + rdar://problem/8630895 + + * UIProcess/PageClient.h: Renamed didNotHandleKeyEvent to + doneWithKeyEvent and added a bool wasEventHandled argument. + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didReceiveEvent): Changed code to call + doneWithKeyEvent and call even if event was handled. + + * UIProcess/API/mac/PageClientImpl.h: Updated for above change. + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::doneWithKeyEvent): Ditto. But also + call [NSCursor setHiddenUntilMouseMoves:YES] when a key down + event was handled. This matches what -[WebHTMLView keyDown:] does. + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::doneWithKeyEvent): Ditto. + * UIProcess/API/qt/qwkpage_p.h: Ditto. + * UIProcess/win/WebView.cpp: + (WebKit::WebView::doneWithKeyEvent): Ditto. + * UIProcess/win/WebView.h: Ditto. + +2011-02-04 Steve Falkenburg <sfalken@apple.com> + + Reviewed by Adam Roben. + + WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit + https://bugs.webkit.org/show_bug.cgi?id=53810 + <rdar://problem/8946085> + + If WebKit2WebProcess.exe is in a different directory from the client process, and that + client process uses CreateProcess to launch WebKit2WebProcess, the DLL search path may + end up excluding the directory containing WebKit. To address this, we use SetDllDirectory + to explicitly include the WebKit directory in the DLL search path. + + * win/MainWin.cpp: + (wWinMain): Use SetDllDirectory and LoadLibrary to load WebKit.dll from WebKit2WebProcess.exe + * win/WebKit2WebProcessCommon.vsprops: Don't link directly to WebKit. Link against shlwapi. + +2011-02-04 Adam Roben <aroben@apple.com> + + Allow passing a null filter callback to WKPageCopySessionState + + WebKit2 part of <http://webkit.org/b/53616> <rdar://problem/8949883>. + + Reviewed by Sam Weinig. + + * UIProcess/cf/WebBackForwardListCF.cpp: + (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Check if the filter is null + before calling it. + +2011-02-04 Brian Weinstein <bweinstein@apple.com> + + Reviewed by John Sullivan. + + WebKit2: DidInitiateLoadForResource needs to know if the resource is being loaded by a committed or provisional frame + https://bugs.webkit.org/show_bug.cgi?id=53794 + + When we navigate from one page to another, there can be multiple subresource requests between when + the new page has started its provisional load and when it has committed the load. + + There can be: + + - The main resource load of the provisional page + - Synchronous XHR from the unload event of the loaded page. + + WebKit clients need to be able to differentiate between these loads. + + * UIProcess/API/C/WKPage.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didInitiateLoadForResource): Pass whether or not the page is provisionally loading + to the client. + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: Add a new parameter to DidInitiateLoadForResource. + * UIProcess/WebResourceLoadClient.cpp: + (WebKit::WebResourceLoadClient::didInitiateLoadForResource): a new parameter to didInitiateLoadForResource. + * UIProcess/WebResourceLoadClient.h: + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Pass whether or not the page is currently + in a provisional load (checked by seeing if the DocumentLoader matches the FrameLoader's provisionalDocumentLoader) + to the UI Process. + +2011-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Mark Rowe. + + Mac WebKit2 should use the new drawing area + https://bugs.webkit.org/show_bug.cgi?id=53802 + <rdar://problem/7881419> + <rdar://problem/7881447> + <rdar://problem/8252632> + <rdar://problem/8479422> + <rdar://problem/8633813> + <rdar://problem/8734512> + <rdar://problem/8787660> + + * UIProcess/API/mac/WKView.mm: + (useNewDrawingArea): + Return true. Eventually this function should be removed, but let's keep it for now so + we can go back to the old drawing area if necessary. + +2011-02-04 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Anders Carlsson. + + WebKit2: Crash in WebPageProxy::setPendingAPIRequestURL after web process crashed + https://bugs.webkit.org/show_bug.cgi?id=53799 + <rdar://problem/8943956> + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::reload): + +2011-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Maciej Stachowiak. + + Fix a shared memory leak + https://bugs.webkit.org/show_bug.cgi?id=53800 + + Move the send right representing the shared memory. + + * Platform/mac/SharedMemoryMac.cpp: + (WebKit::SharedMemory::Handle::encode): + +2011-02-04 Brady Eidson <beidson@apple.com> + + Reviewed by Anders Carlsson. + + <rdar://problem/8636239> and https://bugs.webkit.org/show_bug.cgi?id=53785 + WebKit2: Pages with dynamically inserted iframes can add extraneous back/forward items. + + WebCore doesn't gracefully handle the case where the decidePolicyForNavigationAction callback + does not occur synchronously. Let's make it synchronous. + + Change WebPageProxy to handle this message reply synchronously: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::WebPageProxy): + (WebKit::WebPageProxy::receivedPolicyDecision): + (WebKit::WebPageProxy::decidePolicyForNavigationAction): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: Make the navigation policy action message be synchronous. + + * Platform/CoreIPC/HandleMessage.h: + (CoreIPC::callMemberFunction): Add a 6-argument varient + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the message synchronously. + +2011-02-04 Steve Falkenburg <sfalken@apple.com> + + Windows build fix. + Correct prebuild build-stopping rule to allow project only rebuilds. + + * win/WebKit2WebProcessPreBuild.cmd: + +2011-02-04 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Adam Roben. + + Assertion failure in WebInspectorProxy::platformClose closing main window when inspecting a popup + window, or when running regression tests. + https://bugs.webkit.org/show_bug.cgi?id=53798 + <rdar://problem/8814364> + + Only assert about the state of m_inspectorWindow and m_inspectorView if the inspector is visible. + Also, only call ::DestroyWindow if the HWND is non-null, just to be safe. + + * UIProcess/win/WebInspectorProxyWin.cpp: + (WebKit::WebInspectorProxy::platformClose): + +2011-02-04 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Go out of accelerated compositing mode when the drawing area is destroyed + https://bugs.webkit.org/show_bug.cgi?id=53788 + + This fixes a crash in the UI process if a web process crashes while in accelerated compositing mode. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): + +2011-02-03 Yury Semikhatsky <yurys@chromium.org> + + Reviewed by Pavel Feldman. + + Web Inspector: remove settings related methods from InspectorClient + https://bugs.webkit.org/show_bug.cgi?id=53686 + + * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: + (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient): + +2011-02-03 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Dan Bernstein. + + WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle + https://bugs.webkit.org/show_bug.cgi?id=52897 + <rdar://problem/8898294> + + * Shared/API/c/WKSharedAPICast.h: + (WebKit::toAPI): + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: + (WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame): + * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchWillSendRequest): + +2011-02-03 Ivan Krstić <ike@apple.com> + + Reviewed by Maciej Stachowiak. + + Make WebProcess pass explicit homedir parameter to the sandbox + <rdar://problem/8405760> + <https://webkit.org/b/53558> + + * WebProcess/com.apple.WebProcess.sb: + * WebProcess/mac/WebProcessMac.mm: + (WebKit::initializeSandbox): + +2011-02-03 James Kozianski <koz@chromium.org> + + Reviewed by Dimitri Glazkov. + + Add navigator.registerProtocolHandler behind a flag. + https://bugs.webkit.org/show_bug.cgi?id=52609 + + * Configurations/FeatureDefines.xcconfig: + +2011-02-03 Adam Langley <agl@chromium.org> + + Reviewed by Adam Barth. + + Plumb mixed script URL to FrameLoaderClient + https://bugs.webkit.org/show_bug.cgi?id=52384 + + Regressions covered by http/tests/security/mixedContent/* + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::didRunInsecureContent): + * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: + +2011-02-03 Jon Honeycutt <jhoneycutt@apple.com> + + Download bundles should be moved to their final destination when they + finish. + + https://bugs.webkit.org/show_bug.cgi?id=53668 + + Reviewed by Adam Roben. + + * WebProcess/Downloads/Download.cpp: + (WebKit::Download::Download): + Initialize m_allowOverwrite. + (WebKit::Download::retrieveDestinationWithSuggestedFilename): + Return the result of requesting the destination filename from the UI + process. + (WebKit::Download::decideDestinationWithSuggestedFilename): + Call retrieveDestinationWithSuggestedFilename(). + (WebKit::Download::didFinish): + Call platformDidFinish(). + + * WebProcess/Downloads/Download.h: + Declare retrieveDestinationWithSuggestedFilename() and + platformDidFinish(). Add a member variable to store whether the UI + process would like us to overwrite existing files. + + * WebProcess/Downloads/cf/DownloadCFNet.cpp: + (WebKit::willResumeWithResponseCallback): + Remove some trailing whitespace. + + * WebProcess/Downloads/curl/DownloadCurl.cpp: + (WebKit::Download::platformDidFinish): + Stubbed. + + * WebProcess/Downloads/mac/DownloadMac.mm: + (WebKit::Download::platformDidFinish): + Stubbed. + + * WebProcess/Downloads/qt/DownloadQt.cpp: + (WebKit::Download::platformDidFinish): + Stubbed. + + * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: + (WebKit::Download::didDecideDestination): + Store whether the UI process would like us to overwrite existing files. + (WebKit::Download::platformDidFinish): + Try to move the bundle to the final destination. If that fails, ask the + UI process for a new destination. If we receive one, try again to move + the bundle. Call didCreateDestination() to report the updated path of + file whether it's the bundle that we failed to move, or the new final + destination. + + This is similar to what is done by WebKit 1's CFNetwork port. + + * win/WebKit2.vcproj: + Add DownloadWin.cpp. + +2011-02-01 Jon Honeycutt <jhoneycutt@apple.com> + + Small clean-up in DownloadCFNet.cpp. + + Rubber-stamped by Mark Rowe. + + * WebProcess/Downloads/cf/DownloadCFNet.cpp: + (WebKit::Download::didDecideDestination): + Moved out of the section labeled "CFURLDownload callbacks" and up near + the other member functions. + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Paint non-composited contents in a layer + https://bugs.webkit.org/show_bug.cgi?id=53742 + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setNeedsDisplay): + Call LayerTreeHost::setNonCompositedContentsNeedDisplayInRect. + + (WebKit::DrawingAreaImpl::scroll): + Call LayerTreeHost::scrollNonCompositedContents. + + (WebKit::DrawingAreaImpl::setSize): + Call LayerTreeHost::sizeDidChange. + + * WebProcess/WebPage/LayerTreeHost.h: + Add new pure virtual member functions. + + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + Create the non-composited content layer. + + (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect): + Call setNeedsDisplay on the GraphicsLayer. + + (WebKit::LayerTreeHostMac::scrollNonCompositedContents): + Just call setNonCompositedContentsNeedDisplayInRect. + + (WebKit::LayerTreeHostMac::sizeDidChange): + Resize the layers and flush any changes. + + (WebKit::LayerTreeHostMac::paintContents): + Call WebPage::drawRect. + + (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback): + Lay out the web page. + + (WebKit::LayerTreeHostMac::flushPendingLayerChanges): + Call syncCompositingStateForThisLayerOnly on the non-composited content layer. + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + When in accelerated compositing mode, wait for DidSetSize messages + https://bugs.webkit.org/show_bug.cgi?id=53736 + + Normally we wait for DidSetSize messages from ::paint, but that's never called in + accelerated compositing mode so we just do it right after sending the SetSize message. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::paint): + Call waitForAndDispatchDidSetSize. + + (WebKit::DrawingAreaProxyImpl::sendSetSize): + Call waitForAndDispatchDidSetSize when in accelerated compositing mode. + + (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): + New utility function which waits for and dispatches a DidSetSize message. + + * UIProcess/DrawingAreaProxyImpl.h: + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Pass along an UpdateInfo object to the ExitAcceleratedCompositingMode message + https://bugs.webkit.org/show_bug.cgi?id=53734 + + * UIProcess/DrawingAreaProxy.h: + (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode): + Add an UpdateInfo parameter. + + * UIProcess/DrawingAreaProxy.messages.in: + Add an UpdateInfo parameter to the ExitAcceleratedCompositingMode message. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + Incorporate the passed in update. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + Create a new UpdateInfo object, paint into it and pass it along as a parameter + to the ExitAcceleratedCompositingMode message. + +2011-02-03 Beth Dakin <bdakin@apple.com> + + Reviewed by Sam Weinig. + + Fix for <rdar://problem/8944544> Ability to animate track + for WKPainter scrollers + + * WebCoreSupport/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Change DidSetSize to take a LayerTreeContext parameter + https://bugs.webkit.org/show_bug.cgi?id=53724 + + Since SetSize can cause layout to happen, we need to pass along a layer tree context to + the DidSetSize message so the UI process can enter/exit accelerated compositing mode appropriately. + + * Shared/LayerTreeContext.h: + * Shared/mac/LayerTreeContextMac.mm: + Add equality operators to LayerTreeContext. + + * UIProcess/DrawingAreaProxy.h: + (WebKit::DrawingAreaProxy::didSetSize): + This now takes a LayerTreeContext parameter. + + * UIProcess/DrawingAreaProxy.messages.in: + Add LayerTreeContext parameter. + + * UIProcess/DrawingAreaProxyImpl.cpp: + Get rid of m_isInAcceleratedCompositingMode and use the current layer context instead. + + (WebKit::DrawingAreaProxyImpl::paint): + Bail if the call to DidSetSize ended up entering accelerated compositing mode. + + (WebKit::DrawingAreaProxyImpl::didSetSize): + If the new layer tree context is different, enter/exit accelerated compositing mode accordingly. + + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + Update the layer tree context. + + * UIProcess/DrawingAreaProxyImpl.h: + (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode): + Add simple getter. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setSize): + Pass along the layer tree context. + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Get rid of LayerTreeContext::seed on Mac. + Add sequence checks to enterAcceleratedCompositingMode and exitAcceleratedCompositingMode and + have them call newly added overloads that don't have the checks. + + * Shared/LayerTreeContext.h: + * Shared/mac/LayerTreeContextMac.mm: + (WebKit::LayerTreeContext::LayerTreeContext): + (WebKit::LayerTreeContext::encode): + (WebKit::LayerTreeContext::decode): + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + * UIProcess/DrawingAreaProxyImpl.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Get rid of timestamps in UpdateInfo + https://bugs.webkit.org/show_bug.cgi?id=53713 + + Add a 64-bit sequence number to all DrawingAreaProxy messages, and use it to + check whether Update messages should be handled or not. + + * Shared/UpdateInfo.cpp: + (WebKit::UpdateInfo::encode): + (WebKit::UpdateInfo::decode): + * Shared/UpdateInfo.h: + (WebKit::UpdateInfo::UpdateInfo): + * UIProcess/BackingStore.cpp: + (WebKit::BackingStore::BackingStore): + (WebKit::BackingStore::incorporateUpdate): + * UIProcess/BackingStore.h: + * UIProcess/DrawingAreaProxy.h: + (WebKit::DrawingAreaProxy::update): + (WebKit::DrawingAreaProxy::didSetSize): + (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode): + * UIProcess/DrawingAreaProxy.messages.in: + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): + (WebKit::DrawingAreaProxyImpl::update): + (WebKit::DrawingAreaProxyImpl::didSetSize): + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + * UIProcess/DrawingAreaProxyImpl.h: + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::generateSequenceNumber): + (WebKit::DrawingAreaImpl::setSize): + (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + (WebKit::DrawingAreaImpl::display): + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Darin Adler. + + Don't send enter/exit accelerated compositing mode messages when handling setSize + https://bugs.webkit.org/show_bug.cgi?id=53706 + + Don't send EnterAcceleratedCompositingMode/ExitAcceleratedCompositing mode when + the mode changes happen as a result of relayout in setSize, since an updated state + is going to be sent back in the DidSetSize message. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::didSetSize): + Add an assert. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::DrawingAreaImpl): + Initialize m_inSetSize. + + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + Factor out code into enterAcceleratedCompositingMode and exitAcceleratedCompositingMode. + + (WebKit::DrawingAreaImpl::setSize): + Set m_inSetSize to true while handling setSize. + + (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): + Take over the message sending responsibility from LayerTreeHostMac, and don't send messages + if we're currently handling a SetSize message. + + * WebProcess/WebPage/DrawingAreaImpl.h: + Add m_inSetSize. + + * WebProcess/WebPage/LayerTreeHost.h: + Add layerTreeHost getter. + + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + Don't send EnterAcceleratedCompositingMode messages. + + (WebKit::LayerTreeHostMac::layerTreeContext): + Add getter for the current layer tree context. + + (WebKit::LayerTreeHostMac::invalidate): + Don't send ExitAcceleratedCompositingMode messages. + +2011-02-03 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make the layer tree host keep track of the layer tree context + https://bugs.webkit.org/show_bug.cgi?id=53698 + + Add a LayerTreeContext member variable to the LayerTreeHost object, + and also add a seed count to the LayerTreeContext so we can keep track of + how layer tree contexts relate to each other. + + * Shared/LayerTreeContext.h: + * Shared/mac/LayerTreeContextMac.mm: + (WebKit::LayerTreeContext::LayerTreeContext): + (WebKit::LayerTreeContext::makeWithSeed): + (WebKit::LayerTreeContext::encode): + (WebKit::LayerTreeContext::decode): + + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + Add the layer tree context as a member variable. + + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + Initialize the layer tree context. + +2011-02-03 Sam Weinig <sam@webkit.org> + + Fix Qt build. + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPage::QWKPage): + +2011-02-02 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Add notification of the end of a rubber band. + <rdar://problem/8940648> + + * UIProcess/API/C/WKPage.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::drawHeader): + (WebKit::WebPageProxy::drawFooter): + (WebKit::WebPageProxy::didCompleteRubberBandForMainFrame): + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: + * UIProcess/WebUIClient.cpp: + (WebKit::WebUIClient::didCompleteRubberBandForMainFrame): + * UIProcess/WebUIClient.h: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::didCompleteRubberBandForMainFrame): + * WebProcess/WebCoreSupport/WebChromeClient.h: + Pipe the notification up to the WKUIClient. + +2011-02-03 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r77449. + http://trac.webkit.org/changeset/77449 + https://bugs.webkit.org/show_bug.cgi?id=53663 + + causes many WebKit2 tests to crash (Requested by othermaciej + on #webkit). + + * Shared/API/c/WKSharedAPICast.h: + (WebKit::toAPI): + (WebKit::toCopiedAPI): + (WebKit::toURLRef): + (WebKit::toCopiedURLAPI): + * Shared/WebString.h: + (WebKit::WebString::isNull): + (WebKit::WebString::WebString): + +2011-02-02 Sam Weinig <sam@webkit.org> + + Fix license block issues pointed out by Daniel Bates. + + * Shared/API/c/WKGraphicsContext.cpp: + * Shared/API/c/WKGraphicsContext.h: + * Shared/API/c/cg/WKGraphicsContextCG.cpp: + * Shared/API/c/cg/WKGraphicsContextCG.h: + * Shared/WebGraphicsContext.cpp: + +2011-02-02 Sam Weinig <sam@webkit.org> + + Reviewed by Dan Bernstein. + + Add WKBundleFrameGetVisibleContentBoundsExcludingScrollbars API for WebKit2. + + * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: + (WKBundleFrameGetContentBounds): + (WKBundleFrameGetVisibleContentBounds): + (WKBundleFrameGetVisibleContentBoundsExcludingScrollbars): + (WKBundleFrameGetScrollOffset): + * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::contentBounds): + (WebKit::WebFrame::visibleContentBounds): + (WebKit::WebFrame::visibleContentBoundsExcludingScrollbars): + (WebKit::WebFrame::scrollOffset): + * WebProcess/WebPage/WebFrame.h: + Move implementation of frame geometry to the implementation file + instead of keeping it in the API file. + +2011-02-02 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=53361 + <rdar://problem/8921729> REGRESSION: Membuster accumulates 1GB+ memory due to autorelease + pools not being drained. + Call into AppKit to add observers that push and pop autorelease pools on entry + and exit from the CFRunLoop. This will prevent memory from accumulating. + + * WebProcess/mac/WebProcessMainMac.mm: + (WebKit::WebProcessMain): + +2011-02-02 Darin Adler <darin@apple.com> + + Reviewed by Sam Weinig. + + Make null WTF::String objects turn into 0 pointers for WKStringRef and WKURLRef. + rdar://problem/8948688 + + * Shared/API/c/WKSharedAPICast.h: + (WebKit::toAPI): Return 0 if the passed in string is 0. + (WebKit::toCopiedAPI): Ditto. + (WebKit::toURLRef): Ditto. Old code was trying to do this but was missing a return. + (WebKit::toCopiedURLAPI): Ditto. Old code was trying to do this but had incorrect + nll check. + + * Shared/WebString.h: Removed isNull function. It can never return true. + Removed constructor code that turns the null string into the empty string. + Instead assert that the passed in string is not null. + +2011-02-02 Mark Rowe <mrowe@apple.com> + + Reviewed by Beth Dakin. + + <rdar://problem/8928367> Crash when loading canvas pages inside HTMLCanvasElement::createImageBuffer(). + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): Add some missing initializers. + +2011-02-02 Sam Weinig <sam@webkit.org> + + Reviewed by Beth Dakin. + + Add ChromeClient function to paint custom overhang areas. + https://bugs.webkit.org/show_bug.cgi?id=53639 + + * Shared/API/c/WKBase.h: + * Shared/API/c/WKGraphicsContext.cpp: Added. + (WKGraphicsContextGetTypeID): + * Shared/API/c/WKGraphicsContext.h: Added. + * Shared/API/c/WKSharedAPICast.h: + * Shared/API/c/cg/WKGraphicsContextCG.cpp: Added. + (WKGraphicsContextGetCGContext): + * Shared/API/c/cg/WKGraphicsContextCG.h: Added. + * Shared/APIObject.h: + * Shared/WebGraphicsContext.cpp: Added. + (WebKit::WebGraphicsContext::WebGraphicsContext): + * Shared/WebGraphicsContext.h: Added. + (WebKit::WebGraphicsContext::create): + (WebKit::WebGraphicsContext::platformContext): + (WebKit::WebGraphicsContext::type): + Add WebGraphicsContext API type. + + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: + (WebKit::InjectedBundlePageUIClient::pageDidScroll): + (WebKit::InjectedBundlePageUIClient::shouldPaintCustomOverhangArea): + (WebKit::InjectedBundlePageUIClient::paintCustomOverhangArea): + * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::paintCustomOverhangArea): + * WebProcess/WebCoreSupport/WebChromeClient.h: + Pipe paintCustomOverhangArea to the InjectedBundlePageUIClient. + + * UIProcess/API/C/WebKit2.h: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * win/WebKit2.vcproj: + * win/WebKit2Generated.make: + Add new files. + +2011-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Work towards making the layer tree host be in charge of all painting + https://bugs.webkit.org/show_bug.cgi?id=53636 + + Make sure that DrawingAreaImpl::display is never called when in accelerated compositing mode, + since the layer tree host is supposed to handle all drawing in that case. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::scroll): + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + (WebKit::DrawingAreaImpl::setSize): + (WebKit::DrawingAreaImpl::didUpdate): + +2011-02-02 Mark Rowe <mrowe@apple.com> + + Fix the 32-bit build. + + * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: + (WebKit::computeFakeWindowBoundsRect): + +2011-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Make sure that we don't try to call display() when in accelerated compositing mode + https://bugs.webkit.org/show_bug.cgi?id=53629 + + When in accelerated compositing mode, the layer tree host should handle all painting, so make sure that display() is never called. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setNeedsDisplay): + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + (WebKit::DrawingAreaImpl::display): + +2011-02-02 Adam Roben <aroben@apple.com> + + Assert WebBackForwardList's current index is valid to help catch errors + + Hopefully this will help catch a crash I saw once but haven't yet been able to reproduce. + + Fixes <http://webkit.org/b/53622>. + + Reviewed by Brady Eidson. + + * UIProcess/WebBackForwardList.cpp: + (WebKit::WebBackForwardList::WebBackForwardList): + (WebKit::WebBackForwardList::addItem): + (WebKit::WebBackForwardList::goToItem): + (WebKit::WebBackForwardList::currentItem): + (WebKit::WebBackForwardList::backItem): + (WebKit::WebBackForwardList::forwardItem): + (WebKit::WebBackForwardList::itemAtIndex): + (WebKit::WebBackForwardList::backListCount): + (WebKit::WebBackForwardList::forwardListCount): + (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit): + (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit): + (WebKit::WebBackForwardList::clear): + * UIProcess/cf/WebBackForwardListCF.cpp: + (WebKit::WebBackForwardList::createCFDictionaryRepresentation): + (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): + Assert that m_current is valid. + + * UIProcess/WebBackForwardList.h: Moved the NoCurrentItemIndex to a static data member so + that it can be used from WebBackForwardListCF.cpp. + +2011-02-02 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + The drawing area proxy should keep track of the accelerated compositing state + https://bugs.webkit.org/show_bug.cgi?id=53624 + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): + Initialize m_isInAcceleratedCompositingMode to false. + + (WebKit::DrawingAreaProxyImpl::paint): + Don't try to paint if we're in accelerated compositing mode. + + (WebKit::DrawingAreaProxyImpl::didSetSize): + Bail if we're in accelerated compositing mode. + + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + Set m_isInAcceleratedCompositingMode to true, null out the backing store. + + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + Set m_isInAcceleratedCompositingMode back to false. + + (WebKit::DrawingAreaProxyImpl::incorporateUpdate): + Assert that we're not in accelerated compositing mode. + + * UIProcess/DrawingAreaProxyImpl.h: + +2011-02-02 Timothy Hatcher <timothy@apple.com> + + Give the Web Process access to the Safari RSS preferences. + + <rdar://problem/8916870> Sandbox violation related to RSS during initial + page load with WebKit2 (prevents RSS from working) + + Reviewed by Darin Adler. + + * WebProcess/com.apple.WebProcess.sb: + +2011-02-02 Steve Lacey <sjl@chromium.org> + + Reviewed by Eric Carlson. + + Implement basic media statistics on media elements. + https://bugs.webkit.org/show_bug.cgi?id=53322 + + * Configurations/FeatureDefines.xcconfig: + +2011-02-01 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=53561 + <rdar://problem/8900228> Stepping through print previews in WebKit2 mode steps in and out of + printing mode a lot + + Disable NSView autodisplay, so that -[WKView drawRect:] isn't called (other than when + resizing the window), so that we don't have to switch modes all the time. + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::setAutodisplay): + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setAutodisplay): + * UIProcess/WebPageProxy.h: + Pipe the call from WKPrintingView down to WKView. + + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView beginDocument]): Added. We don't want to autodisplay WKView while printing, + because layout is changed to print at the time, and drawing to screen requires relayout. + + (-[WKPrintingView endDocument]): When not printing, turn autodisplay back on. Also, call + -[super endDocument] for unknown but definitive good (oops!). + +2011-02-02 David Hyatt <hyatt@apple.com> + + Reviewed by Darin Adler. + + Conversion of right()/bottom() to maxX()/maxY() as part of the removal of those accessors. + + * UIProcess/win/WebPopupMenuProxyWin.cpp: + (WebKit::WebPopupMenuProxyWin::calculatePositionAndSize): + * UIProcess/win/WebView.cpp: + (WebKit::WebView::prepareCandidateWindow): + * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: + (WebKit::NetscapePlugin::platformGeometryDidChange): + +2011-02-01 Darin Adler <darin@apple.com> + + Reviewed by Anders Carlsson. + + Overflow in WebKit2 argument decoder buffer checking + https://bugs.webkit.org/show_bug.cgi?id=53536 + + * Platform/CoreIPC/ArgumentDecoder.cpp: + (CoreIPC::roundUpToAlignment): Tweak code a bit for clarity and to replace + C casts with C++ casts. + (CoreIPC::ArgumentDecoder::alignBufferPosition): Rearrange buffer calculation + so we don't do any math with the passed-in size, because that could overflow. + (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain): Ditto. + +2011-02-01 Csaba Osztrogonác <ossy@webkit.org> + + Unreviewed. + + Fix Qt build after r77339. + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::enterAcceleratedCompositingMode): + (QWKPagePrivate::exitAcceleratedCompositingMode): + * UIProcess/API/qt/qwkpage_p.h: + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Attach the layer tree in the UI process + https://bugs.webkit.org/show_bug.cgi?id=53560 + + * UIProcess/API/mac/WKView.mm: + (-[WKView _enterAcceleratedCompositingMode:]): + Make a render layer and add it as a sublayer of our root layer. + + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + Make LayerTreeHostMac a GraphicsLayerClient. + + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + Create a root layer, add the layer subtree as a child of the root layer. + + (WebKit::LayerTreeHostMac::~LayerTreeHostMac): + Assert that m_rootLayer is null. + + (WebKit::LayerTreeHostMac::invalidate): + Null out m_rootLayer. + + (WebKit::LayerTreeHostMac::notifyAnimationStarted): + (WebKit::LayerTreeHostMac::notifySyncRequired): + (WebKit::LayerTreeHostMac::paintContents): + Add stubs. + + (WebKit::LayerTreeHostMac::showDebugBorders): + (WebKit::LayerTreeHostMac::showRepaintCounter): + Return the correct settings. + + (WebKit::LayerTreeHostMac::flushPendingLayerChanges): + Flush the root layer changes. + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Fix Windows build. + + * UIProcess/win/WebView.cpp: + (WebKit::WebView::enterAcceleratedCompositingMode): + (WebKit::WebView::exitAcceleratedCompositingMode): + * UIProcess/win/WebView.h: + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Add a layer backed NSView for accelerated content + https://bugs.webkit.org/show_bug.cgi?id=53555 + + Rename the current _layerHostingView to _oldLayerHostingView and + add a new _layerHostingView to be used with the new drawing area. + + * UIProcess/API/mac/WKView.mm: + (-[WKView hitTest:]): + (-[WKView _startAcceleratedCompositing:]): + (-[WKView _stopAcceleratedCompositing]): + (-[WKView _enterAcceleratedCompositingMode:]): + (-[WKView _exitAcceleratedCompositingMode]): + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Dan Bernstein. + + Pass enter/exit accelerated compositing mode to the WKView + https://bugs.webkit.org/show_bug.cgi?id=53552 + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::enterAcceleratedCompositingMode): + (WebKit::PageClientImpl::exitAcceleratedCompositingMode): + * UIProcess/API/mac/WKView.mm: + (-[WKView _enterAcceleratedCompositingMode:]): + (-[WKView _exitAcceleratedCompositingMode]): + * UIProcess/API/mac/WKViewInternal.h: + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::enterAcceleratedCompositingMode): + (WebKit::WebPageProxy::exitAcceleratedCompositingMode): + * UIProcess/WebPageProxy.h: + +2011-02-01 Csaba Osztrogonác <ossy@webkit.org> + + Unreviewed Qt buildfix after r77286. + + https://bugs.webkit.org/show_bug.cgi?id=53520 + Remove the physical terminology from IntRect and FloatRect. + + * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: + (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Send messages when entering/exiting accelerated compositing + https://bugs.webkit.org/show_bug.cgi?id=53534 + + * Shared/LayerTreeContext.h: Added. + * Shared/mac/LayerTreeContextMac.mm: Added. + Add new LayerTreeContext which holds all information needed to enter + accelerated compositing mode. + + * UIProcess/DrawingAreaProxy.h: + (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode): + Add empty stubs. + + * UIProcess/DrawingAreaProxy.messages.in: + Add new messgaes. + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): + (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): + * UIProcess/DrawingAreaProxyImpl.h: + Add empty stubs. + + * WebKit2.xcodeproj/project.pbxproj: + Add new files. + + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + (WebKit::LayerTreeHostMac::invalidate): + Send messages. + +2011-02-01 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein and Darin Adler. + + <rdar://problem/8830594> Printed page is sometimes shifted down, making footer invisible + + * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView locationOfPrintRect:]): Instead of + letting AppKit compute content position on page, make the view provide it. We can do this + because WK(Printing)Views are always printed on their own, not as part of other views. + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Make LayerTreeHost ref counted + https://bugs.webkit.org/show_bug.cgi?id=53530 + + LayerTreeHostMac will soon be able to trigger layout, which could cause + the page to leave accelerated compositing mode and free the LayerTreeHostMac object. + + Making LayerTreeHost ref counted will let LayerTreeHostMac protect itself while triggering layout. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + * WebProcess/WebPage/DrawingAreaImpl.h: + * WebProcess/WebPage/LayerTreeHost.cpp: + (WebKit::LayerTreeHost::create): + * WebProcess/WebPage/LayerTreeHost.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::create): + (WebKit::LayerTreeHostMac::LayerTreeHostMac): + (WebKit::LayerTreeHostMac::~LayerTreeHostMac): + (WebKit::LayerTreeHostMac::invalidate): + +2011-02-01 Sam Weinig <sam@webkit.org> + + Reviewed by Beth Dakin. + + Part 2 for <rdar://problem/8492788> + Adopt WKScrollbarPainterController + + Use header detection to define scrollbar painting controller #define. + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-02-01 David Hyatt <hyatt@apple.com> + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=53520 + + Remove the physical terminology from IntRect and FloatRect. + + Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes, + we need to update our terminology to be more accurate. + + I'm borrowing a page from AppKit here (which also supports flipped NSViews) and + renaming right() and bottom() to maxX() and maxY(). These terms remain accurate + even for flipped rectangles. + + * Platform/Region.cpp: + (WebKit::Region::Shape::Shape): + * UIProcess/API/mac/WKPrintingView.mm: + (pageDidComputePageRects): + * UIProcess/FindIndicator.cpp: + (WebKit::FindIndicator::draw): + * UIProcess/TiledDrawingAreaProxy.cpp: + (WebKit::TiledDrawingAreaProxy::invalidate): + (WebKit::TiledDrawingAreaProxy::paint): + (WebKit::TiledDrawingAreaProxy::createTiles): + * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: + (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): + * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: + (WebKit::NetscapePlugin::callSetWindow): + +2011-02-01 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Move flushPendingLayerChanges to LayerTreeHostMac + https://bugs.webkit.org/show_bug.cgi?id=53525 + + In preparation for adding more Mac specific code to flushPendingLayerChanges. + + * WebProcess/WebPage/LayerTreeHost.cpp: + * WebProcess/WebPage/LayerTreeHost.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::flushPendingLayerChanges): + +2011-02-01 Beth Dakin <bdakin@apple.com> + + Reviewed by Sam Weinig. + + Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController + + Implement NSView's viewWillStartLiveResize and + viewDidEndLiveResize and propagate the messages down + to WebCore. + * UIProcess/API/mac/WKView.mm: + (-[WKView viewWillStartLiveResize]): + (-[WKView viewDidEndLiveResize]): + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::viewWillStartLiveResize): + (WebKit::WebPageProxy::viewWillEndLiveResize): + * UIProcess/WebPageProxy.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::viewWillStartLiveResize): + (WebKit::WebPage::viewWillEndLiveResize): + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + + A bunch of new WebKitSystemInterface functions. + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-02-01 Dave Hyatt <hyatt@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work + with vertical text. + + Change printing functions to check writing-mode and properly swap width and height + as needed. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::computePagesForPrinting): + +2011-01-31 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Maciej Stachowiak. + + https://bugs.webkit.org/show_bug.cgi?id=53466 + Move WebKit2 to printing via API methods + + Also fixes <rdar://problem/8933724> REGRESSION: Wrong pages are printed when not printing from page 1 + + Also fixes horizontal tiling (no bug filed). + + The main idea here is that we don't force AppKit to use a different scaling factor when + a Web view can't be resized to exact page size, and scale when drawing instead. + + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView _firstPrintedPageNumber]): Factored out into a separate method. + (-[WKPrintingView _lastPrintedPageNumber]): Ditto. + (pageDidDrawToPDF): Avoid crashing if data is null. + (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Use -_firstPrintedPageNumber + and -_lastPrintedPageNumber. + (pageDidComputePageRects): Set frame size to what it would have been for a normal NSView + that's been asked to resize. + (-[WKPrintingView _pageForRect:]): Check x(), because several pages can be at the same y() + when tiling horizontally. + (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Point to draw at and frame size are + now using different units, translate as appropriate. + (-[WKPrintingView _drawPreview:]): Scale the rect to WebCore units. + (-[WKPrintingView drawRect:]): Correctly calculate page number when the first page to print + isn't page 1. + (-[WKPrintingView rectForPage:]): Scale the rect to AppKit units. + +2011-01-31 Darin Adler <darin@apple.com> + + Reviewed by Adele Peterson. + + WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors + https://bugs.webkit.org/show_bug.cgi?id=53460 + + * UIProcess/API/mac/WKView.mm: Added WEBCORE_COMMAND macro for lots of editor commands that + are implemented in WebCore so they will get forwarded. Many of these will probably work without + any further changes required. Added comments about the methods that we do not yet forward. + (createSelectorExceptionMap): Map scrollPageDown: to ScrollPageForward and + scrollPageUp: to ScrollPageBackward because we want the page up and page down + keys to follow the document logical order, not physical order. This is equivalent + to what we do in WebPage::performDefaultBehaviorForKeyEvent. + +2011-01-31 Jessie Berlin <jberlin@apple.com> + + Reviewed by Steve Falkenburg. + + WebKit2: the cookies used by the WebKit2 Web Process should not go in a top-level + directory. + https://bugs.webkit.org/show_bug.cgi?id=53278 + + Use the name WebKit2WebProcess since the default location for the cookies is determined + based on the process name (which is WebKit2WebProcess.exe on Windows). + + * win/WebKit2.make: + Copy the WebKit2WebProcess.resources directory into the AppleInternal bin. + + * win/WebKit2WebProcess.resources: Added. + * win/WebKit2WebProcess.resources/Info.plist: Added. + Copied from the WebKit version of Info.plist. + + * win/WebKit2WebProcessPostBuild.cmd: + Copy the WebKit2WebProcess.resources directory into the WebKitOutPutDir's bin. + +2011-01-31 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Make LayerTreeHost an abstract base class and make LayerTreeHostMac inherit from it + https://bugs.webkit.org/show_bug.cgi?id=53432 + + * WebKit2.xcodeproj/project.pbxproj: + Add LayerTreeHostMac.h. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + * WebProcess/WebPage/DrawingAreaImpl.h: + Make m_layerTreeHost an OwnPtr and initialize/destroy it appropriately. + + * WebProcess/WebPage/LayerTreeHost.cpp: + (WebKit::LayerTreeHost::create): + On Mac, create a LayerTreeHostMac instance. + + (WebKit::LayerTreeHost::~LayerTreeHost): + No need to call platformInvalidate anymore. + + * WebProcess/WebPage/LayerTreeHost.h: + * WebProcess/WebPage/mac/LayerTreeHostMac.h: Added. + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: + (WebKit::LayerTreeHostMac::~LayerTreeHostMac): + Invalidate the run loop observer here instead of in platformInvalidate. + + (WebKit::LayerTreeHostMac::scheduleLayerFlush): + (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback): + These are now members of LayerTreeHostMac. + +2011-01-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Sam Weinig. + + [Take 2!] + Fixed crash on window close (maybe crash on launch?) due to missing frame null checks + https://bugs.webkit.org/show_bug.cgi?id=53408 + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::didNavigateWithNavigationData): + (WebKit::WebContext::didPerformClientRedirect): + (WebKit::WebContext::didPerformServerRedirect): + (WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because + we don't think we should be able to reach this state under normal conditions. + +2011-01-30 Geoffrey Garen <ggaren@apple.com> + + Reviewed by Maciej Stachowiak. + + Fixed crash on window close (maybe crash on launch?) due to missing + frame null checks + https://bugs.webkit.org/show_bug.cgi?id=53408 + + * UIProcess/WebContext.cpp: + (WebKit::WebContext::didNavigateWithNavigationData): + (WebKit::WebContext::didPerformClientRedirect): + (WebKit::WebContext::didPerformServerRedirect): + (WebKit::WebContext::didUpdateHistoryTitle): Check for NULL, since we're + calling a function that can return it. + +2011-01-30 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt][WK2]REGRESSION (r76991): Fix build errors + https://bugs.webkit.org/show_bug.cgi?id=53400 + + Revert the temporary build fix (http://trac.webkit.org/changeset/77088) + and remove WebKit2Prefix.h from the build. + * UIProcess/API/qt/qwkhistory.h: + * UIProcess/API/qt/qwkpage.h: + * WebKit2.pro: + +2011-01-30 Jeff Miller <jeffm@apple.com> + + Reviewed by Dan Bernstein. + + FindController::updateFindIndicator() crashes if selection isn't visible + https://bugs.webkit.org/show_bug.cgi?id=53399 + + * WebProcess/WebPage/FindController.cpp: + (WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty). + +2011-01-30 Csaba Osztrogonác <ossy@webkit.org> + + Unreviewed. + + [Qt][WK2] Buildfix. + + * UIProcess/API/qt/qwkhistory.h: + * UIProcess/API/qt/qwkpage.h: + +2011-01-29 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Geoffrey Garen. + + Add WKPageCopyPendingAPIRequestURL API + https://bugs.webkit.org/show_bug.cgi?id=53383 + + This API returns the last URL requested for load via API, if neither that load nor any + other load subsequently reaches the provisional state. + + This is useful to be able to track loads initiated via the API + + * UIProcess/API/C/WKPage.cpp: + (WKPageCopyPendingAPIRequestURL): Retrieve the pending URL. + * UIProcess/API/C/WKPage.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::loadURL): Set pending URL. + (WebKit::WebPageProxy::loadURLRequest): ditto + (WebKit::WebPageProxy::reload): ditto + (WebKit::WebPageProxy::goForward): ditto + (WebKit::WebPageProxy::goBack): ditto + (WebKit::WebPageProxy::estimatedProgress): Assume the initial + progress value when there is a pending URL. + (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Clear + pending URL; clients should look at the provisional URL now. + (WebKit::WebPageProxy::decidePolicyForNavigationAction): Clear + pending URL if it doesn't match the policy URL; this means we + were interrupted by another load. + * UIProcess/WebPageProxy.h: + (WebKit::WebPageProxy::pendingAPIRequestURL): Helper function. + (WebKit::WebPageProxy::clearPendingAPIRequestURL): ditto + (WebKit::WebPageProxy::setPendingAPIRequestURL): ditto + +2011-01-28 Jon Honeycutt <jhoneycutt@apple.com> + + Downloads in WK2 on Windows should write resume data to bundle + https://bugs.webkit.org/show_bug.cgi?id=53282 + <rdar://problem/8753077> + + Reviewed by Alice Liu. + + * WebProcess/Downloads/Download.cpp: + (WebKit::Download::decideDestinationWithSuggestedFilename): + Call didDecideDestination(), now that the destination is decided. + + * WebProcess/Downloads/Download.h: + Declare didDecideDestination(). Added member variables to hold the + destination file path and the download bundle path. + (WebKit::Download::destination): + Return the path to the final destination for this download. + + * WebProcess/Downloads/cf/DownloadCFNet.cpp: + (WebKit::Download::start): + Remove the name of an unused param. + (WebKit::Download::startWithHandle): + Ditto. + (WebKit::Download::cancel): + Tell CFNetwork not to delete the file upon failure, and tell it to + cancel the download. Copy the resume data for the download, and append + it to the download bundle. Call didCancel() with an empty + DataReference, since we have written our own resume data. + (WebKit::decideDestinationWithSuggestedObjectNameCallback): + Remove some unused param names. Removed the call to + CFURLDownloadSetDestination() - this is now handled in + Download::didDecideDestination(). + (WebKit::didCreateDestinationCallback): + Report that the final destination was created, rather than the download + bundle, matching old WebKit. + (WebKit::Download::didDecideDestination): + Store the final destination and the download bundle paths, and call + CFURLDownloadSetDestination(), passing the path to the download bundle. + + * WebProcess/Downloads/curl/DownloadCurl.cpp: + (WebKit::Download::didDecideDestination): + Stubbed. + + * WebProcess/Downloads/mac/DownloadMac.mm: + (WebKit::Download::didDecideDestination): + Stubbed - unneeded on the Mac. + + * WebProcess/Downloads/qt/DownloadQt.cpp: + (WebKit::Download::didDecideDestination): + Stubbed. + +2011-01-29 Jeff Miller <jeffm@apple.com> + + Reviewed by Anders Carlsson. + + Support find bouncy in WebKit2 on Windows + https://bugs.webkit.org/show_bug.cgi?id=53329 + <rdar://problem/8565843> + The Mac implements the find bouncy inside of WebKit in the UI process for WebKit2, but we need to do this inside Safari for WebKit2 on Windows. + Add infrastructure to call back into the app when the find indicator changes. + + * UIProcess/API/C/win/WKView.cpp: Cleanup some code style violations. + (WKViewSetFindIndicatorCallback): Added. + (WKViewGetFindIndicatorCallback): Added. + * UIProcess/API/C/win/WKView.h: Cleanup some code style violations. + * UIProcess/FindIndicator.cpp: + (WebKit::FindIndicator::create): + (WebKit::FindIndicator::FindIndicator): + (WebKit::FindIndicator::frameRect): + (WebKit::FindIndicator::draw): + Rename m_selectionRect to m_selectionRectInWindowCoordinates and m_textRects to m_textRectsInSelectionRectCoordinates (along with similarly named local variables) to be more explict about the coordinate system. + * UIProcess/FindIndicator.h: + (WebKit::FindIndicator::selectionRectInWindowCoordinates): Added. + (WebKit::FindIndicator::textRects): Rename m_textRects to m_textRectsInSelectionRectCoordinates. + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::setFindIndicator): Rename selectionRect to selectionRectInWindowCoordinates and textRects to textRectsInSelectionRectCoordinates to be more explict about the coordinate system. + * UIProcess/WebPageProxy.h: Ditto. + * UIProcess/win/WebView.cpp: + (WebKit::WebView::WebView): + (WebKit::WebView::setFindIndicator): Added. + (WebKit::WebView::setFindIndicatorCallback): Added. + (WebKit::WebView::getFindIndicatorCallback): Added. + * UIProcess/win/WebView.h: + +2011-01-28 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=53367 + <rdar://problem/8926460> Remove dysfunctional code from -[WKPrintingView _isPrintingPreview]. + + * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _isPrintingPreview]): The common + branch works fine for now, no need to make platforms different. + +2011-01-28 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Dan Bernstein. + + WKPageGetEstimatedProgress returns wrong value after a mainframe provisional load has started + https://bugs.webkit.org/show_bug.cgi?id=53358 + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::didStartProgress): Start progress at the magic initial value, not 0. + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Yet another build fix (What was I thinking?) + + * WebProcess/Downloads/Download.h: + * WebProcess/Plugins/PluginProxy.h: + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Fix Windows build. + + * Shared/PrintInfo.h: + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Fix tyop. + + * Shared/mac/CoreAnimationRenderer.mm: + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add CoreAnimationRenderer class + https://bugs.webkit.org/show_bug.cgi?id=53343 + + * Shared/mac/CoreAnimationRenderer.h: Added. + * Shared/mac/CoreAnimationRenderer.mm: Added. + + (WebKit::CoreAnimationRenderer::CoreAnimationRenderer): + Initialize the underlying CARenderer object and hook up a notification observer. + + (WebKit::CoreAnimationRenderer::~CoreAnimationRenderer): + Assert that the client is null. It has been set to null by the call to invalidate(). + + (WebKit::CoreAnimationRenderer::setBounds): + Update the bounds on the CARenderer and the root layer. + + (WebKit::CoreAnimationRenderer::render): + Ask the renderer to render and return the next frame time. + + (WebKit::CoreAnimationRenderer::invalidate): + Remove the change observer and reset the client. + + (WebKit::CoreAnimationRenderer::rendererDidChange): + Call the client member function. + + * WebKit2.xcodeproj/project.pbxproj: + Add new files. + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Add an OBJC_CLASS macro for forward declaring an Objective-C class + https://bugs.webkit.org/show_bug.cgi?id=53337 + + * Shared/NativeWebKeyboardEvent.h: + * Shared/PrintInfo.h: + * UIProcess/ChunkedUpdateDrawingAreaProxy.h: + * UIProcess/LayerBackedDrawingAreaProxy.h: + * UIProcess/WebInspectorProxy.h: + * UIProcess/mac/WebContextMenuProxyMac.h: + * UIProcess/mac/WebPopupMenuProxyMac.h: + * WebProcess/Downloads/Download.h: + * WebProcess/Plugins/PluginProxy.h: + * WebProcess/WebPage/LayerBackedDrawingArea.h: + * WebProcess/WebPage/WebPage.h: + * config.h: + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Don't put config.h in the message headers. + + * Scripts/webkit2/messages.py: + * Scripts/webkit2/messages_unittest.py: + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Fix build. + + * Shared/mac/ShareableSurface.cpp: + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Try to unbreak the Windows build. + + * UIProcess/cf/WebPageProxyCF.cpp: + +2011-01-28 Brady Eidson <beidson@apple.com> + + Reviewed by John Sullivan. + + https://bugs.webkit.org/show_bug.cgi?id=53330 + Need InjectedBundle API to get the response MIMEType for a URL + + * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: + (WKBundleFrameCopyMIMETypeForResourceWithURL): + * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: + + Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available: + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::mimeTypeForResourceWithURL): + * WebProcess/WebPage/WebFrame.h: + + Get the MIMEType from the platform's disk cache if available: + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/mac/WebPageMac.mm: + (WebKit::WebPage::cachedResponseMIMETypeForURL): + * WebProcess/WebPage/qt/WebPageQt.cpp: + (WebKit::WebPage::cachedResponseMIMETypeForURL): + * WebProcess/WebPage/win/WebPageWin.cpp: + (WebKit::WebPage::cachedResponseMIMETypeForURL): + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Clean up the mess introduced when config.h was added to the project: + + - Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything + twice in each file, probably slowing down compile time. + + - Add config.h to all the files that were forgotten in order to keep the build from breaking. + + - Added trap to ensure that config.h is included at the top of every implementation file. If this + had been added it would have caught the previous issue. + +2011-01-28 Stephanie Lewis <slewis@apple.com> + + Reviewed by Geoff Garen. + + <rdar://problem/8857651> Implement unregisterWorld for WebKit2 + Rename unregisterWorld to clearWrappers. Clearing the wrappers reduces the + memory use of isolated worlds. + + * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp: + (WKBundleScriptWorldClearWrappers): + * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h: + * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: + (WebKit::InjectedBundleScriptWorld::clearWrappers): + * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: + +2011-01-28 Dan Bernstein <mitz@apple.com> + + Reviewed by Sam Weinig. + + <select> can't display right-to-left (rtl) languages + https://bugs.webkit.org/show_bug.cgi?id=19785 + + * Shared/WebPopupItem.cpp: + (WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride. + (WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values. + (WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values. + * Shared/WebPopupItem.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction. + * UIProcess/WebPageProxy.h: + * UIProcess/WebPageProxy.messages.in: Ditto. + * UIProcess/WebPopupMenuProxy.h: + * UIProcess/mac/WebPopupMenuProxyMac.h: + * UIProcess/mac/WebPopupMenuProxyMac.mm: + (WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction. + Set items' text alignment to match the menu's writing direction. Set items' writing direction + and direction override according to their styles. + (WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction. + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false. + (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added. + * WebProcess/WebCoreSupport/WebChromeClient.h: + * WebProcess/WebCoreSupport/WebPopupMenu.cpp: + (WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override + values. + (WebKit::WebPopupMenu::show): Pass the menu's writing direction. + +2011-01-28 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Add ShareableSurface class + https://bugs.webkit.org/show_bug.cgi?id=53313 + + * Shared/mac/ShareableSurface.cpp: Added. + (WebKit::ShareableSurface::Handle::Handle): + Initialize the mach port. + + (WebKit::ShareableSurface::Handle::~Handle): + Deallocate our send right if needed. + + (WebKit::ShareableSurface::Handle::encode): + Encode the send right, and then null it out. + + (WebKit::ShareableSurface::Handle::decode): + Decode the send right. + + (WebKit::createIOSurface): + Create an IOSurface with the given size. + + (WebKit::ShareableSurface::create): + Create an IOSurface, either from a size or from a handle. + + (WebKit::ShareableSurface::~ShareableSurface): + Delete the texture and framebuffer. + + (WebKit::ShareableSurface::createHandle): + Create a mach port from the surface. + + (WebKit::ShareableSurface::attach): + Create an FBO if needed and bind it. + + (WebKit::ShareableSurface::detach): + Unbind the FBO. + + (WebKit::ShareableSurface::textureID): + Generate a new texture and bind it to the IOSurface. + + * Shared/mac/ShareableSurface.h: Added. + + * WebKit2.xcodeproj/project.pbxproj: + Add new files. + +2011-01-27 Adam Roben <aroben@apple.com> + + Change BinarySemaphore to wrap an auto-reset Win32 event on Windows + + Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>. + + Reviewed by Dave Hyatt. + + * Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN). + + * Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE + member that holds the event. + + * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp. + (CoreIPC::BinarySemaphore::BinarySemaphore): Create our event. + (CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event. + (CoreIPC::BinarySemaphore::signal): Signal the event. + (CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait + for the event to be signaled or for the interval to elapse. + + * win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file. + +2011-01-27 Chris Marrin <cmarrin@apple.com> + + Reviewed by Anders Carlsson. + + WebKit2: Page flashes just before accelerated compositing animation + https://bugs.webkit.org/show_bug.cgi?id=53274 + + When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy + is getting created with the current page size. When the setSize() call is + subsequently made, the sizeDidChange() call is not made (which does the initial + render of the page) because the old size and new size are the same. The solution + is to skip the setting of the size in the ctor and let it go through a size + change sequence. + + * UIProcess/DrawingAreaProxy.cpp: + (WebKit::DrawingAreaProxy::DrawingAreaProxy): + +2011-01-28 Alejandro G. Castro <alex@igalia.com> + + Reviewed by Xan Lopez. + + [GTK] Fix dist compilation for the release + https://bugs.webkit.org/show_bug.cgi?id=53290 + + * GNUmakefile.am: Remove a file that is not in the repository + anymore. + + +2011-01-28 Andreas Kling <kling@webkit.org> + + Rubber-stamped by Simon Hausmann. + + [Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal. + + Having two signals for this is redundant, combine them into + QWKPage::engineConnectionChanged(bool connected). + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::didRelaunchProcess): + (QWKPagePrivate::processDidCrash): + * UIProcess/API/qt/qwkpage.h: + +2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Maciej Stachowiak. + + Build fix for Mac Intel Debug after r76916 + https://bugs.webkit.org/show_bug.cgi?id=53284 + + Fix macro redefinition by guarding the redefined macros. + + * config.h: + +2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed build fix for Mac Intel Debug after r76916. + + Fix macro redefinition by guarding the redefined macros. + + Check if the macro is already defined before defininig it. + c++config.h has the same macros with the same values. + + * config.h: + +2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Adam Barth. + + Update the expected results for test-webkitpy after r76916. + + Include "config.h" in the expected results as well. + + * Scripts/webkit2/messages_unittest.py: + +2011-01-27 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed buildfix for SnowLeopard Intel Debug. + + Fix macro redefinition by not including config.h. + + Revert previous change in WebPageProxyCF.cpp. + + * UIProcess/cf/WebPageProxyCF.cpp: + +2011-01-27 Greg Coletta <greg.coletta@nokia.com> + + Reviewed by Laszlo Gombos. + + Get rid of prefix header dependency for WebKit2 build system. + https://bugs.webkit.org/show_bug.cgi?id=50174 + + Add config.h include explicitelly. + + * Platform/CoreIPC/ArgumentDecoder.cpp: + * Platform/CoreIPC/ArgumentEncoder.cpp: + * Platform/CoreIPC/Attachment.cpp: + * Platform/CoreIPC/BinarySemaphore.cpp: + * Platform/CoreIPC/Connection.cpp: + * Platform/CoreIPC/DataReference.cpp: + * Platform/CoreIPC/gtk/ConnectionGtk.cpp: + * Platform/CoreIPC/mac/ConnectionMac.cpp: + * Platform/CoreIPC/qt/ConnectionQt.cpp: + * Platform/CoreIPC/win/ConnectionWin.cpp: + * Platform/Logging.cpp: + * Platform/Module.cpp: + * Platform/Region.cpp: + * Platform/RunLoop.cpp: + * Platform/WorkQueue.cpp: + * Platform/cg/CGUtilities.cpp: + * Platform/gtk/RunLoopGtk.cpp: + * Platform/gtk/SharedMemoryGtk.cpp: + * Platform/gtk/WorkQueueGtk.cpp: + * Platform/mac/MachUtilities.cpp: + * Platform/mac/SharedMemoryMac.cpp: + * Platform/mac/WorkQueueMac.cpp: + * Platform/qt/MappedMemoryPool.cpp: + * Platform/qt/ModuleQt.cpp: + * Platform/qt/RunLoopQt.cpp: + * Platform/qt/WorkQueueQt.cpp: + * Platform/win/ModuleWin.cpp: + * Platform/win/RunLoopWin.cpp: + * Platform/win/SharedMemoryWin.cpp: + * Platform/win/WorkQueueWin.cpp: + * PluginProcess/PluginControllerProxy.cpp: + * PluginProcess/PluginProcess.cpp: + * PluginProcess/WebProcessConnection.cpp: + * Scripts/webkit2/messages.py: + * Shared/API/c/WKArray.cpp: + * Shared/API/c/WKCertificateInfo.cpp: + * Shared/API/c/WKContextMenuItem.cpp: + * Shared/API/c/WKData.cpp: + * Shared/API/c/WKDictionary.cpp: + * Shared/API/c/WKError.cpp: + * Shared/API/c/WKImage.cpp: + * Shared/API/c/WKMutableArray.cpp: + * Shared/API/c/WKMutableDictionary.cpp: + * Shared/API/c/WKNumber.cpp: + * Shared/API/c/WKSecurityOrigin.cpp: + * Shared/API/c/WKSerializedScriptValue.cpp: + * Shared/API/c/WKString.cpp: + * Shared/API/c/WKType.cpp: + * Shared/API/c/WKURL.cpp: + * Shared/API/c/WKURLRequest.cpp: + * Shared/API/c/WKURLResponse.cpp: + * Shared/API/c/WKUserContentURLPattern.cpp: + * Shared/API/c/cf/WKStringCF.cpp: + * Shared/API/c/cf/WKURLCF.cpp: + * Shared/API/c/cf/WKURLRequestCF.cpp: + * Shared/API/c/cf/WKURLResponseCF.cpp: + * Shared/API/c/cg/WKImageCG.cpp: + * Shared/API/c/win/WKCertificateInfoWin.cpp: + * Shared/ChildProcess.cpp: + * Shared/ImmutableArray.cpp: + * Shared/ImmutableDictionary.cpp: + * Shared/MutableArray.cpp: + * Shared/MutableDictionary.cpp: + * Shared/OriginAndDatabases.cpp: + * Shared/PlatformPopupMenuData.cpp: + * Shared/Plugins/NPIdentifierData.cpp: + * Shared/Plugins/NPObjectMessageReceiver.cpp: + * Shared/Plugins/NPObjectProxy.cpp: + * Shared/Plugins/NPRemoteObjectMap.cpp: + * Shared/Plugins/NPVariantData.cpp: + * Shared/Plugins/Netscape/NetscapePluginModule.cpp: + * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: + * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: + * Shared/Plugins/PluginProcessCreationParameters.cpp: + * Shared/PrintInfo.cpp: + * Shared/SessionState.cpp: + * Shared/ShareableBitmap.cpp: + * Shared/UpdateInfo.cpp: + * Shared/VisitedLinkTable.cpp: + * Shared/WebBackForwardListItem.cpp: + * Shared/WebContextMenuItem.cpp: + * Shared/WebContextMenuItemData.cpp: + * Shared/WebError.cpp: + * Shared/WebEvent.cpp: + * Shared/WebEventConversion.cpp: + * Shared/WebGeolocationPosition.cpp: + * Shared/WebImage.cpp: + * Shared/WebKeyboardEvent.cpp: + * Shared/WebMemorySampler.cpp: + * Shared/WebMouseEvent.cpp: + * Shared/WebOpenPanelParameters.cpp: + * Shared/WebPageCreationParameters.cpp: + * Shared/WebPageGroupData.cpp: + * Shared/WebPlatformTouchPoint.cpp: + * Shared/WebPopupItem.cpp: + * Shared/WebPreferencesStore.cpp: + * Shared/WebProcessCreationParameters.cpp: + * Shared/WebTouchEvent.cpp: + * Shared/WebURLRequest.cpp: + * Shared/WebURLResponse.cpp: + * Shared/WebWheelEvent.cpp: + * Shared/cairo/ShareableBitmapCairo.cpp: + * Shared/cf/ArgumentCodersCF.cpp: + * Shared/cg/ShareableBitmapCG.cpp: + * Shared/gtk/ShareableBitmapGtk.cpp: + * Shared/gtk/WebCoreArgumentCodersGtk.cpp: + * Shared/mac/CommandLineMac.cpp: + * Shared/mac/UpdateChunk.cpp: + * Shared/qt/CleanupHandler.cpp: + * Shared/qt/NativeWebKeyboardEventQt.cpp: + * Shared/qt/ShareableBitmapQt.cpp: + * Shared/qt/UpdateChunk.cpp: + * Shared/qt/WebCoreArgumentCodersQt.cpp: + * Shared/qt/WebEventFactoryQt.cpp: + * Shared/qt/WebURLRequestQt.cpp: + * Shared/qt/WebURLResponseQt.cpp: + * Shared/win/CommandLineWin.cpp: + * Shared/win/NativeWebKeyboardEventWin.cpp: + * Shared/win/PlatformCertificateInfo.cpp: + * Shared/win/UpdateChunk.cpp: + * Shared/win/WebCoreArgumentCodersWin.cpp: + * Shared/win/WebEventFactory.cpp: + * Shared/win/WebURLRequestWin.cpp: + * Shared/win/WebURLResponseWin.cpp: + * UIProcess/API/C/WKAuthenticationChallenge.cpp: + * UIProcess/API/C/WKAuthenticationDecisionListener.cpp: + * UIProcess/API/C/WKBackForwardList.cpp: + * UIProcess/API/C/WKBackForwardListItem.cpp: + * UIProcess/API/C/WKContext.cpp: + * UIProcess/API/C/WKCredential.cpp: + * UIProcess/API/C/WKDatabaseManager.cpp: + * UIProcess/API/C/WKDownload.cpp: + * UIProcess/API/C/WKFormSubmissionListener.cpp: + * UIProcess/API/C/WKFrame.cpp: + * UIProcess/API/C/WKFramePolicyListener.cpp: + * UIProcess/API/C/WKGeolocationManager.cpp: + * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: + * UIProcess/API/C/WKGeolocationPosition.cpp: + * UIProcess/API/C/WKInspector.cpp: + * UIProcess/API/C/WKNavigationData.cpp: + * UIProcess/API/C/WKOpenPanelParameters.cpp: + * UIProcess/API/C/WKOpenPanelResultListener.cpp: + * UIProcess/API/C/WKPage.cpp: + * UIProcess/API/C/WKPageGroup.cpp: + * UIProcess/API/C/WKPreferences.cpp: + * UIProcess/API/C/WKProtectionSpace.cpp: + * UIProcess/API/C/win/WKContextWin.cpp: + * UIProcess/API/C/win/WKView.cpp: + * UIProcess/API/C/win/WKViewPrivate.cpp: + * UIProcess/API/cpp/qt/WKStringQt.cpp: + * UIProcess/API/cpp/qt/WKURLQt.cpp: + * UIProcess/API/qt/ClientImpl.cpp: + * UIProcess/API/qt/qgraphicswkview.cpp: + * UIProcess/API/qt/qwkcontext.cpp: + * UIProcess/API/qt/qwkpage.cpp: + * UIProcess/API/qt/qwkpreferences.cpp: + * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: + * UIProcess/Authentication/AuthenticationDecisionListener.cpp: + * UIProcess/Authentication/WebCredential.cpp: + * UIProcess/Authentication/WebProtectionSpace.cpp: + * UIProcess/BackingStore.cpp: + * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: + * UIProcess/Downloads/DownloadProxy.cpp: + * UIProcess/DrawingAreaProxy.cpp: + * UIProcess/DrawingAreaProxyImpl.cpp: + * UIProcess/FindIndicator.cpp: + * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: + * UIProcess/GeolocationPermissionRequestProxy.cpp: + * UIProcess/Launcher/ProcessLauncher.cpp: + * UIProcess/Launcher/ThreadLauncher.cpp: + * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: + * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: + * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: + * UIProcess/Launcher/win/ProcessLauncherWin.cpp: + * UIProcess/Launcher/win/ThreadLauncherWin.cpp: + * UIProcess/LayerBackedDrawingAreaProxy.cpp: + * UIProcess/Plugins/PluginInfoStore.cpp: + * UIProcess/Plugins/PluginProcessManager.cpp: + * UIProcess/Plugins/PluginProcessProxy.cpp: + * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: + * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp: + * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: + * UIProcess/ResponsivenessTimer.cpp: + * UIProcess/TiledDrawingAreaProxy.cpp: + * UIProcess/VisitedLinkProvider.cpp: + * UIProcess/WebBackForwardList.cpp: + * UIProcess/WebContext.cpp: + * UIProcess/WebContextInjectedBundleClient.cpp: + * UIProcess/WebContextMenuProxy.cpp: + * UIProcess/WebDatabaseManagerProxy.cpp: + * UIProcess/WebDatabaseManagerProxyClient.cpp: + * UIProcess/WebDownloadClient.cpp: + * UIProcess/WebEditCommandProxy.cpp: + * UIProcess/WebFindClient.cpp: + * UIProcess/WebFormClient.cpp: + * UIProcess/WebFormSubmissionListenerProxy.cpp: + * UIProcess/WebFrameListenerProxy.cpp: + * UIProcess/WebFramePolicyListenerProxy.cpp: + * UIProcess/WebFrameProxy.cpp: + * UIProcess/WebGeolocationManagerProxy.cpp: + * UIProcess/WebGeolocationProvider.cpp: + * UIProcess/WebHistoryClient.cpp: + * UIProcess/WebInspectorProxy.cpp: + * UIProcess/WebLoaderClient.cpp: + * UIProcess/WebNavigationData.cpp: + * UIProcess/WebOpenPanelResultListenerProxy.cpp: + * UIProcess/WebPageContextMenuClient.cpp: + * UIProcess/WebPageGroup.cpp: + * UIProcess/WebPageProxy.cpp: + * UIProcess/WebPolicyClient.cpp: + * UIProcess/WebPreferences.cpp: + * UIProcess/WebProcessManager.cpp: + * UIProcess/WebProcessProxy.cpp: + * UIProcess/WebResourceLoadClient.cpp: + * UIProcess/WebUIClient.cpp: + * UIProcess/cf/WebBackForwardListCF.cpp: + * UIProcess/cf/WebPageProxyCF.cpp: + * UIProcess/cf/WebPreferencesCF.cpp: + * UIProcess/gtk/TextCheckerGtk.cpp: + * UIProcess/gtk/WebInspectorGtk.cpp: + * UIProcess/gtk/WebPageProxyGtk.cpp: + * UIProcess/gtk/WebPreferencesGtk.cpp: + * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: + * UIProcess/qt/TextCheckerQt.cpp: + * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: + * UIProcess/qt/TiledDrawingAreaTileQt.cpp: + * UIProcess/qt/WebContextMenuProxyQt.cpp: + * UIProcess/qt/WebContextQt.cpp: + * UIProcess/qt/WebInspectorProxyQt.cpp: + * UIProcess/qt/WebPageProxyQt.cpp: + * UIProcess/qt/WebPopupMenuProxyQt.cpp: + * UIProcess/qt/WebPreferencesQt.cpp: + * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: + * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: + * UIProcess/win/TextCheckerWin.cpp: + * UIProcess/win/WebContextMenuProxyWin.cpp: + * UIProcess/win/WebContextWin.cpp: + * UIProcess/win/WebInspectorProxyWin.cpp: + * UIProcess/win/WebPageProxyWin.cpp: + * UIProcess/win/WebPopupMenuProxyWin.cpp: + * UIProcess/win/WebView.cpp: + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/Authentication/AuthenticationManager.cpp: + * WebProcess/Downloads/Download.cpp: + * WebProcess/Downloads/DownloadManager.cpp: + * WebProcess/Downloads/cf/DownloadCFNet.cpp: + * WebProcess/Downloads/curl/DownloadCurl.cpp: + * WebProcess/Downloads/qt/DownloadQt.cpp: + * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: + * WebProcess/Geolocation/WebGeolocationManager.cpp: + * WebProcess/InjectedBundle/API/c/WKBundle.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: + * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: + * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp: + * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp: + * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp: + * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: + * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: + * WebProcess/InjectedBundle/InjectedBundle.cpp: + * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp: + * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp: + * WebProcess/InjectedBundle/InjectedBundleClient.cpp: + * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: + * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: + * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: + * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: + * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: + * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: + * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: + * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: + * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: + * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: + * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp: + * WebProcess/Plugins/Netscape/JSNPMethod.cpp: + * WebProcess/Plugins/Netscape/JSNPObject.cpp: + * WebProcess/Plugins/Netscape/NPJSObject.cpp: + * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: + * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: + * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: + * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: + * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: + * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: + * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: + * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: + * WebProcess/Plugins/Plugin.cpp: + * WebProcess/Plugins/PluginProcessConnection.cpp: + * WebProcess/Plugins/PluginProcessConnectionManager.cpp: + * WebProcess/Plugins/PluginProxy.cpp: + * WebProcess/Plugins/PluginView.cpp: + * WebProcess/WebCoreSupport/WebChromeClient.cpp: + * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: + * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: + * WebProcess/WebCoreSupport/WebDragClient.cpp: + * WebProcess/WebCoreSupport/WebEditorClient.cpp: + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: + * WebProcess/WebCoreSupport/WebInspectorClient.cpp: + * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: + * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: + * WebProcess/WebCoreSupport/WebPopupMenu.cpp: + * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: + * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: + * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: + * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp: + * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: + * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: + * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp: + * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: + * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp: + * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: + * WebProcess/WebKitMain.cpp: + * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: + * WebProcess/WebPage/DecoderAdapter.cpp: + * WebProcess/WebPage/DrawingArea.cpp: + * WebProcess/WebPage/DrawingAreaImpl.cpp: + * WebProcess/WebPage/EncoderAdapter.cpp: + * WebProcess/WebPage/FindController.cpp: + * WebProcess/WebPage/LayerBackedDrawingArea.cpp: + * WebProcess/WebPage/PageOverlay.cpp: + * WebProcess/WebPage/TiledDrawingArea.cpp: + * WebProcess/WebPage/WebBackForwardListProxy.cpp: + * WebProcess/WebPage/WebContextMenu.cpp: + * WebProcess/WebPage/WebEditCommand.cpp: + * WebProcess/WebPage/WebFrame.cpp: + * WebProcess/WebPage/WebInspector.cpp: + * WebProcess/WebPage/WebOpenPanelResultListener.cpp: + * WebProcess/WebPage/WebPage.cpp: + * WebProcess/WebPage/WebPageGroupProxy.cpp: + * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: + * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: + * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: + * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: + * WebProcess/WebPage/qt/WebInspectorQt.cpp: + * WebProcess/WebPage/qt/WebPageQt.cpp: + * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp: + * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: + * WebProcess/WebPage/win/WebInspectorWin.cpp: + * WebProcess/WebPage/win/WebPageWin.cpp: + * WebProcess/WebProcess.cpp: + * WebProcess/gtk/WebProcessGtk.cpp: + * WebProcess/gtk/WebProcessMainGtk.cpp: + * WebProcess/qt/WebProcessMainQt.cpp: + * WebProcess/qt/WebProcessQt.cpp: + * WebProcess/win/WebProcessMainWin.cpp: + * WebProcess/win/WebProcessWin.cpp: + * config.h: Copied from Source/WebKit2/WebKit2Prefix.h. + * win/WebKit2Common.vsprops: + +2011-01-27 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Darin Adler. + + execCommand("Paste") doesn't work in WebKitTestRunner + https://bugs.webkit.org/show_bug.cgi?id=52785 + + Thread through the new JavaScriptCanAccessClipboard setting. + + * Shared/WebPreferencesStore.h: + * UIProcess/API/C/WKPreferences.cpp: + (WKPreferencesSetJavaScriptCanAccessClipboard): + (WKPreferencesGetJavaScriptCanAccessClipboard): + * UIProcess/API/C/WKPreferences.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::updatePreferences): + +2011-01-27 Nate Chapin <japhet@chromium.org> + + Reviewed by Adam Barth. + + Use Document::url() instead of FrameLoader::url(). + https://bugs.webkit.org/show_bug.cgi?id=41165 + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): + (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): + (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): + (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): + * WebProcess/WebPage/WebFrame.cpp: + (WebKit::WebFrame::url): + +2011-01-27 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Encode/Decode hasPreciseScrollingDeltas bit in WebWheelEvent + https://bugs.webkit.org/show_bug.cgi?id=53254 + + * Shared/WebWheelEvent.cpp: + (WebKit::WebWheelEvent::WebWheelEvent): + Initialize m_phase and m_hasPreciseScrollingDeltas. + + (WebKit::WebWheelEvent::encode): + (WebKit::WebWheelEvent::decode): + Add missing coding for m_hasPreciseScrollingDeltas. + +2011-01-26 Enrica Casucci <enrica@apple.com> + + Reviewed by Darin Adler and Adam Roben. + + WebKit2: add support for drag and drop on Windows + https://bugs.webkit.org/show_bug.cgi?id=52775 + <rdar://problem/8514409> + + On Windows the access to the content being dragged is + provided via the IDataObject interface that is made available + to the window that registers itself as drop target. + Since this interface cannot be accessed from the WebProcess, + in every call to one of the methods of the IDropTarget interface + we serialize the content of the drag clipboard and send it over to + the WebProcess. The implementation uses the same messages as the + Mac one, with slightly different parameters to pass the serialized + clipboard. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::performDragControllerAction): Added Windows + specific implementation. + * UIProcess/WebPageProxy.h: + * UIProcess/win/WebView.cpp: + (WebKit::WebView::WebView): Added dropTargetHelper object creation. + (WebKit::WebView::initialize): Added to register for drag/drop with out + refcount issues. + (WebKit::WebView::close): + (WebKit::WebView::windowReceivedMessage): + (WebKit::WebView::QueryInterface): + (WebKit::WebView::AddRef): + (WebKit::WebView::Release): + (WebKit::dragOperationToDragCursor): + (WebKit::WebView::keyStateToDragOperation): + (WebKit::WebView::DragEnter): + (WebKit::WebView::DragOver): + (WebKit::WebView::DragLeave): + (WebKit::WebView::Drop): + * UIProcess/win/WebView.h: + (WebKit::WebView::create): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::performDragControllerAction): + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + +2011-01-26 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=53197 + <rdar://problem/8895682> Make WebKit2 printing asynchronous + + <rdar://problem/8899988> REGRESSION(WebKit2): Attempting to print WHATWG HTML spec shows + 1-page blank preview + + <rdar://problem/8900078> WebKit2 printing has a separate message exchange per page when + printing instead of printing all at once + + * UIProcess/API/mac/WKPrintingView.h: Store a lot more cached information. + + * UIProcess/API/mac/WKPrintingView.mm: + (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use PrintOperation stored in + class. We generally want that now, because current operation will not be set up on other threads. + (-[WKPrintingView _isPrintingPreview]): Added. Preview is different, because it can draw + a placeholder - but actual printing need to wait until UI process has data. + (-[WKPrintingView _updatePreview]): Force AppKit to update print preview when we have real + data to replace placeholder with. + (-[WKPrintingView _hasPageRects]): Return if page rects have already been computed. + (-[WKPrintingView _expectedPreviewCallbackForRect:]): Find an existing request for this rect, + if any. + (pageDidDrawToPDF): Update preview - or if actually printing, release control to printing thread. + (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ask for a PDF document with + pages the user asked to print. + (pageDidComputePageRects): When web process returns page geometry data, we update preview to display + a page count (which indirectly triggers a request for a preview). When actually printing, + request a PDF right away, we'll need it later. + (-[WKPrintingView _askPageToComputePageRects]): Ask web process for page geometry. + (prepareDataForPrintingOnSecondaryThread): This function starts preparing all data necessary + for actual printing on main thread. + (-[WKPrintingView knowsPageRange:]): Changed to be async for preview, and to call main + thread for actual printing. + (-[WKPrintingView _pageForRect:]): Find page number for a given range, assuming that AppKit + always asks for full pages. + (-[WKPrintingView _drawPDFDocument:page:atPoint:]): A helper function to draw a PDF document. + (-[WKPrintingView _drawPreview:]): Draw the whole page for preview. + (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): + Draw the whole page for actual printing. + (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): Call drawPageBorderWithSize: with + correct graphics context and print operation. + (-[WKPrintingView drawPageBorderWithSize:]): Delegate work to main thread when called from a + secondary one. + (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]): Added an assertion that + our stored NSPrintOperation isn't out of sync with reality. + (-[WKPrintingView rectForPage:]): Handle the case where we don't have the data yet, drawing + a placeholder. + (-[WKPrintingView endDocument]): When page setup changes, we must reset all state. + + * UIProcess/API/mac/WKView.mm: (-[WKView printOperationWithPrintInfo:forFrame:]): Tell + NSPrintingView which operation it's serving, so that it knows it even when current operation + isn't set. + + * UIProcess/GenericCallback.h: + (WebKit::ComputedPagesCallback::create): + (WebKit::ComputedPagesCallback::~ComputedPagesCallback): + (WebKit::ComputedPagesCallback::performCallbackWithReturnValue): + (WebKit::ComputedPagesCallback::invalidate): + (WebKit::ComputedPagesCallback::callbackID): + (WebKit::ComputedPagesCallback::generateCallbackID): + (WebKit::ComputedPagesCallback::ComputedPagesCallback): + Added ComputedPagesCallback, which returns a vector of IntRects and a double. Hopefully, + it will become a specialization of GenericCallback one day. + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::close): Added m_voidCallbacks - it looks like they were omitted + by accident. + (WebKit::WebPageProxy::computedPagesCallback): Added. + (WebKit::WebPageProxy::processDidCrash): Added m_computedPagesCallbacks. + (WebKit::WebPageProxy::computePagesForPrinting): Async now! + (WebKit::WebPageProxy::drawRectToPDF): Ditto. + (WebKit::WebPageProxy::drawPagesToPDF): Added. + * UIProcess/WebPageProxy.h: + + * UIProcess/WebPageProxy.messages.in: Added ComputedPagesCallback. + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::beginPriting): Compute page rects right away - we'll need them in + drawPagesToPDF(), which doesn't have a PrintInfo. + (WebKit::WebPage::computePagesForPrinting): Send async response. + (WebKit::WebPage::drawRectToPDF): This function used to draw into original + location at frame coordinates, and now it draws at (0, 0). + (WebKit::WebPage::drawPagesToPDF): Added - make a multi-page PDF. + * WebProcess/WebPage/WebPage.h: + + * WebProcess/WebPage/WebPage.messages.in: Added DrawPagesToPDF. + +2011-01-27 Alejandro G. Castro <alex@igalia.com> + + Unreviewed GTK build fix after r76797. + + * Shared/WebPreferencesStore.h: Use Qt fonts preference for the moment. + +2011-01-27 Dan Bernstein <mitz@apple.com> + + Reviewed by Anders Carlsson. + + Allow pop-up menus to contain multiple items that have the same title. + + * UIProcess/mac/WebPopupMenuProxyMac.mm: + (WebKit::WebPopupMenuProxyMac::populate): Set the item’s title after adding it rather than + when adding it, so that it will not replace any existing item with the same title. + +2011-01-27 Andreas Kling <kling@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt][WK2] Add QWKPage APIs regarding engine process availability + https://bugs.webkit.org/show_bug.cgi?id=53237 + + QWKPage will now emit engineConnected() and engineDisconnected() + when the web process crashes and is relaunched respectively. + + Also added QWKPage::isConnectedToEngine() for convenience. + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::QWKPagePrivate): + (QWKPagePrivate::didRelaunchProcess): + (QWKPagePrivate::processDidCrash): + (QWKPage::isConnectedToEngine): + * UIProcess/API/qt/qwkpage.h: + * UIProcess/API/qt/qwkpage_p.h: + +2011-01-27 Balazs Kelemen <kbalazs@webkit.org> + + Reviewed by Andreas Kling. + + [Qt][WK2] Lots of layout test failures due to wrong font type + https://bugs.webkit.org/show_bug.cgi?id=53233 + + * Shared/WebPreferencesStore.h: + Specialize default font families for Qt. + +2011-01-26 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Dan Bernstein. + + WebKitTestRunner needs to support layoutTestController.evaluateInWebInspector + https://bugs.webkit.org/show_bug.cgi?id=42319 + + Add WKBundleInspector and APIs needed to implement WebKitTestRunner APIs. + + * GNUmakefile.am: + * Shared/API/c/WKBase.h: + * Shared/APIObject.h: + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: + * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: Added. + (WKBundleInspectorGetTypeID): + (WKBundleInspectorShow): + (WKBundleInspectorClose): + (WKBundleInspectorEvaluateScriptForTest): + (WKBundleInspectorSetPageProfilingEnabled): + * WebProcess/InjectedBundle/API/c/WKBundleInspector.h: Added. + * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: + (WKBundlePageGetInspector): + * WebProcess/InjectedBundle/API/c/WKBundlePage.h: + * WebProcess/WebPage/WebInspector.cpp: + (WebKit::WebInspector::create): + (WebKit::WebInspector::evaluateScriptForTest): + * WebProcess/WebPage/WebInspector.h: + (WebKit::WebInspector::type): + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::inspector): + * WebProcess/WebPage/WebPage.h: + * win/WebKit2.vcproj: + * win/WebKit2Generated.make: + +2011-01-26 David Kilzer <ddkilzer@apple.com> + + <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork + <rdar://problem/8821760> + + Reviewed by Antti Koivisto. + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): Added initialization for + GetHTTPPipeliningPriority and SetHTTPPipeliningPriority. + +2011-01-26 Beth Dakin <bdakin@apple.com> + + Reviewed by Darin Adler. + + Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics + when using WKScrollbars. + + * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-01-26 Sam Weinig <sam@webkit.org> + + Reviewed by Maciej Stachowiak. + + Add events to represent the start/end of a gesture scroll + https://bugs.webkit.org/show_bug.cgi?id=53215 + + * Scripts/webkit2/messages.py: + * Shared/WebEvent.h: + (WebKit::WebGestureEvent::WebGestureEvent): + (WebKit::WebGestureEvent::position): + (WebKit::WebGestureEvent::globalPosition): + * Shared/WebEventConversion.cpp: + (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): + (WebKit::platform): + * Shared/WebEventConversion.h: + * Shared/WebGestureEvent.cpp: Added. + (WebKit::WebGestureEvent::WebGestureEvent): + (WebKit::WebGestureEvent::encode): + (WebKit::WebGestureEvent::decode): + (WebKit::WebGestureEvent::isGestureEventType): + * Shared/mac/WebEventFactory.h: + * Shared/mac/WebEventFactory.mm: + (WebKit::gestureEventTypeForEvent): + (WebKit::WebEventFactory::createWebGestureEvent): + * UIProcess/API/mac/WKView.mm: + (-[WKView shortCircuitedEndGestureWithEvent:]): + (-[WKView beginGestureWithEvent:]): + (-[WKView viewDidMoveToWindow]): + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::handleGestureEvent): + (WebKit::WebPageProxy::didReceiveEvent): + * UIProcess/WebPageProxy.h: + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::handleGestureEvent): + (WebKit::WebPage::gestureEvent): + * WebProcess/WebPage/WebPage.h: + * WebProcess/WebPage/WebPage.messages.in: + Pipe gesture events down to WebCore. + +2011-01-26 Dan Bernstein <mitz@apple.com> + + Reviewed by Dave Hyatt. + + <rdar://problem/8446709> Allow inter-ideograph justification for CJK + https://bugs.webkit.org/show_bug.cgi?id=53184 + + * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: + (WebKit::WebPopupMenu::setUpPlatformData): Added a TrailingExpansionBehavior parameter to the + RenderText constructor. + +2011-01-26 Jing Jin <jjin@apple.com> + + Reviewed by Darin Adler. + + Methods to temporarily disable size updates to the page drawing area in WKView. + https://bugs.webkit.org/show_bug.cgi?id=53206 + Part of <rdar://problem/8818585> + + * UIProcess/API/mac/WKView.h: Added _frameSizeUpdateDisabledCount. + * UIProcess/API/mac/WKView.mm: + (-[WKView setFrameSize:]): Only update page size if frame size updates are enabled. + (-[WKView _setDrawingAreaSize:]): Helper method to set the page's drawing area's size. + (-[WKView disableFrameSizeUpdates]): Increment _frameSizeUpdateDisabledCount + (-[WKView enableFrameSizeUpdates]): Decrement _frameSizeUpdateDisabledCount, and if the count is 0, meaning + that no one is disabling frame size updates anymore, update the drawing area's size to match the current frame. + (-[WKView frameSizeUpdatesDisabled]): Returns YES if at least one caller is disabling frame size updates. + * UIProcess/API/mac/WKViewInternal.h: Declared -disableFrameSizeUpdates, -enableFrameSizeUpdates, and -frameSizeUpdatesDisabled. + * UIProcess/API/mac/WKViewPrivate.h: Added. + * WebKit2.xcodeproj/project.pbxproj: Added WKViewPrivate.h + +2011-01-26 Jing Jin <jjin@apple.com> + + Rubber-stamped by Dan Bernstein. + + Several WKView Internal category methods are implemented in the main category. + https://bugs.webkit.org/show_bug.cgi?id=53195 + + * UIProcess/API/mac/WKView.mm: + (-[WKView _setEventBeingResent:]): Moved into implementation of WKView (Internal). + (-[WKView _interceptKeyEvent:]): Moved into implementation of WKView (Internal). + (-[WKView _getTextInputState:selectionEnd:underlines:WebCore::]): Moved into implementation of WKView (Internal). + (-[WKView _setAccessibilityChildToken:]): Moved into implementation of WKView (Internal). + +2011-01-26 Brian Weinstein <bweinstein@apple.com> + + Reviewed by John Sullivan. + + WebKit2: Need API to get the frame load state of a BundleFrame + https://bugs.webkit.org/show_bug.cgi?id=53193 + + * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: + (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state. + * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: + +2011-01-25 Brian Weinstein <bweinstein@apple.com> + + Reviewed by Antti Koivisto. + + Crashes loading pages when cancelling subresource loads through WebKit + https://bugs.webkit.org/show_bug.cgi?id=53123 + <rdar://problem/8914361> + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): If our URL is null, return early instead of dispatching + a message. + +2011-01-25 Chris Fleizach <cfleizach@apple.com> + + Reviewed by Darin Adler. + + WK2 leaks when a page is closed + https://bugs.webkit.org/show_bug.cgi?id=53100 + + Allow the WKView a chance to clean up on a page close. In this case, + cleaning up means removing the references the accessibility token has + to the window. + + * UIProcess/API/mac/PageClientImpl.h: + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::pageClosed): + * UIProcess/API/mac/WKView.mm: + (-[WKView _setRemoteAccessibilityWindow:]): + (-[WKView _setAccessibilityChildToken:]): + (-[WKView _processDidCrash]): + (-[WKView _pageClosed]): + * UIProcess/API/mac/WKViewInternal.h: + * UIProcess/API/qt/qwkpage_p.h: + (QWKPagePrivate::pageClosed): + * UIProcess/PageClient.h: + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::close): + * UIProcess/win/WebView.cpp: + (WebKit::WebView::pageClosed): + * UIProcess/win/WebView.h: + +2011-01-25 Chris Marrin <cmarrin@apple.com> + + Reviewed by Adam Roben. + + Expose WebGL flag set/get in WK2 + https://bugs.webkit.org/show_bug.cgi?id=53096 + + * Shared/WebPreferencesStore.h: + * UIProcess/API/C/WKPreferences.cpp: + (WKPreferencesSetWebGLEnabled): + (WKPreferencesGetWebGLEnabled): + * UIProcess/API/C/WKPreferencesPrivate.h: + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::updatePreferences): + +2011-01-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Adam Roben. + + Add and implement LayerTreeHost::scheduleLayerFlush + https://bugs.webkit.org/show_bug.cgi?id=53135 + + * WebKit2.xcodeproj/project.pbxproj: + Add LayerTreeHostMac.mm. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::scheduleCompositingLayerSync): + Call LayerTreeHost::scheduleLayerFlush. + + * WebProcess/WebPage/LayerTreeHost.cpp: + (WebKit::LayerTreeHost::~LayerTreeHost): + Call platformInvalidate(). + + (WebKit::LayerTreeHost::flushPendingLayerChanges): + Rename from syncCompositingLayers. + + * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added. + (WebKit::LayerTreeHost::scheduleLayerFlush): + Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm + + (WebKit::LayerTreeHost::platformInvalidate): + Invalidate the run loop observer. + + (WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback): + Call flushPendingChanges() and remove the run loop observer if it succeeded. + +2011-01-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Simon Fraser. + + Add LayerTreeHost class + https://bugs.webkit.org/show_bug.cgi?id=53132 + + * WebKit2.xcodeproj/project.pbxproj: + Add LayerTreeHost files. + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::DrawingAreaImpl): + Initialize m_layerTreeHost. + + (WebKit::DrawingAreaImpl::setRootCompositingLayer): + Call the m_layerTreeHost. + + * WebProcess/WebPage/LayerTreeHost.cpp: Added. + (WebKit::LayerTreeHost::attachRootCompositingLayer): + (WebKit::LayerTreeHost::detachRootCompositingLayer): + Add stubbed out functions. + + (WebKit::LayerTreeHost::syncCompositingLayers): + Sync the compositing layers in the main frame. + + * WebProcess/WebPage/LayerTreeHost.h: Added. + +2011-01-25 Steve Falkenburg <sfalken@apple.com> + + Rubber-stamped by Adam Roben. + + Windows production build fix. + Use correct environment variable escaping + + * win/WebKit2.make: + * win/WebKit2Generated.make: + +2011-01-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Don't inform the UI process about compositing changes when using the new drawing area + https://bugs.webkit.org/show_bug.cgi?id=53120 + + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::changeAcceleratedCompositingMode): + Return early if we're using the new drawing area. + + (WebKit::WebPage::exitAcceleratedCompositingMode): + Call setRootCompositingLayer(0) so the drawing area knows when we leave accelerated compositing. + +2011-01-25 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Pipe a timestamp down into the PlatformWheelEvent for the Mac. + https://bugs.webkit.org/show_bug.cgi?id=53111 + + * Shared/WebEventConversion.cpp: + (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): + Assign the timestamp. + +2011-01-25 Sam Weinig <sam@webkit.org> + + Reviewed by Anders Carlsson. + + Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac. + https://bugs.webkit.org/show_bug.cgi?id=53107 + + * Shared/WebEvent.h: + (WebKit::WebWheelEvent::hasPreciseScrollingDeltas): + * Shared/WebEventConversion.cpp: + (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): + * Shared/WebWheelEvent.cpp: + (WebKit::WebWheelEvent::WebWheelEvent): + * Shared/mac/WebEventFactory.mm: + (WebKit::WebEventFactory::createWebWheelEvent): + +2011-01-25 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + need a way to request the host CALayer render server port + https://bugs.webkit.org/show_bug.cgi?id=53101 + <rdar://problem/8913620> + + * PluginProcess/PluginControllerProxy.cpp: + (WebKit::PluginControllerProxy::compositingRenderServerPort): + Get the render server port from the plug-in process. + + * PluginProcess/PluginControllerProxy.h: + * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: + (WebKit::NPN_GetValue): + Call NetscapePlugin::compositingRenderServerPort. + + * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: + (WebKit::NetscapePlugin::compositingRenderServerPort): + Call PluginController::compositingRenderServerPort. + + * WebProcess/Plugins/PluginView.cpp: + (WebKit::PluginView::compositingRenderServerPort): + Get the render server port from the web process. + + * WebProcess/Plugins/PluginView.h: + Add compositingRenderServerPort. + +2011-01-25 Maciej Stachowiak <mjs@apple.com> + + Rubber stamped by Dan Bernstein. + + Change some floating point constants from 1.0 to 1. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): + +2011-01-25 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Anders Carlsson. + + Improve scale factor resetting + https://bugs.webkit.org/show_bug.cgi?id=53093 + + Two key changes: + - Don't set the scale factor to what it already is, as this causes an + uneeded force layout and scroll + - Don't ever set the scale factor based on a non-main frame committing + + This fixes two WebKit2 layout tests. + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): + +2011-01-24 Chris Marrin <cmarrin@apple.com> + + Reviewed by Eric Seidel. + + Change ENABLE_3D_CANVAS to ENABLE_WEBGL + https://bugs.webkit.org/show_bug.cgi?id=53041 + + * Configurations/FeatureDefines.xcconfig: + +2011-01-25 Andreas Kling <kling@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt][WK2] Add QWKPage::processCrashed() signal + https://bugs.webkit.org/show_bug.cgi?id=53076 + + * UIProcess/API/qt/qwkpage.cpp: + (QWKPagePrivate::processDidCrash): + * UIProcess/API/qt/qwkpage.h: + * UIProcess/API/qt/qwkpage_p.h: + +2011-01-24 Anders Carlsson <andersca@apple.com> + + Fix build. + + * WebProcess/mac/WebProcessMac.mm: + (WebKit::initializeSandbox): + +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. + +2011-01-24 Maciej Stachowiak <mjs@apple.com> + + Reviewed by Anders Carlsson. + + Use designated temp directory for the database for WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=53052 + + Add the API necessary to support this. Database path is now + determined on the UI process side and passed to the Web process. + Reviewed by Anders Carlsson. + + * GNUmakefile.am: + * Shared/WebProcessCreationParameters.cpp: + (WebKit::WebProcessCreationParameters::encode): + (WebKit::WebProcessCreationParameters::decode): + * Shared/WebProcessCreationParameters.h: + * UIProcess/API/C/WKContext.cpp: + (WKContextSetDatabaseDirectory): + * UIProcess/API/C/WKContextPrivate.h: + * UIProcess/WebContext.cpp: + (WebKit::WebContext::ensureWebProcess): + (WebKit::WebContext::databaseDirectory): + * UIProcess/WebContext.h: + (WebKit::WebContext::setDatabaseDirectory): + * UIProcess/mac/WebContextMac.mm: + (WebKit::WebContext::platformDefaultDatabaseDirectory): + * UIProcess/qt/WebContextQt.cpp: + (WebKit::WebContext::platformDefaultDatabaseDirectory): + * UIProcess/win/WebContextWin.cpp: + (WebKit::WebContext::platformDefaultDatabaseDirectory): + * WebKit2.pro: + * WebKit2.xcodeproj/project.pbxproj: + * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: + (WebKit::WebDatabaseManager::initialize): + (WebKit::WebDatabaseManager::WebDatabaseManager): + * WebProcess/WebCoreSupport/WebDatabaseManager.h: + * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed. + * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed. + * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed. + * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed. + * WebProcess/WebProcess.cpp: + (WebKit::WebProcess::WebProcess): + (WebKit::WebProcess::initializeWebProcess): + * WebProcess/com.apple.WebProcess.sb: + * WebProcess/mac/WebProcessMac.mm: + (WebKit::initializeSandbox): + * win/WebKit2.vcproj: + +2011-01-24 Brent Fulgham <bfulgham@webkit.org> + + Unreviewed build fix. + + * win/WebKit2.vcproj: Don't build the CG Utilities when building + without CG support. + +2011-01-24 Anders Carlsson <andersca@apple.com> + + Reviewed by John Sullivan. + + Don't use the timeout checker for non-user-interaction messages + https://bugs.webkit.org/show_bug.cgi?id=53046 + + * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: + (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize): + (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize): + * UIProcess/LayerBackedDrawingAreaProxy.cpp: + (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange): + (WebKit::LayerBackedDrawingAreaProxy::didSetSize): + +2011-01-24 Adam Roben <aroben@apple.com> + + Windows Production build fix + + * win/WebKit2.make: Update for move of WebKit2 into Source. + +2011-01-24 Jessie Berlin <jberlin@apple.com> + + Reviewed by Adam Roben. + + WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled + https://bugs.webkit.org/show_bug.cgi?id=53029 + + * UIProcess/win/TextCheckerWin.cpp: + Disable the warnings for this file. + +2011-01-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Wait for half a second if we're asked to paint when receiving a DidSetSize message + https://bugs.webkit.org/show_bug.cgi?id=53028 + + * UIProcess/DrawingAreaProxyImpl.cpp: + (WebKit::DrawingAreaProxyImpl::paint): + +2011-01-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Implement forceRedisplay in the new drawing area + https://bugs.webkit.org/show_bug.cgi?id=53026 + + * WebProcess/WebPage/DrawingAreaImpl.cpp: + (WebKit::DrawingAreaImpl::forceRepaint): + * WebProcess/WebPage/DrawingAreaImpl.h: + +2011-01-24 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Fill unpainted rects with the background color. + https://bugs.webkit.org/show_bug.cgi?id=53025 + + * UIProcess/API/mac/WKView.mm: + (drawPageBackground): + Add new helper function. + + (-[WKView drawRect:]): + Iterate over the unpainted rects and fill them with the background color. + +2011-01-24 Dan Bernstein <mitz@apple.com> + + Reviewed by John Sullivan. + + WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a resize cursor when moving mouse from scrolled email to the horizontal splitter + + * UIProcess/API/mac/PageClientImpl.mm: + (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it. + +2011-01-24 Balazs Kelemen <kbalazs@webkit.org> + + Rubber-stamped by Csaba Osztrogonác. + + Typo fix. + + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: + (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place. + +2011-01-24 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove CleanupHandler by passing file descriptors. + + Deleting files in signal handler of UI process is not a good idea, + because the memory where filenames are stored might not be valid + after a crash. + + To avoid the need of using signal handlers for cleanup, + change following: + 1) Avoid passing filenames between processes, pass fds + 2) When mmap'ing files, delete them immediately after + opening and mmap'ing them. + 3) Pass sockets with fds during fork+exec instead of + passing them via the filesystem. + 4) Use mmap'ed files for implementation of SharedMemory. + QSharedMemory does not support cleanup correctly. + + Consquences: + - Move MappedMemory to SharedMemory, make UpdateChunk use this. + - Implement CoreIPC::Attachment using mmaped files. + - Send messages using datagram socket. This solution works + similiarly to Mach ports on Mac. + - Send big messages out-of-line and thus avoid increasing + the receive buffer. + - Remove MemoryMappedPool and rely on libc/kernel caching + of mmapped areas. + - Unmap memory areas after use. + - When UI process crashes, kill the web process using SIGKILL. + This is possible again because cleanup handler is not needed. + + [WK2][Qt] Multiple problems with MemoryMappedPool + https://bugs.webkit.org/show_bug.cgi?id=51984 + + * Platform/CoreIPC/Attachment.cpp: + (CoreIPC::Attachment::Attachment): + * Platform/CoreIPC/Attachment.h: + (CoreIPC::Attachment::size): + (CoreIPC::Attachment::releaseFileDescriptor): + (CoreIPC::Attachment::fileDescriptor): + * Platform/CoreIPC/Connection.h: + * Platform/CoreIPC/qt/ConnectionQt.cpp: + (CoreIPC::MessageInfo::MessageInfo): + (CoreIPC::MessageInfo::setMessageBodyOOL): + (CoreIPC::MessageInfo::isMessageBodyOOL): + (CoreIPC::MessageInfo::bodySize): + (CoreIPC::MessageInfo::messageID): + (CoreIPC::MessageInfo::attachmentCount): + (CoreIPC::Connection::platformInitialize): + (CoreIPC::Connection::platformInvalidate): + (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard): + (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard): + (CoreIPC::Connection::readyReadHandler): + (CoreIPC::Connection::open): + (CoreIPC::Connection::platformCanSendOutgoingMessages): + (CoreIPC::Connection::sendOutgoingMessage): + * Platform/SharedMemory.h: + * Platform/WorkQueue.h: + * Platform/qt/MappedMemoryPool.cpp: Removed. + * Platform/qt/MappedMemoryPool.h: Removed. + * Platform/qt/SharedMemoryQt.cpp: + (WebKit::SharedMemory::Handle::Handle): + (WebKit::SharedMemory::Handle::~Handle): + (WebKit::SharedMemory::Handle::isNull): + (WebKit::SharedMemory::Handle::encode): + (WebKit::SharedMemory::Handle::decode): + (WebKit::SharedMemory::Handle::releaseToAttachment): + (WebKit::SharedMemory::Handle::adoptFromAttachment): + (WebKit::SharedMemory::create): + (WebKit::accessModeMMap): + (WebKit::SharedMemory::~SharedMemory): + (WebKit::accessModeFile): + (WebKit::SharedMemory::createHandle): + * Platform/qt/WorkQueueQt.cpp: + (WorkQueue::registerSocketEventHandler): + * Shared/qt/UpdateChunk.cpp: + (WebKit::UpdateChunk::UpdateChunk): + (WebKit::UpdateChunk::~UpdateChunk): + (WebKit::UpdateChunk::encode): + (WebKit::UpdateChunk::decode): + (WebKit::UpdateChunk::createImage): + * Shared/qt/UpdateChunk.h: + * UIProcess/Launcher/ProcessLauncher.h: + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: + (WebKit::QtWebProcess::QtWebProcess): + (WebKit::QtWebProcess::setupChildProcess): + (WebKit::ProcessLauncher::launchProcess): + (WebKit::ProcessLauncher::platformInvalidate): + * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: + (WebKit::webThreadBody): + (WebKit::ThreadLauncher::createWebThread): + * WebKit2.pro: + * WebProcess/qt/WebProcessMainQt.cpp: + (WebKit::WebProcessMainQt): + +2011-01-24 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + [Qt] Move project files into Source + https://bugs.webkit.org/show_bug.cgi?id=52891 + + * DerivedSources.pro: + * WebKit2.pro: + * WebProcess.pro: + +2011-01-23 Damian Kaleta <dkaleta@apple.com> + + Reviewed by Kevin Decker. + + <rdar://problem/8905171> + https://bugs.webkit.org/show_bug.cgi?id=52985 + + * UIProcess/WebPageProxy.cpp: + (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it + consistent with WebKit1. + +2011-01-23 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=52968 + Use a separate NSView for printing + + Also addresses <rdar://problem/8900148> Improper check for + -[NSGraphicsContext currentContextDrawingToScreen] + + * UIProcess/API/mac/WKPrintingView.h: Added. + * UIProcess/API/mac/WKPrintingView.mm: Added. + (-[WKPrintingView initWithFrameProxy:]): + (-[WKPrintingView isFlipped]): + (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): + (-[WKPrintingView knowsPageRange:]): + (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): + (-[WKPrintingView drawPageBorderWithSize:]): + (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]): + (-[WKPrintingView rectForPage:]): + * UIProcess/API/mac/WKView.mm: + (-[WKView drawRect:]): + (-[WKView canChangeFrameLayout:]): + (-[WKView printOperationWithPrintInfo:forFrame:]): + * WebKit2.xcodeproj/project.pbxproj: + Moved printing code to a separate view, simplifying as appropriate. The view is currently not + referenced by anything in WebKit2 directly, being owned by NSPrintOperation. + +2011-01-22 Anders Carlsson <andersca@apple.com> + + Reviewed by Sam Weinig. + + Transparent windows with compositing WebKit2 content show garbage + https://bugs.webkit.org/show_bug.cgi?id=52966 + <rdar://problem/8765051> + + * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: + (WebKit::LayerBackedDrawingAreaProxy::paint): + If the WKView should draw transparent background, do so. + +2011-01-22 Anders Carlsson <andersca@apple.com> + + 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. + +2011-01-21 Nikolas Zimmermann <nzimmermann@rim.com> + + Reviewed by Dirk Schulze. + + Introduce FontMetrics abstraction + https://bugs.webkit.org/show_bug.cgi?id=51456 + + * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics. + (WebKit::WebPopupMenu::setUpPlatformData): + +2011-01-22 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=52950 + Leak in WebPage::drawRectToPDF + + * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too. + +2011-01-22 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=52951 + WebKit2 generates a bad PDF for cross process messaging + + * UIProcess/API/mac/WKView.mm: + (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]): + Use a correct offset when flipping. + +2011-01-21 Alexey Proskuryakov <ap@apple.com> + + Reviewed by Dan Bernstein. + + https://bugs.webkit.org/show_bug.cgi?id=52943 + Objective-C files should use #import, not #include + + * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and + there is more than one WKView.h. + + * Platform/mac/ModuleMac.mm: + * Platform/mac/RunLoopMac.mm: + * PluginProcess/mac/PluginControllerProxyMac.mm: + * PluginProcess/mac/PluginProcessMac.mm: + * PluginProcess/mac/PluginProcessMainMac.mm: + * Shared/API/c/mac/WKCertificateInfoMac.mm: + * Shared/API/c/mac/WKURLRequestNS.mm: + * Shared/API/c/mac/WKURLResponseNS.mm: + * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: + * Shared/mac/PlatformCertificateInfo.mm: + * Shared/mac/SandboxExtensionMac.mm: + * Shared/mac/WebCoreArgumentCodersMac.mm: + * Shared/mac/WebMemorySampler.mac.mm: + * Shared/mac/WebURLRequestMac.mm: + * Shared/mac/WebURLResponseMac.mm: + * UIProcess/API/mac/FindIndicatorWindow.mm: + * UIProcess/API/mac/WKTextInputWindowController.mm: + * UIProcess/Launcher/mac/ProcessLauncherMac.mm: + * UIProcess/Launcher/mac/ThreadLauncherMac.mm: + * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: + * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: + * UIProcess/mac/BackingStoreMac.mm: + * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: + * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: + * UIProcess/mac/TextCheckerMac.mm: + * UIProcess/mac/WebContextMac.mm: + * UIProcess/mac/WebContextMenuProxyMac.mm: + * UIProcess/mac/WebPageProxyMac.mm: + * UIProcess/mac/WebPopupMenuProxyMac.mm: + * UIProcess/mac/WebPreferencesMac.mm: + * WebProcess/Downloads/mac/DownloadMac.mm: + * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: + * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: + * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: + * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: + * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: + * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: + * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: + * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: + * WebProcess/WebPage/mac/WebPageMac.mm: + * WebProcess/mac/WebProcessMac.mm: + +2011-01-21 Mark Rowe <mrowe@apple.com> + + Reviewed by Sam Weinig. + + Fix the WebKit2 build with clang. + + * Scripts/webkit2/messages.py: Add some more structs to the list. + * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class. + * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct. + * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct. + * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to + functions expecting NSString* without generating warnings. + * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct. + * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class. + * WebProcess/WebPage/WebPage.cpp: + (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of + the if statement to suppress a warning. + 2011-01-21 Brian Weinstein <bweinstein@apple.com> Reviewed by Adam Roben. |