1. 20 Jan, 2011 9 commits
    • 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
    • commit-queue@webkit.org's avatar
      2011-01-20 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com> · ab8d0167
      commit-queue@webkit.org authored
              Reviewed by Andreas Kling.
      
              Remove null ptr deref that happens when reattaching to
              a new web process.
      
              Implement didRelaunchProcess that sets the drawing area size
              after the drawing area is re-instantiated.
      
              [Qt][WK2] Null ptr deref in UI process after web process has crashed
              https://bugs.webkit.org/show_bug.cgi?id=52796
      
              * UIProcess/API/qt/qgraphicswkview.cpp:
              (QGraphicsWKView::QGraphicsWKView):
              * UIProcess/API/qt/qwkpage.cpp:
              (QWKPagePrivate::QWKPagePrivate):
              (QWKPagePrivate::init):
              (QWKPagePrivate::createDrawingAreaProxy):
              (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
              * UIProcess/API/qt/qwkpage_p.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab8d0167
    • mjs@apple.com's avatar
      2011-01-20 Maciej Stachowiak <mjs@apple.com> · 7977a528
      mjs@apple.com authored
              Reviewed by Adam Roben.
      
              WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
              https://bugs.webkit.org/show_bug.cgi?id=42327
      
              * platform/mac-wk2/Skipped: Unskip the tests that needed this.
      2011-01-20  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Adam Roben.
      
              WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
              https://bugs.webkit.org/show_bug.cgi?id=42327
              
              Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
              that corresponds to a JSContextRef (or null if none).
      
              * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
              (WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
              static method.
              * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
              * WebProcess/WebPage/WebFrame.cpp:
              (WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
              * WebProcess/WebPage/WebFrame.h:
      2011-01-20  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Adam Roben.
      
              WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
              https://bugs.webkit.org/show_bug.cgi?id=42327
      
              * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Add support
              for methods that take their normal arguments but also a JSContextRef.
              * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: IDL definition
              for evaluateScriptInIsolatedWorld.
              * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
              (WTR::InjectedBundlePage::didClearWindowForFrame): Set a magic variable only if
              this call is for an isolated world.
              * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
              (WTR::worldMap): Helper to create a world map.
              (WTR::LayoutTestController::worldIDForWorld): Map from an ID to a world.
              (WTR::LayoutTestController::evaluateScriptInIsolatedWorld): The newly
              added LayoutTestController API.
              * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7977a528
    • alex@webkit.org's avatar
      2011-01-20 Alejandro G. Castro <alex@igalia.com> · 252fa1d3
      alex@webkit.org authored
              Fix compilation error in GTK WebKit2.
      
              * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
              (CoreIPC::readBytesFromSocket):
              (CoreIPC::writeBytesToSocket):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      252fa1d3
    • ossy@webkit.org's avatar
      Refactoring of the custom allocation framework · 95c1bc42
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=49897
      
      Patch by Zoltan Horvath <zoltan@webkit.org> on 2011-01-20
      Reviewed by Csaba Osztrogonác.
      
      Source/JavaScriptCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
      
      Source/WebCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the n...
      95c1bc42
  2. 19 Jan, 2011 14 commits
    • simon.fraser@apple.com's avatar
      2011-01-19 Simon Fraser <simon.fraser@apple.com> · 52382a77
      simon.fraser@apple.com authored
              Fix the WebKit2 build.
      
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52382a77
    • bweinstein@apple.com's avatar
      WebKit2: Need API to get the parent frame of a frame · a5c0fee2
      bweinstein@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52774
              
      Reviewed by Darin Adler.
      
      Add the API to get the parent frame of a frame.
      
      * UIProcess/API/C/WKFrame.cpp:
      (WKFrameGetParentFrame):
      * UIProcess/API/C/WKFrame.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5c0fee2
    • enrica@apple.com's avatar
      WebKit2: add support for drag and drop · 3c5560ef
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      This patch contains the remaining work to support drag and drop on Mac.
      I've added a PasteboardTypes class to encapsulate all the pasteboard formats
      supported for drag and drop.
      In this implementation we don't support the promised types, since I could not
      find an efficient way to do this across processes.
      The bulk of the patch consists in creating a shareable bitmap for the drag image,
      pass its handle to the UI process and create a new NSImage from it to be given to
      AppKit for dragging.
      I've added the missing implementation of the methods in the drag client to hook
      up the placement of the data in the pasteboard.
              
      * Shared/mac/PasteboardTypes.h: Added.
      * Shared/mac/PasteboardTypes.mm: Added.
      (WebKit::PasteboardTypes::forEditing):
      (WebKit::PasteboardTypes::forURL):
      (WebKit::PasteboardTypes::forImages):
      (WebKit::PasteboardTypes::forImagesWithArchive):
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::setDragImage): Added.
      * UIProcess/API/mac/WKView.mm:
      (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView _setMouseDownEvent:]):
      (-[WKView _mouseHandler:]):
      (-[WKView mouseDown:]):
      (-[WKView mouseUp:]):
      (-[WKView mouseDragged:]):
      (-[WKView draggedImage:endedAt:operation:]):
      (-[WKView draggingEntered:]):
      (-[WKView _setDragImage:at:linkDrag:]):
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::setDragImage):
      (WebKit::WebPageProxy::dragEnded):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
      (WebKit::fontFromNSFont):
      (WebKit::WebDragClient::startDrag): Added implementation.
      (WebKit::WebDragClient::createDragImageForLink): Ditto.
      (WebKit::writeURL): Helper function.
      (WebKit::writeImage): Helper function.
      (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::dragEnded):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c5560ef
    • andersca@apple.com's avatar
      2011-01-19 Anders Carlsson <andersca@apple.com> · 6c3564b4
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Put the deprecated Connection member functions next to eachother
              https://bugs.webkit.org/show_bug.cgi?id=52767
      
              * Platform/CoreIPC/Connection.h:
              (CoreIPC::Connection::sendSync):
              (CoreIPC::Connection::send):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c3564b4
    • andersca@apple.com's avatar
      2011-01-19 Anders Carlsson <andersca@apple.com> · b29027e7
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              When resizing, the web process should repaint the page
              https://bugs.webkit.org/show_bug.cgi?id=52764
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::didSetSize):
              Incorporate the update.
      
              (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
              Return early if the update bounds rect is empty. This can happen if painting is
              disabled and we get a DidSetSize message.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::setSize):
              If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
              paint and fill in the UpdateInfo struct.
      
              (WebKit::DrawingAreaImpl::display):
              Assert that painting is not disabled.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b29027e7
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · c44bd669
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=52739
              Make it possible for a WebKit2 client to print headers and footers
      
              * UIProcess/API/C/WKPage.h:
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::headerHeight):
              (WebKit::WebPageProxy::footerHeight):
              (WebKit::WebPageProxy::drawHeader):
              (WebKit::WebPageProxy::drawFooter):
              * UIProcess/WebPageProxy.h:
              * UIProcess/WebUIClient.cpp:
              (WebKit::WebUIClient::headerHeight):
              (WebKit::WebUIClient::footerHeight):
              (WebKit::WebUIClient::drawHeader):
              (WebKit::WebUIClient::drawFooter):
              * UIProcess/WebUIClient.h:
              Pass UIClient calls through.
      
              * UIProcess/API/mac/WKView.mm:
              (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
              (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
              print info to account for header and footer height as provided by the client.
              (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
              (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
              to do that. Code adapted form WebKit1.
      
              * UIProcess/API/qt/qwkpage:
              (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c44bd669
    • jberlin@webkit.org's avatar
      Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has · 2a7b7853
      jberlin@webkit.org authored
      died at least once
      https://bugs.webkit.org/show_bug.cgi?id=52730
      
      Reviewed by Darin Adler.
      
      WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
      called in WebContext::processDidClose. However, m_webContext is only set in the
      constructor, which is only called from the constructor of WebContext, so attempting to send
      a message to any new WebProcess after the first one died was causing a null deref.
      
      This patch moves setting m_webcontext into clearContext and clearContext is only called in
      the WebContext destructor.
      
      This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
      the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
      attempt to dereference a null WebProcessProxy.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::~WebContext):
      Call WebDatabaseManagerProxy::clearContext.
      * UIProcess/WebContext.h:
      (WebKit::WebContext::hasValidProcess):
      Make this method public so that it can be called from WebDatabaseManagerProxy.
      
      * UIProcess/WebDatabaseManagerProxy.cpp:
      (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
      If there isn't a valid process, invalidate the callback and return early.
      (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
      Ditto.
      (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
      If tehre isn't a valid process return early.
      (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
      Ditto.
      (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
      Ditto.
      (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
      Ditto.
      (WebKit::WebDatabaseManagerProxy::invalidate):
      Move setting m_webContext to 0 from here ...
      * UIProcess/WebDatabaseManagerProxy.h:
      (WebKit::WebDatabaseManagerProxy::clearContext):
      ... to here.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a7b7853
    • andersca@apple.com's avatar
      2011-01-19 Anders Carlsson <andersca@apple.com> · 89d89361
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Suspend/resume painting as the WKView visibility changes
              https://bugs.webkit.org/show_bug.cgi?id=52738
      
              * UIProcess/DrawingAreaProxy.h:
              (WebKit::DrawingAreaProxy::visibilityDidChange):
              Add new member function. It should really be pure virtual once setPageIsVisible
              is removed.
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
              Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
      
              (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
              Make this a stub; it should really be removed.
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::viewStateDidChange):
              Call visibilityDidChange.
      
              * UIProcess/WebPageProxy.h:
              (WebKit::WebPageProxy::isViewVisible):
              Add new getter.
      
              * WebProcess/WebPage/DrawingArea.messages.in:
              Add SuspendPainting and ResumePainting messages.
      
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::DrawingAreaImpl):
              Initialize m_isPaintingSuspended.
      
              (WebKit::DrawingAreaImpl::suspendPainting):
              Set m_isPaintingSuspended to true and stop the display timer.
      
              (WebKit::DrawingAreaImpl::resumePainting):
              Set m_isPaintingSuspended to false.
      
              (WebKit::DrawingAreaImpl::scheduleDisplay):
              (WebKit::DrawingAreaImpl::display):
              Bail if m_isPaintingSuspended is true.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89d89361
    • andreas.kling@nokia.com's avatar
      2011-01-19 Andreas Kling <kling@webkit.org> · eae89a4f
      andreas.kling@nokia.com authored
              Reviewed by Simon Hausmann.
      
              [Qt][WK2] Implement formatLocalizedString() for Qt.
      
              * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
              (WebKit::formatLocalizedString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eae89a4f
    • andersca@apple.com's avatar
      2011-01-19 Chris Marrin <cmarrin@apple.com> · 80bbda7b
      andersca@apple.com authored
              Reviewed by Simon Fraser.
      
              WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
              https://bugs.webkit.org/show_bug.cgi?id=52695
      
              Added a hostingLayer as the parent of the existing drawingLayer.
              The hostingLayer is now the root which is passed to the 
              remote context. It never changes except to track the size
              of the window. The backingLayer is now a child of the 
              hostingLayer, which allow it to switch between tiled and
              non-tiled.
      
              I also now give back accurate settings for debug borders and
              repaint counters.
      
              * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
              (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
              (WebKit::LayerBackedDrawingArea::setSize):
              (WebKit::LayerBackedDrawingArea::showDebugBorders):
              (WebKit::LayerBackedDrawingArea::showRepaintCounter):
              * WebProcess/WebPage/LayerBackedDrawingArea.h:
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::platformInit):
              (WebKit::LayerBackedDrawingArea::attachCompositingContext):
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80bbda7b
    • cmarrin@apple.com's avatar
      2011-01-19 Chris Marrin <cmarrin@apple.com> · 1ee1d9dd
      cmarrin@apple.com authored
              Reviewed by Simon Fraser.
      
              WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
              https://bugs.webkit.org/show_bug.cgi?id=52695
      
              Added a hostingLayer as the parent of the existing drawingLayer.
              The hostingLayer is now the root which is passed to the 
              remote context. It never changes except to track the size
              of the window. The backingLayer is now a child of the 
              hostingLayer, which allow it to switch between tiled and
              non-tiled.
      
              I also now give back accurate settings for debug borders and
              repaint counters.
      
              * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
              (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
              (WebKit::LayerBackedDrawingArea::setSize):
              (WebKit::LayerBackedDrawingArea::showDebugBorders):
              (WebKit::LayerBackedDrawingArea::showRepaintCounter):
              * WebProcess/WebPage/LayerBackedDrawingArea.h:
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::platformInit):
              (WebKit::LayerBackedDrawingArea::attachCompositingContext):
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      2011-01-19  Chris Marrin  <cmarrin@apple.com>
      
              Reviewed by Simon Fraser.
      
              WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
              https://bugs.webkit.org/show_bug.cgi?id=52695
      
              Added ASSERTs to the places we assume a non-null superlayer.
      
              * platform/graphics/ca/GraphicsLayerCA.cpp:
              (WebCore::GraphicsLayerCA::ensureStructuralLayer):
              (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ee1d9dd
    • andersca@apple.com's avatar
      2011-01-19 Anders Carlsson <andersca@apple.com> · bb9a7620
      andersca@apple.com authored
              Reviewed by Darin Adler.
      
              Throttle sending of SetSize messages
              https://bugs.webkit.org/show_bug.cgi?id=52727
      
              * UIProcess/DrawingAreaProxyImpl.cpp:
              (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
              Initialize m_isWaitingForDidSetSize to false.
      
              (WebKit::DrawingAreaProxyImpl::didSetSize):
              Null out the backing store.
      
              (WebKit::DrawingAreaProxyImpl::sendSetSize):
              If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
              to true and send a SetSize message.
      
              * UIProcess/DrawingAreaProxyImpl.h:
              Add m_isWaitingForDidSetSize.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb9a7620
    • andersca@apple.com's avatar
      2011-01-19 Anders Carlsson <andersca@apple.com> · a5d54f73
      andersca@apple.com authored
              Reviewed by Darin Adler.
      
              Pass WebPageCreationParameters to DrawingArea::create
              https://bugs.webkit.org/show_bug.cgi?id=52726
      
              * WebProcess/WebPage/DrawingArea.cpp:
              (WebKit::DrawingArea::create):
              * WebProcess/WebPage/DrawingArea.h:
              * WebProcess/WebPage/DrawingAreaImpl.cpp:
              (WebKit::DrawingAreaImpl::create):
              (WebKit::DrawingAreaImpl::DrawingAreaImpl):
              * WebProcess/WebPage/DrawingAreaImpl.h:
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::WebPage):
              (WebKit::WebPage::changeAcceleratedCompositingMode):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5d54f73
    • ossy@webkit.org's avatar
      [Qt] Remove unnecessary "../Source" from paths · bf546e66
      ossy@webkit.org authored
      after moving source files into Source is finished.
      
      Reviewed by Laszlo Gombos and Tor Arne Vestbø.
      
      Source/JavaScriptCore:
      
      * JavaScriptCore.pri:
      
      Source/WebCore:
      
      * WebCore.pri:
      * WebCore.pro:
      
      Source/WebKit/qt:
      
      * Api/DerivedSources.pro:
      
      Source/WebKit2:
      
      * DerivedSources.pro:
      * WebKit2.pro:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf546e66
  3. 18 Jan, 2011 17 commits