1. 25 Jan, 2011 3 commits
    • mjs@apple.com's avatar
      2011-01-25 Maciej Stachowiak <mjs@apple.com> · 5c43b871
      mjs@apple.com authored
              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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c43b871
    • cmarrin@apple.com's avatar
      2011-01-24 Chris Marrin <cmarrin@apple.com> · 8b28bbc8
      cmarrin@apple.com authored
              Reviewed by Eric Seidel.
      
              Change ENABLE_3D_CANVAS to ENABLE_WEBGL
              https://bugs.webkit.org/show_bug.cgi?id=53041
      
              * configure.ac:
      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-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
      
              * WebKit.gyp:
              * features.gypi:
              * src/Extensions3DChromium.cpp:
              * src/GraphicsContext3DChromium.cpp:
              * src/WebRuntimeFeatures.cpp:
              (WebKit::WebRuntimeFeatures::enableWebGL):
              (WebKit::WebRuntimeFeatures::isWebGLEnabled):
      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
      
              * Api/qwebsettings.cpp:
              (QWebSettingsPrivate::apply):
      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
      
              * WebView.cpp:
              (WebView::notifyPreferencesChanged):
      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-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:
              * DerivedSources.cpp:
              * GNUmakefile.am:
              * WebCore.pro:
              * bindings/generic/RuntimeEnabledFeatures.h:
              * bindings/js/JSArrayBufferCustom.cpp:
              * bindings/js/JSCanvasRenderingContextCustom.cpp:
              (WebCore::toJS):
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDataViewCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSFloat32ArrayCustom.cpp:
              * bindings/js/JSHTMLCanvasElementCustom.cpp:
              (WebCore::JSHTMLCanvasElement::getContext):
              * bindings/js/JSInt16ArrayCustom.cpp:
              * bindings/js/JSInt32ArrayCustom.cpp:
              * bindings/js/JSInt8ArrayCustom.cpp:
              * bindings/js/JSUint16ArrayCustom.cpp:
              * bindings/js/JSUint32ArrayCustom.cpp:
              * bindings/js/JSUint8ArrayCustom.cpp:
              * bindings/js/JSWebGLRenderingContextCustom.cpp:
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              (WebCore::JSXMLHttpRequest::markChildren):
              (WebCore::JSXMLHttpRequest::send):
              (WebCore::JSXMLHttpRequest::response):
              * bindings/v8/custom/V8ArrayBufferCustom.cpp:
              * bindings/v8/custom/V8ArrayBufferViewCustom.h:
              * bindings/v8/custom/V8DataViewCustom.cpp:
              * bindings/v8/custom/V8DocumentCustom.cpp:
              (WebCore::V8Document::getCSSCanvasContextCallback):
              * bindings/v8/custom/V8Float32ArrayCustom.cpp:
              * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
              (WebCore::V8HTMLCanvasElement::getContextCallback):
              * bindings/v8/custom/V8Int16ArrayCustom.cpp:
              * bindings/v8/custom/V8Int32ArrayCustom.cpp:
              * bindings/v8/custom/V8Int8ArrayCustom.cpp:
              * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
              * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
              * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
              * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
              * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
              (WebCore::V8XMLHttpRequest::responseAccessorGetter):
              (WebCore::V8XMLHttpRequest::sendCallback):
              * features.pri:
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::getContext):
              (WebCore::HTMLCanvasElement::reset):
              * html/HTMLCanvasElement.h:
              * html/canvas/ArrayBuffer.cpp:
              * html/canvas/ArrayBuffer.idl:
              * html/canvas/ArrayBufferView.cpp:
              * html/canvas/ArrayBufferView.idl:
              * html/canvas/DataView.cpp:
              * html/canvas/DataView.idl:
              * html/canvas/Float32Array.cpp:
              * html/canvas/Float32Array.idl:
              * html/canvas/Int16Array.cpp:
              * html/canvas/Int16Array.idl:
              * html/canvas/Int32Array.cpp:
              * html/canvas/Int32Array.idl:
              * html/canvas/Int8Array.cpp:
              * html/canvas/Int8Array.idl:
              * html/canvas/OESStandardDerivatives.cpp:
              * html/canvas/OESStandardDerivatives.idl:
              * html/canvas/OESTextureFloat.cpp:
              * html/canvas/OESTextureFloat.idl:
              * html/canvas/Uint16Array.cpp:
              * html/canvas/Uint16Array.idl:
              * html/canvas/Uint32Array.cpp:
              * html/canvas/Uint32Array.idl:
              * html/canvas/Uint8Array.cpp:
              * html/canvas/Uint8Array.idl:
              * html/canvas/WebGLActiveInfo.idl:
              * html/canvas/WebGLBuffer.cpp:
              * html/canvas/WebGLBuffer.idl:
              * html/canvas/WebGLContextAttributes.cpp:
              * html/canvas/WebGLContextAttributes.idl:
              * html/canvas/WebGLContextEvent.idl:
              * html/canvas/WebGLExtension.cpp:
              * html/canvas/WebGLFramebuffer.cpp:
              * html/canvas/WebGLFramebuffer.idl:
              * html/canvas/WebGLGetInfo.cpp:
              * html/canvas/WebGLObject.cpp:
              * html/canvas/WebGLProgram.cpp:
              * html/canvas/WebGLProgram.idl:
              * html/canvas/WebGLRenderbuffer.cpp:
              * html/canvas/WebGLRenderbuffer.idl:
              * html/canvas/WebGLRenderingContext.cpp:
              * html/canvas/WebGLRenderingContext.idl:
              * html/canvas/WebGLShader.cpp:
              * html/canvas/WebGLShader.idl:
              * html/canvas/WebGLTexture.cpp:
              * html/canvas/WebGLTexture.idl:
              * html/canvas/WebGLUniformLocation.cpp:
              * html/canvas/WebGLUniformLocation.idl:
              * html/canvas/WebKitLoseContext.cpp:
              * html/canvas/WebKitLoseContext.idl:
              * page/DOMWindow.idl:
              * platform/graphics/ANGLEWebKitBridge.cpp:
              * platform/graphics/GraphicsContext3D.cpp:
              * platform/graphics/cg/GraphicsContext3DCG.cpp:
              * platform/graphics/gpu/DrawingBuffer.cpp:
              * platform/graphics/gpu/mac/DrawingBufferMac.mm:
              * platform/graphics/mac/GraphicsContext3DMac.mm:
              * platform/graphics/mac/WebGLLayer.mm:
              * platform/graphics/opengl/Extensions3DOpenGL.cpp:
              * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
              * platform/graphics/qt/Extensions3DQt.cpp:
              * platform/graphics/qt/GraphicsContext3DQt.cpp:
              * platform/graphics/qt/GraphicsLayerQt.cpp:
              (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl):
              (WebCore::GraphicsLayerQtImpl::paint):
              (WebCore::GraphicsLayerQtImpl::flushChanges):
              * platform/graphics/qt/GraphicsLayerQt.h:
              * platform/graphics/skia/GraphicsContext3DSkia.cpp:
              * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
              * rendering/RenderLayerBacking.cpp:
              (WebCore::isAcceleratedCanvas):
              (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
              (WebCore::RenderLayerBacking::containsPaintedContent):
              (WebCore::RenderLayerBacking::contentChanged):
              * webaudio/AudioBuffer.cpp:
              * webaudio/AudioBuffer.idl:
              * webaudio/RealtimeAnalyser.cpp:
              * webaudio/RealtimeAnalyser.h:
              * webaudio/RealtimeAnalyserNode.h:
              * webaudio/RealtimeAnalyserNode.idl:
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::setResponseType):
              (WebCore::XMLHttpRequest::clearResponse):
              (WebCore::XMLHttpRequest::didReceiveData):
              * xml/XMLHttpRequest.h:
      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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b28bbc8
    • andreas.kling@nokia.com's avatar
      2011-01-25 Andreas Kling <kling@webkit.org> · a0f3dadc
      andreas.kling@nokia.com authored
              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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0f3dadc
  2. 24 Jan, 2011 14 commits
    • andersca@apple.com's avatar
      Fix build. · 2541c784
      andersca@apple.com authored
              
      * WebProcess/mac/WebProcessMac.mm:
      (WebKit::initializeSandbox):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2541c784
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · 34341a9c
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Reset the page scale factor on standard frame loads
              https://bugs.webkit.org/show_bug.cgi?id=53058
              <rdar://problem/8908844>
      
              Add a symbol needed by WebKit2.
      
              * WebCore.exp.in:
      2011-01-24  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Reset the page scale factor on standard frame loads
              https://bugs.webkit.org/show_bug.cgi?id=53058
              <rdar://problem/8908844>
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::scaleWebView):
              Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
      
              (WebKit::WebPageProxy::viewScaleFactorDidChange):
              Update m_viewScaleFactor.
      
              * UIProcess/WebPageProxy.h:
              Add viewScaleFactorDidChange.
      
              * UIProcess/WebPageProxy.messages.in:
              Add ViewScaleFactorDidChange message.
      
              * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
              Set the scale factor.
      
              (WebKit::WebFrameLoaderClient::restoreViewState):
              Inform the UI process about the new view scale factor.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::scaleWebView):
              Send a ViewScaleFactorDidChange message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34341a9c
    • mjs@apple.com's avatar
      2011-01-24 Maciej Stachowiak <mjs@apple.com> · 31a1ec3d
      mjs@apple.com authored
              Reviewed by Anders Carlsson.
      
              Use designated temp directory for the database for WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=53052
              
              Adopt the new WK2 API for this.
      
              * WebKitTestRunner/TestController.cpp:
              (WTR::TestController::libraryPathForTesting):
              (WTR::TestController::initialize):
              * WebKitTestRunner/TestController.h:
              * WebKitTestRunner/mac/TestControllerMac.mm:
              (WTR::TestController::platformLibraryPathForTesting):
              * WebKitTestRunner/qt/TestControllerQt.cpp:
              (WTR::TestController::platformLibraryPathForTesting):
              * WebKitTestRunner/win/TestControllerWin.cpp:
              (WTR::TestController::platformLibraryPathForTesting):
      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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31a1ec3d
    • bfulgham@webkit.org's avatar
      Unreviewed build fix. · 86c7b54c
      bfulgham@webkit.org authored
      * win/WebKit2.vcproj: Don't build the CG Utilities when building
      without CG support.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86c7b54c
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · e5926275
      andersca@apple.com authored
              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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5926275
    • aroben@apple.com's avatar
      Windows Production build fix · f4025fd1
      aroben@apple.com authored
      Source/JavaScriptCore:
      
      * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
      
      Source/WebCore:
      
      * WebCore.vcproj/WebCore.make: Update for move of WebCore into Source.
      
      Source/WebKit/win:
      
      * WebKit.vcproj/WebKit.make: Update for move of WebKit into Source.
      
      Source/WebKit2:
      
      * win/WebKit2.make: Update for move of WebKit2 into Source.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f4025fd1
    • jberlin@webkit.org's avatar
      WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled · b2f777a9
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=53029
      
      Reviewed by Adam Roben.
      
      * UIProcess/win/TextCheckerWin.cpp:
      Disable the warnings for this file.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2f777a9
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · ebef3a29
      andersca@apple.com authored
              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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ebef3a29
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · a31b9aaa
      andersca@apple.com authored
              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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a31b9aaa
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · 6c85ea42
      andersca@apple.com authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c85ea42
    • mitz@apple.com's avatar
      WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a... · a78d2f2f
      mitz@apple.com authored
      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
      
      Reviewed by John Sullivan.
      
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a78d2f2f
    • kbalazs@webkit.org's avatar
      Typo fix. · ff06a04e
      kbalazs@webkit.org authored
      Rubber-stamped by Csaba Osztrogonác.
      
      * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
      (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff06a04e
    • commit-queue@webkit.org's avatar
      2011-01-24 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> · 8e2795bd
      commit-queue@webkit.org authored
              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):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e2795bd
    • abecsi@webkit.org's avatar
      2011-01-24 Andras Becsi <abecsi@webkit.org> · 5c818c0c
      abecsi@webkit.org authored
              Reviewed by Csaba Osztrogonác.
      
              [Qt] Move project files into Source
              https://bugs.webkit.org/show_bug.cgi?id=52891
      
              * Source/DerivedSources.pro: Copied from DerivedSources.pro.
              * Source/WebKit.pri: Renamed from WebKit.pri.
              * Source/WebKit.pro: Added.
              * Source/common.pri: Renamed from common.pri.
              * WebKit.pro: Removed.
      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
      
              * JavaScriptCore.pri:
              * JavaScriptCore.pro:
              * jsc.pro:
      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
      
              No new tests needed.
      
              * WebCore.pri:
              * WebCore.pro:
      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
      
              * declarative/declarative.pro:
              * docs/docs.pri:
              * tests/tests.pri:
      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-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: Renamed from DerivedSources.pro.
              * DumpRenderTree/qt/DumpRenderTree.pro:
              * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
              * MiniBrowser/DerivedSources.pro:
              * MiniBrowser/qt/MiniBrowser.pro:
              * QtTestBrowser/QtTestBrowser.pro:
              * Scripts/webkitdirs.pm:
              * Tools.pro: Added.
              * WebKitTestRunner/DerivedSources.pro:
              * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
              * WebKitTestRunner/qt/WebKitTestRunner.pro:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c818c0c
  3. 23 Jan, 2011 2 commits
  4. 22 Jan, 2011 5 commits
    • andersca@apple.com's avatar
      2011-01-22 Anders Carlsson <andersca@apple.com> · 4beeebf5
      andersca@apple.com authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4beeebf5
    • andersca@apple.com's avatar
      2011-01-22 Anders Carlsson <andersca@apple.com> · f3248c7d
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Add an asynchronous WKPageForceRepaint
              https://bugs.webkit.org/show_bug.cgi?id=52964
              <rdar://problem/8898527>
      
              * UIProcess/API/C/WKPage.cpp:
              (WKPageForceRepaint):
              Call WebPageProxy::forceRepaint.
      
              * UIProcess/API/C/WKPage.h:
              Add WKPageForceRepaint.
      
              * UIProcess/GenericCallback.h:
              Add a "generic" VoidCallback class.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::forceRepaint):
              Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
      
              (WebKit::WebPageProxy::voidCallback):
              Call the right void callback.
      
              (WebKit::WebPageProxy::processDidCrash):
              Invalidate m_voidCallbacks.
      
              * UIProcess/WebPageProxy.messages.in:
              Add a VoidCallback message.
      
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
              (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
              Force a repaint.
      
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
              Add forceRepaint.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::forceRepaint):
              Call forceRepaint on the drawing area.
      
              * WebProcess/WebPage/WebPage.messages.in:
              Add a ForceRepaint message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3248c7d
    • zimmermann@webkit.org's avatar
      2011-01-21 Nikolas Zimmermann <nzimmermann@rim.com> · e8433cca
      zimmermann@webkit.org authored
              Reviewed by Dirk Schulze.
      
              Introduce FontMetrics abstraction
              https://bugs.webkit.org/show_bug.cgi?id=51456
      
              * src/ExternalPopupMenu.cpp: Use FontMetrics instead of Font to access the metrics.
              (WebKit::ExternalPopupMenu::getPopupMenuInfo):
              * src/WebFontImpl.cpp: Ditto.
              (WebKit::WebFontImpl::ascent):
              (WebKit::WebFontImpl::descent):
              (WebKit::WebFontImpl::height):
              (WebKit::WebFontImpl::lineSpacing):
              (WebKit::WebFontImpl::xHeight):
      2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Reviewed by Dirk Schulze.
      
              Introduce FontMetrics abstraction
              https://bugs.webkit.org/show_bug.cgi?id=51456
      
              * FullscreenVideoController.cpp: Use FontMetrics instead of Font to access the metrics.
              (FullscreenVideoController::draw):
              * WebCoreSupport/WebDragClient.cpp: Ditto.
              (WebDragClient::createDragImageForLink):
              * WebKitGraphics.cpp: Ditto.
              (FontMetrics):
      2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Reviewed by Dirk Schulze.
      
              Introduce FontMetrics abstraction
              https://bugs.webkit.org/show_bug.cgi?id=51456
      
              Encapsulate ascent/descent/lineHeight/lineGap methods in a single FontMetrics class, instead of
              having to define them in both Font & SimpleFontData. Changed to store floating point values
              as default, in order to get accurate information for small sized fonts. All these methods
              now have floating-point and integer versions. Whenever an integer variant of these functions
              is called, lroundf() is used to round the value.
      
              This makes it possible to support small font-sizes for SVG in a follow-up patch, as well
              as fixing rounding issues when using SVG Fonts.
              
              Shouldn't affect existing tests.
      
              * GNUmakefile.am: Add FontMetrics.h to build. 
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
              (baselinePositionForAccessibilityRenderObject):
              * css/CSSPrimitiveValue.cpp:         
              (WebCore::CSSPrimitiveValue::computeLengthDouble):
              * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
              (WebCore::CanvasRenderingContext2D::drawTextInternal):
              * inspector/InspectorController.cpp: Ditto.
              (WebCore::InspectorController::drawElementTitle):
              * platform/chromium/PopupMenuChromium.cpp: Ditto.
              (WebCore::PopupListBox::paintRow):
              (WebCore::PopupListBox::getRowHeight):
              * platform/graphics/Font.h: Remove ascent/descent/height/lineGap/lineSpacing/xHeight/unitsPerEm accessor...
              (WebCore::Font::fontMetrics): ... and only expose a single FontMetrics object here.
              * platform/graphics/FontFastPath.cpp: Use fontMetrics() to query metrics information.
              (WebCore::Font::emphasisMarkAscent):
              (WebCore::Font::emphasisMarkDescent):
              (WebCore::Font::emphasisMarkHeight):
              (WebCore::Font::floatWidthForSimpleText):
              * platform/graphics/FontMetrics.h: Added.
              (WebCore::FontMetrics::FontMetrics): Creates a FontMetrics object, stored in SimpleFontData.
              (WebCore::FontMetrics::unitsPerEm): Returns an unsigned describing the unitsPerEm.
              (WebCore::FontMetrics::setUnitsPerEm): Sets the unitsPerEm value.
              (WebCore::FontMetrics::floatAscent): Returns the stored m_ascent float.
              (WebCore::FontMetrics::setAscent): Sets the stored m_ascent float.
              (WebCore::FontMetrics::floatDescent): Returns the stored m_descent float.
              (WebCore::FontMetrics::setDescent): Sets the stored m_descent float.
              (WebCore::FontMetrics::floatHeight): Returns floatAscent() + floatDescent().
              (WebCore::FontMetrics::floatLineGap): Returns the stored m_lineGap float.
              (WebCore::FontMetrics::setLineGap): Sets the stored m_lineGap float.
              (WebCore::FontMetrics::floatLineSpacing): Returns the stored m_lineSpacing float.
              (WebCore::FontMetrics::setLineSpacing): Sets the stored m_lineSpacing float.
              (WebCore::FontMetrics::xHeight): Returns the stored m_xHeight float (no integer version available, hence no 'float' prefix).
              (WebCore::FontMetrics::setXHeight): Sets the stored m_xHeight float.
              (WebCore::FontMetrics::ascent): Returns a rounded version of ascent().
              (WebCore::FontMetrics::descent): Ditto (for descent).
              (WebCore::FontMetrics::height): Returns ascent() + descent().
              (WebCore::FontMetrics::lineGap): Returns a rounded version of lineGap().
              (WebCore::FontMetrics::lineSpacing): Ditto (for lineSpacing).
              (WebCore::FontMetrics::reset): Nulls all members, used only by the platform variants of SimpleFontData.
              * platform/graphics/SimpleFontData.cpp: Adapt SVG Fonts code, to initialize the FontMetrics object, as the m_ascent/etc.. members are gone.
              (WebCore::SimpleFontData::SimpleFontData):
              (WebCore::SimpleFontData::initCharWidths):
              * platform/graphics/SimpleFontData.h: Remove ascent/descent/height/lineSpacing/lineGap/xHeight/unitsPerEm accessors, and members, just store a FontMetrics object and expose it.
              (WebCore::SimpleFontData::fontMetrics):
              (WebCore::SimpleFontData::avgCharWidth):
              * platform/graphics/chromium/FontChromiumWin.cpp: Use fontMetrics() to query font metrics.
              (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
              (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
              (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
              (WebCore::Font::drawComplexText):
              * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Adapt platform code, to initialize the FontMetrics object.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/chromium/SimpleFontDataLinux.cpp: Ditto.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/chromium/UniscribeHelperTextRun.cpp: Use fontMetrics() to query font metrics.
              (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun):
              (WebCore::UniscribeHelperTextRun::nextWinFontData):
              * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Adapt platform code, to initialize the FontMetrics object.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Ditto.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/mac/FontComplexTextMac.cpp: Use fontMetrics() to query font metrics.
              (WebCore::Font::floatWidthForComplexText):
              * platform/graphics/mac/FontMac.mm: Ditto.
              (WebCore::showGlyphsWithAdvances):
              * platform/graphics/mac/SimpleFontDataMac.mm: Adapt platform code, to initialize the FontMetrics object.
              (WebCore::SimpleFontData::platformInit):
              (WebCore::SimpleFontData::platformCharWidthInit):
              * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto. (+ Switch to QFontMetricsF to get floating-point accurancy.)
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/win/FontCGWin.cpp: Use fontMetrics() to query font metrics.
              (WebCore::drawGDIGlyphs):
              * platform/graphics/win/FontWin.cpp: Ditto.
              (WebCore::Font::floatWidthForComplexText):
              * platform/graphics/win/SimpleFontDataCGWin.cpp: Adapt platform code, to initialize the FontMetrics object.
              (WebCore::SimpleFontData::platformInit):
              (WebCore::SimpleFontData::platformBoundsForGlyph):
              * platform/graphics/win/SimpleFontDataCairoWin.cpp: Ditto.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
              (WebCore::SimpleFontData::initGDIFont):
              * platform/graphics/wince/GraphicsContextWinCE.cpp: Use fontMetrics() to query font metrics.
              (WebCore::GraphicsContext::drawText):
              * platform/graphics/wince/SimpleFontDataWinCE.cpp: Adapt platform code, to initialize the FontMetrics object.
              (WebCore::SimpleFontData::platformInit):
              * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
              (WebCore::SimpleFontData::platformInit):
              * platform/win/PopupMenuWin.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
              (WebCore::PopupMenuWin::calculatePositionAndSize): 
              (WebCore::PopupMenuWin::paint):
              * rendering/EllipsisBox.cpp: Ditto.
              (WebCore::EllipsisBox::paint):
              (WebCore::EllipsisBox::nodeAtPoint):
              * rendering/InlineBox.cpp: Ditto.
              (WebCore::InlineBox::logicalHeight):
              * rendering/InlineFlowBox.cpp: Ditto.
              (WebCore::verticalPositionForBox):
              (WebCore::InlineFlowBox::computeLogicalBoxHeights):
              (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
              * rendering/InlineTextBox.cpp: Ditto.
              (WebCore::InlineTextBox::paint):
              (WebCore::InlineTextBox::paintDecoration):
              (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
              (WebCore::InlineTextBox::paintCompositionUnderline):
              * rendering/RenderBlock.cpp: Ditto.
              (WebCore::RenderBlock::baselinePosition):
              (WebCore::RenderBlock::firstLineBoxBaseline):
              (WebCore::RenderBlock::lastLineBoxBaseline):
              * rendering/RenderBox.cpp: Ditto.
              (WebCore::RenderBox::localCaretRect):
              * rendering/RenderEmbeddedObject.cpp: Ditto.
              (WebCore::RenderEmbeddedObject::paintReplaced):
              * rendering/RenderImage.cpp: Ditto.
              (WebCore::RenderImage::setImageSizeForAltText):
              (WebCore::RenderImage::paintReplaced):
              * rendering/RenderInline.cpp: Ditto.
              (WebCore::RenderInline::baselinePosition):
              * rendering/RenderListBox.cpp: Ditto.
              (WebCore::RenderListBox::paintItemForeground):
              (WebCore::RenderListBox::itemHeight):
              * rendering/RenderListMarker.cpp: Ditto.
              (WebCore::RenderListMarker::paint):
              (WebCore::RenderListMarker::layout):
              (WebCore::RenderListMarker::computePreferredLogicalWidths):
              (WebCore::RenderListMarker::updateMargins):
              (WebCore::RenderListMarker::getRelativeMarkerRect):
              * rendering/RenderTextControl.cpp: Ditto.
              (WebCore::RenderTextControl::paintPlaceholder):
              * rendering/RenderTextControlSingleLine.cpp: Ditto.
              (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
              * rendering/RenderThemeWin.cpp: Ditto.
              (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
              * rendering/mathml/RenderMathMLFraction.cpp: Ditto.
              (WebCore::RenderMathMLFraction::baselinePosition):
              * rendering/style/RenderStyle.h: Add "const FontMetrics& fontMetrics() const" accessor.
              (WebCore::InheritedFlags::fontMetrics):
              (WebCore::InheritedFlags::computedLineHeight):
              * rendering/svg/RenderSVGInlineText.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
              (WebCore::RenderSVGInlineText::positionForPoint):
              * rendering/svg/SVGInlineTextBox.cpp: Ditto.
              (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
              (WebCore::positionOffsetForDecoration):
              (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
              (WebCore::SVGInlineTextBox::paintTextWithShadows):
              (WebCore::SVGInlineTextBox::calculateBoundaries):
              * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Ditto.
              (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift):
              (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift):
              (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation):
              * rendering/svg/SVGTextLayoutEngineSpacing.cpp: Ditto.
              (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning):
              * rendering/svg/SVGTextMetrics.cpp: Ditto.
              (WebCore::SVGTextMetrics::SVGTextMetrics):
              * rendering/svg/SVGTextQuery.cpp: Ditto.
              (WebCore::calculateGlyphBoundaries):
              * svg/SVGFontFaceElement.cpp: 
              (WebCore::SVGFontFaceElement::unitsPerEm): Rename defaultUnitsPerEm global to gDefaultUnitsPerEm.
              * svg/SVGLength.cpp: Use style->fontMetrics() instead of style->font() to access the metrics.
              (WebCore::SVGLength::convertValueFromUserUnitsToEXS):
              (WebCore::SVGLength::convertValueFromEXSToUserUnits):
      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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8433cca
    • ap@apple.com's avatar
      2011-01-22 Alexey Proskuryakov <ap@apple.com> · 92c70bde
      ap@apple.com authored
              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.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92c70bde
    • ap@apple.com's avatar
      2011-01-22 Alexey Proskuryakov <ap@apple.com> · 1260e1d1
      ap@apple.com authored
              Reviewed by Dan Bernstein.
      
              https://bugs.webkit.org/show_bug.cgi?id=52951
              WebKit2 generates a bad PDF for cross process messaging
      
              * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Use a correct offset to actually
              draw inside the requested rectangle.
      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.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1260e1d1
  5. 21 Jan, 2011 9 commits
    • ap@apple.com's avatar
      Reviewed by Dan Bernstein. · 9d1b66c3
      ap@apple.com authored
              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:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d1b66c3
    • mrowe@apple.com's avatar
      Fix the WebKit2 build with clang. · d82db12f
      mrowe@apple.com authored
      Reviewed by Sam Weinig.
      
      * 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.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d82db12f
    • bweinstein@apple.com's avatar
      WebKit2: Need API to stop loading a WKFrame · c9643349
      bweinstein@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52925
      
      Reviewed by Adam Roben.
      
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
      * UIProcess/API/C/WKFrame.h:
      * UIProcess/WebFrameProxy.cpp:
      (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
          with the passed in ID.
      * UIProcess/WebFrameProxy.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9643349
    • beidson@apple.com's avatar
      <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916 · 40c86086
      beidson@apple.com authored
      Expose "suggested filename" for a resource based on its resource response.
      
      Reviewed by Adam Roben.
      
      API pieces:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      (WKBundleFrameCopySuggestedFilenameForResourceURL):
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
              
      Implementation:
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
        a resource for this URL and, if so, return the response's suggested filename.
      * WebProcess/WebPage/WebFrame.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40c86086
    • andersca@apple.com's avatar
      2011-01-21 Anders Carlsson <andersca@apple.com> · c5d43006
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              DrawingAreaProxyImpl::paint should return the unpainted region
              https://bugs.webkit.org/show_bug.cgi?id=52918
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView drawRect:]):
              Add unpaintedRegion parameter.
      
              * UIProcess/BackingStore.h:
              (WebKit::BackingStore::size):
              Add a size getter.
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::paint):
              Initialize the unpainted region to the dirty region, then subtract the painted region.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5d43006
    • andersca@apple.com's avatar
      Fix for <rdar://problem/8896057> · f7d01d38
      andersca@apple.com authored
      Reviewed by Dan Bernstein and Maciej Stachowiak.
      
      Give the Web Process access to the PubSub agent.
      
      * WebProcess/com.apple.WebProcess.sb:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f7d01d38
    • weinig@apple.com's avatar
      Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship" · d7d77c3e
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52779
      
      Reviewed by Anders Carlsson.
      
      Rename ScrollbarClient -> ScrollableArea.
      
      Source/WebCore: 
      
      - Also replaces Scrollbar::setClient with Scrollbar::disconnectFromScrollableArea
        since that was its only use case.
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AccessibilityScrollbar.cpp:
      (WebCore::AccessibilityScrollbar::setValue):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass):
      * page/FrameView.h:
      * platform/PopupMenuClient.h:
      * platform/ScrollAnimator.cpp:
      (WebCore::ScrollAnimator::create):
      (WebCore::ScrollAnimator::ScrollAnimator):
      (WebCore::ScrollAnimator::scroll):
      (WebCore::ScrollAnimator::notityPositionChanged):
      * platform/ScrollAnimator.h:
      * platform/ScrollAnimatorWin.cpp:
      (WebCore::ScrollAnimator::create):
      (WebCore::ScrollAnimatorWin::ScrollAnimatorWin):
      (WebCore::ScrollAnimatorWin::scroll):
      * platform/ScrollAnimatorWin.h:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::scroll):
      (WebCore::ScrollView::updateScrollbars):
      (WebCore::ScrollView::wheelEvent):
      * platform/ScrollView.h:
      * platform/ScrollableArea.cpp: Copied from WebCore/platform/ScrollbarClient.cpp.
      (WebCore::ScrollableArea::ScrollableArea):
      (WebCore::ScrollableArea::~ScrollableArea):
      (WebCore::ScrollableArea::scroll):
      (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
      (WebCore::ScrollableArea::scrollToXOffsetWithoutAnimation):
      (WebCore::ScrollableArea::scrollToYOffsetWithoutAnimation):
      (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
      * platform/ScrollableArea.h: Copied from WebCore/platform/ScrollbarClient.h.
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::createNativeScrollbar):
      (WebCore::Scrollbar::Scrollbar):
      (WebCore::Scrollbar::offsetDidChange):
      (WebCore::Scrollbar::autoscrollPressedPart):
      (WebCore::Scrollbar::moveThumb):
      (WebCore::Scrollbar::mouseMoved):
      (WebCore::Scrollbar::isWindowActive):
      (WebCore::Scrollbar::invalidateRect):
      (WebCore::Scrollbar::convertToContainingView):
      (WebCore::Scrollbar::convertFromContainingView):
      * platform/Scrollbar.h:
      (WebCore::Scrollbar::disconnectFromScrollableArea):
      (WebCore::Scrollbar::scrollableArea):
      * platform/ScrollbarClient.cpp: Removed.
      * platform/ScrollbarClient.h: Removed.
      * platform/ScrollbarThemeComposite.cpp:
      * platform/chromium/FramelessScrollView.h:
      * platform/chromium/ScrollbarThemeChromium.cpp:
      (WebCore::ScrollbarThemeChromium::paintTickmarks):
      * platform/efl/ScrollbarEfl.cpp:
      (Scrollbar::createNativeScrollbar):
      (ScrollbarEfl::ScrollbarEfl):
      (scrollbarEflEdjeMessage):
      * platform/efl/ScrollbarEfl.h:
      * platform/gtk/MainFrameScrollbarGtk.cpp:
      (MainFrameScrollbarGtk::create):
      (MainFrameScrollbarGtk::MainFrameScrollbarGtk):
      (MainFrameScrollbarGtk::gtkValueChanged):
      * platform/gtk/MainFrameScrollbarGtk.h:
      * platform/mac/ScrollAnimatorMac.h:
      * platform/mac/ScrollAnimatorMac.mm:
      (WebCore::ScrollAnimator::create):
      (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
      (WebCore::ScrollAnimatorMac::scroll):
      * platform/mac/ScrollbarThemeMac.mm:
      (WebCore::ScrollbarThemeMac::paint):
      * platform/qt/ScrollbarQt.cpp:
      (WebCore::Scrollbar::contextMenu):
      * platform/win/PopupMenuWin.cpp:
      (WebCore::PopupMenuWin::scrollToRevealSelection):
      (WebCore::PopupMenuWin::wndProc):
      * platform/win/PopupMenuWin.h:
      * platform/win/ScrollbarThemeSafari.cpp:
      (WebCore::ScrollbarThemeSafari::paintTrackBackground):
      (WebCore::ScrollbarThemeSafari::paintButton):
      (WebCore::ScrollbarThemeSafari::paintThumb):
      * platform/wx/ScrollbarThemeWx.cpp:
      (WebCore::ScrollbarThemeWx::paint):
      * rendering/RenderDataGrid.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollToOffset):
      (WebCore::RenderLayer::destroyScrollbar):
      (WebCore::RenderLayer::scroll):
      * rendering/RenderLayer.h:
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
      (WebCore::RenderListBox::scroll):
      (WebCore::RenderListBox::logicalScroll):
      (WebCore::RenderListBox::setScrollTop):
      (WebCore::RenderListBox::destroyScrollbar):
      * rendering/RenderListBox.h:
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::createScrollbar):
      * rendering/RenderMenuList.h:
      * rendering/RenderScrollbar.cpp:
      (WebCore::RenderScrollbar::createCustomScrollbar):
      (WebCore::RenderScrollbar::RenderScrollbar):
      * rendering/RenderScrollbar.h:
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::createScrollbar):
      * rendering/RenderTextControlSingleLine.h:
      
      Source/WebKit/chromium: 
      
      * src/AutoFillPopupMenuClient.cpp:
      (WebKit::AutoFillPopupMenuClient::createScrollbar):
      * src/AutoFillPopupMenuClient.h:
      * src/WebScrollbarImpl.cpp:
      (WebKit::WebScrollbarImpl::WebScrollbarImpl):
      (WebKit::WebScrollbarImpl::scroll):
      (WebKit::WebScrollbarImpl::onMouseWheel):
      (WebKit::WebScrollbarImpl::onKeyDown):
      * src/WebScrollbarImpl.h:
      * tests/PopupMenuTest.cpp:
      (WebKit::TestPopupMenuClient::createScrollbar):
      
      Source/WebKit/qt: 
      
      * Api/qwebframe.cpp:
      (QWebFrame::setScrollBarValue):
      
      Source/WebKit/win: 
      
      * WebScrollBar.cpp:
      (WebScrollBar::scroll):
      * WebScrollBar.h:
      
      Source/WebKit2: 
      
      * UIProcess/win/WebPopupMenuProxyWin.cpp:
      (WebKit::WebPopupMenuProxyWin::onMouseWheel):
      (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
      * UIProcess/win/WebPopupMenuProxyWin.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7d77c3e
    • aroben@apple.com's avatar
      Rename WKCACFLayerRenderer[Client] to CACFLayerTreeHost[Client] · d0defa32
      aroben@apple.com authored
      Also renamed a few functions and data members to match.
      
      Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      * WebCore.vcproj/WebCore.vcproj: Updated files' names and paths.
      
      * WebCore.vcproj/WebCoreQuartzCore.vsprops: Added platform/graphics/ca/win to the include
      path.
      
      * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from platform/graphics/ca/win, too.
      
      * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp.
      * platform/graphics/ca/win/CACFLayerTreeHost.h: Renamed from Source/WebCore/platform/graphics/win/WKCACFLayerRenderer.h.
      
      * platform/graphics/ca/win/PlatformCALayerWin.cpp:
      * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
      * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
      Updated for renames.
      
      Source/WebKit/win:
      
      Update for WKCACFLayerRenderer -> CACFLayerTreeHost rename
      
      Also renamed WebView::m_layerRenderer to WebView::m_layerTreeHost to match.
      
      * WebPreferences.cpp:
      * WebView.cpp:
      (WebView::setAcceleratedCompositing): Also made sure to remove our HWND from the layer tree
      host before we get rid of the layer tree host itself.
      * WebView.h:
      
      Source/WebKit2:
      
      Update for WKCACFLayerRenderer -> CACFLayerView rename
      
      * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
       #includes.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d0defa32
    • darin@apple.com's avatar
      WebKit2: Implement showModalDialog · 3ed100bb
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52855
      
      Reviewed by Dan Bernstein.
      
      Source/WebKit2: 
      
      * Shared/WebPageCreationParameters.h: Added canRunModal.
      
      * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
      WKPageUIClient. Also removed a lot of redundant typedefs and added
      a new one, WKPageCallback, for callbacks without arguments or return
      values.
      
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage): Added a runModal function pointer of 0.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::creationParameters): Set canRunModal
      based on return value of WebUIClient::canRunModal.
      
      * UIProcess/WebPageProxy.h: Added runModal.
      Calls WebUIClient::runModal.
      
      * UIProcess/WebPageProxy.messages.in: Added RunModal message.
      Also removed the periods from the phrases in the comments
      as Maciej requested a while back.
      
      * UIProcess/WebUIClient.cpp:
      (WebKit::WebUIClient::canRunModal): Added. Returns true or false
      based on whether a runModal function was supplied in the
      WKPageUIClient structure.
      (WebKit::WebUIClient::runModal): Added. Calls the runModal
      function from the WKPageUIClient structure.
      * UIProcess/WebUIClient.h: Declared the above functions.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
      (WebKit::WebChromeClient::runModal): Ditto.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
      creation parameters. Initialize m_isRunningModal to false.
      (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
      (WebKit::WebPage::runModal): Send a message to ask the UI process to run
      modal and then start a nested run loop. It gets stopped when the page is closed.
      * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
      and declared the runModal function.
      
      Tools: 
      
      This fixes WebKitTestRunner to compile, but more work is probably
      needed to get it to pass the tests.
      
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::runModal): Added. Calls through to the
      platform-specific version of runModal.
      (WTR::TestController::createOtherPage): Changed to be a private
      static member function so it can refer to runModal, which is
      a private static member function.
      (WTR::TestController::initialize): Pass 0 for the runModal
      function since we don't need to run the main window modal.
      I suspect this is wrong and will need to change.
      * WebKitTestRunner/TestController.h: Added declarations for
      the functions added above.
      * WebKitTestRunner/mac/TestControllerMac.mm:
      (WTR::TestController::runModal): Added. Untested implementation.
      * WebKitTestRunner/qt/TestControllerQt.cpp:
      (WTR::TestController::runModal): Added.
      * WebKitTestRunner/win/TestControllerWin.cpp:
      (WTR::TestController::runModal): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ed100bb
  6. 20 Jan, 2011 7 commits
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · 02315226
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=52849
              Make window.print work with WebKit2
      
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPage::QWKPage):
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::printFrame):
              * UIProcess/WebPageProxy.h:
              * UIProcess/WebPageProxy.messages.in:
              * UIProcess/WebUIClient.cpp:
              (WebKit::WebUIClient::printFrame):
              * UIProcess/WebUIClient.h:
              * WebProcess/WebCoreSupport/WebChromeClient.cpp:
              (WebKit::WebChromeClient::print):
              Just pass through deelagte call to a WebKit2 client.
      
              * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
              types.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02315226
    • andersca@apple.com's avatar
      2011-01-20 Anders Carlsson <andersca@apple.com> · f51f2f8a
      andersca@apple.com authored
              Reviewed by Darin Adler.
      
              Keep track of the latest update timestamp in the backing store
              https://bugs.webkit.org/show_bug.cgi?id=52848
      
              * Shared/UpdateInfo.h:
              (WebKit::UpdateInfo::UpdateInfo):
              Initialize timestamp to 0.
      
              * UIProcess/BackingStore.cpp:
              (WebKit::BackingStore::BackingStore):
              Initialize m_latestUpdateTimestamp to 0.
      
              (WebKit::BackingStore::incorporateUpdate):
              If the update is too old, discard it. Otherwise, create a bitmap
              and pass it to platformIncorporateUpdate. Finally update the timestamp.
      
              * UIProcess/BackingStore.h:
              Add m_latestUpdateTimestamp.
      
              * UIProcess/mac/BackingStoreMac.mm:
              (WebKit::BackingStore::platformIncorporateUpdate):
              Update now that we are already given the shareable bitmap.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f51f2f8a
    • bdakin@apple.com's avatar
      Fix for <rdar://problem/8890255> · f76bd26b
      bdakin@apple.com authored
      Reviewed by Geoffrey Garen.
      
      Source/WebCore: 
      
      Allow WebKitSystemInterface to draw scrollbars 
      when appropriate.
      * WebCore.exp.in:
      * platform/mac/ScrollbarThemeMac.mm:
      (WebCore::scrollbarMap):
      (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
      (WebCore::ScrollbarThemeMac::registerScrollbar):
      (WebCore::ScrollbarThemeMac::unregisterScrollbar):
      (WebCore::ScrollbarThemeMac::paint):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      
      Source/WebKit/mac: 
      
      Allow WebKitSystemInterface to draw scrollbars 
      when appropriate.
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Source/WebKit2: 
      
      Allow WebKitSystemInterface to draw scrollbars 
      when appropriate.
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f76bd26b
    • weinig@apple.com's avatar
      Cleanup Scrollbar/ScrollbarClient relationship · 2a13aa81
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52779
      
      Reviewed by Dave Hyatt.
      
      Source/WebCore: 
      
      Pipe all scrolling through the ScrollbarClient/ScrollAnimator
      rather than through the Scrollbar. The Scrollbar now is just
      a "view" on the scroll position of the scrollable area it is
      attached to.
      
      There are now two ways to scroll a scrollable area:
      - ScrollbarClient::scroll()
      - ScrollbarClient::scrollToOffsetWithoutAnimation()
      
      Both of these go through the ScrollAnimator (updating its state
      or starting an animation). The ScrollAnimator, in turn, now calls
      ScrollbarClient::setScrollOffsetFromAnimation, which tells the
      Scrollbars to pull a new offset (via Scrollbar::offsetDidChange)
      and tells the class that derives from ScrollbarClient to scroll
      its contents (via ScrollbarClient::setScrollOffset).
      
      * WebCore.xcodeproj/project.pbxproj:
      Move Scrollbar.cpp to the right place.
      
      * accessibility/AccessibilityScrollbar.cpp:
      (WebCore::AccessibilityScrollbar::setValue):
      Initiate the scroll through the scrollbar client, rather than the
      scrollbar itself.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::scrollTo):
      * page/FrameView.h:
      Condense the two valueChanged overrides to a single override of the
      scrollTo function.
      
      * platform/ScrollAnimator.cpp:
      (WebCore::ScrollAnimator::scroll):
      (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
      (WebCore::ScrollAnimator::currentPosition):
      (WebCore::ScrollAnimator::notityPositionChanged):
      * platform/ScrollAnimator.h:
      * platform/ScrollAnimatorWin.cpp:
      (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
      (WebCore::ScrollAnimatorWin::animateScroll):
      * platform/ScrollAnimatorWin.h:
      * platform/mac/ScrollAnimatorMac.h:
      * platform/mac/ScrollAnimatorMac.mm:
      (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
      (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
      Change setScrollPositionAndStopAnimation to scrollToOffsetWithoutAnimation
      and bottleneck all client notification of changed position through a new
      notityPositionChanged() function.
      
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::setScrollOffset):
      (WebCore::ScrollView::scrollTo):
      (WebCore::ScrollView::scrollPosition):
      (WebCore::ScrollView::scroll):
      (WebCore::ScrollView::updateScrollbars):
      (WebCore::ScrollView::wheelEvent):
      * platform/ScrollView.h:
      (WebCore::ScrollView::horizontalScrollbar):
      (WebCore::ScrollView::verticalScrollbar):
      Update to scroll via the ScrollbarClient rather than the Scrollbar.
      
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::offsetDidChange):
      (WebCore::Scrollbar::autoscrollPressedPart):
      (WebCore::Scrollbar::moveThumb):
      (WebCore::Scrollbar::mouseMoved):
      * platform/Scrollbar.h:
      (WebCore::Scrollbar::setPressedPos):
      Change the scrollbar to only updates its offset in response to
      an offsetDidChange call.
      
      * platform/ScrollbarClient.cpp:
      (WebCore::ScrollbarClient::scroll):
      (WebCore::ScrollbarClient::scrollToOffsetWithoutAnimation):
      (WebCore::ScrollbarClient::scrollToXOffsetWithoutAnimation):
      (WebCore::ScrollbarClient::scrollToYOffsetWithoutAnimation):
      (WebCore::ScrollbarClient::setScrollOffsetFromAnimation):
      * platform/ScrollbarClient.h:
      (WebCore::ScrollbarClient::horizontalScrollbar):
      (WebCore::ScrollbarClient::verticalScrollbar):
      Make the increasingly misnamed ScrollbarClient responsible for
      scrolling.
      
      * platform/efl/ScrollbarEfl.cpp:
      (scrollbarEflEdjeMessage):
      * platform/gtk/MainFrameScrollbarGtk.cpp:
      (MainFrameScrollbarGtk::gtkValueChanged):
      * platform/qt/ScrollbarQt.cpp:
      (WebCore::Scrollbar::contextMenu):
      Update to move scrolling through the client.
      
      * platform/win/PopupMenuWin.cpp:
      (WebCore::PopupMenuWin::scrollToRevealSelection):
      (WebCore::PopupMenuWin::scrollPosition):
      (WebCore::PopupMenuWin::setScrollOffset):
      (WebCore::PopupMenuWin::scrollTo):
      (WebCore::PopupMenuWin::wndProc):
      * platform/win/PopupMenuWin.h:
      (WebCore::PopupMenuWin::verticalScrollbar):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollToOffset):
      (WebCore::RenderLayer::scrollTo):
      (WebCore::RenderLayer::setScrollOffset):
      (WebCore::RenderLayer::scrollPosition):
      (WebCore::RenderLayer::updateScrollInfoAfterLayout):
      (WebCore::RenderLayer::scroll):
      * rendering/RenderLayer.h:
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
      (WebCore::RenderListBox::scroll):
      (WebCore::RenderListBox::logicalScroll):
      (WebCore::RenderListBox::scrollPosition):
      (WebCore::RenderListBox::setScrollOffset):
      (WebCore::RenderListBox::scrollTo):
      (WebCore::RenderListBox::setScrollTop):
      * rendering/RenderListBox.h:
      (WebCore::RenderListBox::verticalScrollbar):
      Update to scroll via the ScrollbarClient rather than the Scrollbar.
      
      * rendering/RenderMarquee.cpp:
      (WebCore::RenderMarquee::start):
      Simplify initial paint to just do an immediate scroll to the position.
      
      Source/WebKit/chromium: 
      
      * src/WebScrollbarImpl.cpp:
      (WebKit::WebScrollbarImpl::WebScrollbarImpl):
      (WebKit::WebScrollbarImpl::value):
      (WebKit::WebScrollbarImpl::setValue):
      (WebKit::WebScrollbarImpl::scroll):
      (WebKit::WebScrollbarImpl::onMouseDown):
      (WebKit::WebScrollbarImpl::onMouseMove):
      (WebKit::WebScrollbarImpl::onMouseWheel):
      (WebKit::WebScrollbarImpl::onKeyDown):
      (WebKit::WebScrollbarImpl::scrollPosition):
      (WebKit::WebScrollbarImpl::setScrollOffset):
      * src/WebScrollbarImpl.h:
      
      Source/WebKit/qt: 
      
      * Api/qwebframe.cpp:
      (QWebFrame::setScrollBarValue):
      
      Source/WebKit/win: 
      
      * WebScrollBar.cpp:
      (WebScrollBar::WebScrollBar):
      (WebScrollBar::setValue):
      (WebScrollBar::value):
      (WebScrollBar::scroll):
      (WebScrollBar::scrollPosition):
      (WebScrollBar::setScrollOffset):
      * WebScrollBar.h:
      
      Source/WebKit2: 
      
      * UIProcess/win/WebPopupMenuProxyWin.cpp:
      (WebKit::WebPopupMenuProxyWin::scrollPosition):
      (WebKit::WebPopupMenuProxyWin::setScrollOffset):
      (WebKit::WebPopupMenuProxyWin::scrollTo):
      (WebKit::WebPopupMenuProxyWin::onMouseWheel):
      (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
      * UIProcess/win/WebPopupMenuProxyWin.h:
      (WebKit::WebPopupMenuProxyWin::verticalScrollbar):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a13aa81
    • andersca@apple.com's avatar
      2011-01-20 Anders Carlsson <andersca@apple.com> · 42abed10
      andersca@apple.com authored
              Reviewed by Adam Roben.
      
              Add a timestamp to UpdateInfo
              https://bugs.webkit.org/show_bug.cgi?id=52844
      
              * Shared/UpdateInfo.cpp:
              (WebKit::UpdateInfo::encode):
              (WebKit::UpdateInfo::decode):
              * Shared/UpdateInfo.h:
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::setSize):
              (WebKit::DrawingAreaImpl::display):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      42abed10
    • andersca@apple.com's avatar
      2011-01-20 Anders Carlsson <andersca@apple.com> · 061b8ef0
      andersca@apple.com authored
              Reviewed by Beth Dakin.
      
              Add Connection::waitForAndDispatchImmediately
              https://bugs.webkit.org/show_bug.cgi?id=52841
      
              * Platform/CoreIPC/Connection.h:
              (CoreIPC::Connection::waitForAndDispatchImmediately):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      061b8ef0
    • kdecker@apple.com's avatar
      Reviewed by Anders Carlsson. · 562ac858
      kdecker@apple.com authored
              <rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
              https://bugs.webkit.org/show_bug.cgi?id=52823
              
              * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
              (WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
              * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
              * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
              (WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
              * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      562ac858