1. 28 Mar, 2013 2 commits
  2. 27 Mar, 2013 8 commits
    • weinig@apple.com's avatar
      [WebKit2] Need SPI to determine whether a plug-in is blocked · 32fecf3d
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113463
      
      Reviewed by Anders Carlsson.
      
      Add new SPI, WKContextCopyPlugInInfoForBundleIdetifier, to get data about a plug-in,
      including whether it is blocked by x-protect.
      
      * UIProcess/WebLoaderClient.cpp:
      * UIProcess/API/C/WKAPICast.h:
      (WebKit::toWKPluginLoadPolicy):
      (WebKit::toPluginModuleLoadPolicy):
      Move to a shared location.
      
      * UIProcess/API/C/mac/WKContextPrivateMac.h:
      * UIProcess/API/C/mac/WKContextPrivateMac.mm:
      (WKContextIsPlugInUpdateAvailable):
      (WKPlugInInfoPathKey):
      (WKPlugInInfoBundleIdentifierKey):
      (WKPlugInInfoVersionKey):
      (WKPlugInInfoLoadPolicyKey):
      (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
      (WKContextCopyPlugInInfoForBundleIdetifier):
      Add new SPI and dictionary keys.
      
      * UIProcess/Plugins/PluginInfoStore.cpp:
      (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
      * UIProcess/Plugins/PluginInfoStore.h:
      * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
      (WebKit::PluginInfoStore::findPluginWithBundleIdentifer):
      Add function to lookup plug-ins by bundle identifier.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32fecf3d
    • bdakin@apple.com's avatar
      WKBundlePagePrivateMac.h is not being exported · e1272105
      bdakin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113470
      -and corresponding-
      <rdar://problem/13522909>
      
      Reviewed by Sam Weinig.
      
      Mark it as private instead of project.
      * WebKit2.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1272105
    • bdakin@apple.com's avatar
      Need WK2 API to give a WebView a header and footer · 9d3bf065
      bdakin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113352
      -and corresponding-
      <rdar://problem/13383835>
      
      Reviewed by Simon Fraser.
      
      Source/WebCore: 
      
      This API will require RenderLayerCompositor to keep layers for the header and 
      footer when the exist. It also requires the scrolling machinery to know that the 
      size of the scrollable area will differ from the contentsSize when there is a 
      header or footer.
      
      setWantsLayerForHeader() and setWantsLayerForFooter() return GraphicsLayers to 
      WK2. setHeaderHeight() and setFooterHeight() set the header and footer heights
      respectively.
      * WebCore.exp.in:
      * page/FrameView.h:
      (FrameView):
      * page/FrameView.cpp:
      (WebCore::FrameView::FrameView):
      (WebCore::FrameView::setWantsLayerForHeader):
      (WebCore::FrameView::setWantsLayerForFooter):
      (WebCore::FrameView::setHeaderHeight):
      (WebCore::FrameView::setFooterHeight):
      
      Should use totalContentsSize() instead of contentsSize().
      (WebCore::FrameView::windowClipRect):
      (WebCore::FrameView::isScrollable):
      * page/SpatialNavigation.cpp:
      (WebCore::canScrollInDirection):
      
      This should also use totalContentsSize() instead of contentsSize(), and while 
      we're at it, re-name the variable and function names in the scrolling tree code 
      from contentsSize to totalContentsSize.
      * page/scrolling/ScrollingStateScrollingNode.cpp:
      (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
      (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
      (WebCore::ScrollingStateScrollingNode::dumpProperties):
      * page/scrolling/ScrollingStateScrollingNode.h:
      (WebCore::ScrollingStateScrollingNode::totalContentsSize):
      (ScrollingStateScrollingNode):
      * page/scrolling/ScrollingTreeScrollingNode.cpp:
      (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
      * page/scrolling/ScrollingTreeScrollingNode.h:
      (WebCore::ScrollingTreeScrollingNode::totalContentsSize):
      (ScrollingTreeScrollingNode):
      * page/scrolling/mac/ScrollingCoordinatorMac.h:
      (ScrollParameters):
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
      (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
      * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
      (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
      (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
      (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
      
      Use totalContentsSize() instead of contentsSize().
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::maximumScrollPosition):
      (WebCore::ScrollView::setScrollOffset):
      (WebCore::ScrollView::overhangAmount):
      (WebCore::ScrollView::updateScrollbars):
      (WebCore::ScrollView::calculateOverhangAreasForPainting):
      
      scrollOffset() represents the offset within the totalContentsSize, but that is 
      not what we need here. So subtract out the headerHeight() for the appropriate 
      value.
      (WebCore::ScrollView::windowToContents):
      (WebCore::ScrollView::contentsToWindow):
      
      Use totalContentsSize() instead of contentsSize().
      * platform/ScrollableArea.cpp:
      (WebCore::ScrollableArea::maximumScrollPosition):
      (WebCore):
      (WebCore::ScrollableArea::totalContentsSize):
      * platform/ScrollableArea.h:
      (WebCore::ScrollableArea::headerHeight):
      (WebCore::ScrollableArea::footerHeight):
      (ScrollableArea):
      * platform/mac/ScrollAnimatorMac.mm:
      (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
      (WebCore::ScrollAnimatorMac::pinnedInDirection):
      * platform/mac/ThemeMac.mm:
      (WebCore::ThemeMac::ensuredView):
      
      The rootContentLayer needs to be offset by the headerHeight().
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateRootLayerPosition):
      
      New member variables m_layerForHeader and m_layerForFooter. This code properly 
      creates and manages them.
      (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
      (WebCore::RenderLayerCompositor::updateLayerForHeader):
      (WebCore):
      (WebCore::RenderLayerCompositor::updateLayerForFooter):
      (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
      (WebCore::RenderLayerCompositor::reportMemoryUsage):
      * rendering/RenderLayerCompositor.h:
      (RenderLayerCompositor):
      
      Test infrastructure. 
      * testing/Internals.cpp:
      (WebCore::Internals::resetToConsistentState):
      (WebCore::Internals::setHeaderHeight):
      (WebCore):
      (WebCore::Internals::setFooterHeight):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Source/WebKit2: 
      
      New API allows setting and getting layers for a header and footer.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/InjectedBundle/API/c/mac: Added.
      * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added.
      * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added.
      (WKBundlePageGetHeaderLayer):
      (WKBundlePageSetHeaderLayer):
      (WKBundlePageGetFooterLayer):
      (WKBundlePageSetFooterLayer):
      * WebProcess/WebPage/WebPage.h:
      (WebPage):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::setTopOverhangImage):
      (WebKit::WebPage::setBottomOverhangImage):
      (WebKit):
      (WebKit::WebPage::getHeaderLayer):
      (WebKit::WebPage::setHeaderLayerWithHeight):
      (WebKit::WebPage::getFooterLayer):
      (WebKit::WebPage::setFooterLayerWithHeight):
      
      LayoutTests: 
      
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-expected.txt: Added.
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-with-page-scale-expected.txt: Added.
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-with-page-scale.html: Added.
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d3bf065
    • jer.noble@apple.com's avatar
      Going full screen and cancelling gets system into a weird state · fc205776
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113445
      
      Reviewed by Eric Carlson.
      
      Replace an array of BOOL member variables to track full screen state with a single enum, and
      add state tracking for the "waiting to enter" and "waiting to exit" states. Use this new,
      more specific enum to be more stringent about the state when responding to WebProcess
      messages. Also only set the placeholder view's target once in full screen mode.
      
      * UIProcess/mac/WKFullScreenWindowController.h:
      * UIProcess/mac/WKFullScreenWindowController.mm:
      (-[WKFullScreenWindowController isFullScreen]): Yes when in full screen, entering full screen,
          or waiting to enter full screen.
      (-[WKFullScreenWindowController cancelOperation:]): Only requestExitFullScreen() if a watchdog
          has not already been made active.
      (-[WKFullScreenWindowController enterFullScreen:]): Use the new state variable.
      (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
      (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto. Set the placeholder target.
      (-[WKFullScreenWindowController exitFullScreen]): Ditto. Clear the placeholder target.
      (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto.
      (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto.
      (-[WKFullScreenWindowController performClose:]): Ditto.
      (-[WKFullScreenWindowController close]): Ditto.
      (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc205776
    • beidson@apple.com's avatar
      Blind attempt at fixing the release build. · 7703b5c8
      beidson@apple.com authored
      * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
      (WebKit::NetworkResourceLoader::willCacheResponseAsync):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7703b5c8
    • beidson@apple.com's avatar
      Mem mapped resource data improvements. · a42079b8
      beidson@apple.com authored
      <rdar://problem/13196481> and https://bugs.webkit.org/show_bug.cgi?id=113422
      
      Reviewed by Alexey Proskuryakov (and looked over by Geoff Garen).
      
      Remove timer-based approach support code:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::NetworkResourceLoader):
      (WebKit::NetworkResourceLoader::abortInProgressLoad):
      (WebKit::NetworkResourceLoader::didFinishLoading):
      * NetworkProcess/NetworkResourceLoader.h:
      
      Add an object to encapsulate monitoring a resource going in to the disk cache.
      It listens for a callback on the cached response indicating it is disk backed
      and also sets a timeout so we don't keep the monitor alive and waiting forever.
      * NetworkProcess/mac/DiskCacheMonitor.h: Added.
      (WebKit::DiskCacheMonitor::destinationID):
      (WebKit::DiskCacheMonitor::connectionToWebProcess):
      (WebKit::DiskCacheMonitor::resourceRequest):
      * NetworkProcess/mac/DiskCacheMonitor.mm: Added.
      (CFCachedURLResponseSetBecameFileBackedCallBackBlock):
      (WebKit::monitorFileBackingStoreCreation):
      (WebKit::DiskCacheMonitor::DiskCachingMonitor):
      (WebKit::DiskCacheMonitor::connection):
      
      Refactoring and monitor certain cached responses:
      * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
      (CFCachedURLResponseGetMemMappedData):
      (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): Use CFCachedURLResponseGetMemMappedData
        to explicitly get an mem-mapped data object.
      (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
      (WebKit::NetworkResourceLoader::willCacheResponseAsync): If the resource is over the minimum
        size then set up a disk caching monitor.
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a42079b8
    • timothy@apple.com's avatar
      Add support for dock-to-right of the Web Inspector in the Mac port. · 3e6451ee
      timothy@apple.com authored
      Unfortunately this requires Safari changes, so it is disabled in the nightly builds.
      
      https://webkit.org/b/113341
      rdar://problem/10368152
      
      Reviewed by Joseph Pecoraro.
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * inspector/InspectorFrontendClient.h:
      (InspectorFrontendClient):
      * inspector/InspectorFrontendClientLocal.cpp:
      (WebCore):
      (WebCore::InspectorFrontendClientLocal::frontendLoaded):
      (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
      (WebCore::InspectorFrontendClientLocal::canAttachWindow):
      (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
      (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
      (WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
      * inspector/InspectorFrontendClientLocal.h:
      (InspectorFrontendClientLocal):
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::InspectorFrontendHost::setAttachedWindowWidth):
      (WebCore):
      * inspector/InspectorFrontendHost.h:
      (InspectorFrontendHost):
      * inspector/InspectorFrontendHost.idl:
      * inspector/front-end/InspectorFrontendHostStub.js:
      (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowWidth):
      * inspector/front-end/externs.js:
      (InspectorFrontendHostAPI.prototype.setAttachedWindowWidth):
      * testing/Internals.cpp:
      
      Source/WebKit/chromium:
      
      * src/InspectorFrontendClientImpl.cpp:
      (WebKit::InspectorFrontendClientImpl::changeAttachedWindowWidth):
      * src/InspectorFrontendClientImpl.h:
      (InspectorFrontendClientImpl):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/InspectorClientEfl.cpp:
      (WebCore::InspectorFrontendClientEfl::attachWindow):
      (WebCore::InspectorFrontendClientEfl::setAttachedWindowWidth):
      * WebCoreSupport/InspectorClientEfl.h:
      (InspectorFrontendClientEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/InspectorClientGtk.cpp:
      (WebKit::InspectorFrontendClient::attachWindow):
      (WebKit::InspectorFrontendClient::setAttachedWindowWidth):
      * WebCoreSupport/InspectorClientGtk.h:
      (InspectorFrontendClient):
      
      Source/WebKit/mac:
      
      * Resources/Dock.pdf: Updated.
      * WebCoreSupport/WebInspectorClient.h:
      (WebInspectorFrontendClient):
      * WebCoreSupport/WebInspectorClient.mm:
      (WebInspectorFrontendClient::frontendLoaded):
      (WebInspectorFrontendClient::attachWindow):
      (WebInspectorFrontendClient::setAttachedWindowWidth):
      (-[WebInspectorWindowController attachWindow:]):
      (-[WebInspectorWindowController attach]):
      (-[WebInspectorWindowController detach]):
      * WebInspector/WebInspectorFrontend.mm:
      (-[WebInspectorFrontend attach]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/InspectorClientQt.cpp:
      (WebCore::InspectorFrontendClientQt::frontendLoaded):
      (WebCore::InspectorFrontendClientQt::attachWindow):
      (WebCore::InspectorFrontendClientQt::setAttachedWindowWidth):
      * WebCoreSupport/InspectorClientQt.h:
      (InspectorFrontendClientQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebInspectorClient.cpp:
      (WebInspectorFrontendClient::frontendLoaded):
      (WebInspectorFrontendClient::attachWindow):
      (WebInspectorFrontendClient::setAttachedWindowWidth):
      * WebCoreSupport/WebInspectorClient.h:
      (WebInspectorFrontendClient):
      
      Source/WebKit2:
      
      * Resources/Dock.pdf: Removed.
      * Resources/DockBottom.pdf: Added.
      * Resources/DockRight.pdf: Added.
      * Shared/WebPreferencesStore.h:
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::WebInspectorProxy):
      (WebKit::WebInspectorProxy::attachBottom):
      (WebKit::WebInspectorProxy::attachRight):
      (WebKit::WebInspectorProxy::attach):
      (WebKit::WebInspectorProxy::detach):
      (WebKit::WebInspectorProxy::setAttachedWindowWidth):
      (WebKit::WebInspectorProxy::createInspectorPage):
      (WebKit::WebInspectorProxy::canAttach):
      * UIProcess/WebInspectorProxy.h:
      (WebInspectorProxy):
      * UIProcess/WebInspectorProxy.messages.in:
      * UIProcess/mac/WebInspectorProxyMac.mm:
      (-[WKWebInspectorProxyObjCAdapter attachRight:]):
      (-[WKWebInspectorProxyObjCAdapter attachBottom:]):
      (-[WKWebInspectorWindow _cursorForResizeDirection:]):
      (-[WKWebInspectorWindow _customTitleFrame]):
      (WebKit::createDockButton):
      (WebKit::WebInspectorProxy::createInspectorWindow):
      (WebKit::WebInspectorProxy::platformCreateInspectorPage):
      (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
      (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
      (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
      (WebKit::WebInspectorProxy::platformAttach):
      (WebKit::WebInspectorProxy::platformDetach):
      (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
      (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
      (WebKit::WebInspectorFrontendClient::attachWindow):
      (WebKit::WebInspectorFrontendClient::setAttachedWindowWidth):
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
      (WebInspectorFrontendClient):
      * WebProcess/WebPage/WebInspector.cpp:
      (WebKit::WebInspector::attachBottom):
      (WebKit::WebInspector::attachRight):
      (WebKit::WebInspector::setAttachedWindowWidth):
      (WebKit::WebInspector::attachedBottom):
      (WebKit::WebInspector::attachedRight):
      (WebKit::WebInspector::detached):
      * WebProcess/WebPage/WebInspector.h:
      (WebInspector):
      * WebProcess/WebPage/WebInspector.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e6451ee
    • commit-queue@webkit.org's avatar
      [CoordGfx] Support to share GraphicsSurface flags with client. · fb89741f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112982
      
      Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2013-03-27
      Reviewed by Noam Rosenthal.
      
      Covered by existing WebGL tests.
      
      Source/WebCore:
      
      This patch adds support to pass GraphicsSurface flags during it's client creation.
      This would be helpful to determine cases when blending can be disabled on client
      side i.e When AlphaSupport is disabled during Graphics Surface creation.
      With GLX, we rely on Window to provide us with necessary information on client side.
      This might not be the case on other platforms or when not using Window on X.
      This patch doesn't change original behaviour of creating GraphicsSurface client
      with default flags GraphicsSurface::SupportsTextureTarget and GraphicsSurface::SupportsSharing.
      
      * platform/graphics/texmap/TextureMapperPlatformLayer.h:
      (WebCore::TextureMapperPlatformLayer::graphicsSurfaceFlags):
      * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
      (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
      * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
      (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
      * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
      (CoordinatedGraphicsLayerState):
      * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
      (WebCore):
      (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
      * platform/graphics/efl/GraphicsContext3DPrivate.h:
      (GraphicsContext3DPrivate):
      * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
      (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
      (WebCore::GraphicsSurfacePrivate::initializeClient):
      
      Source/WebKit2:
      
      This patch adds support to pass GraphicsSurface flags
      during it's client creation.
      
      * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
      (CoreIPC::::encode):
      (CoreIPC::::decode):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb89741f
  3. 26 Mar, 2013 12 commits
    • hayato@chromium.org's avatar
      Allow ShadowContents in HitTests by default. · af1544e8
      hayato@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113171
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      HitTestRequest is widely used in WebCore, but AllowShadowContents
      flag is not turned on by default.  In most places, we can set the
      flag on.
      
      This change makes HitTests allow shadow contents by default.
      
      To track all existing HitTests which do not allow shadow contents,
      and discourage such a HitTest in the future, I've introduced
      disallowShadowContenet flag so that callers must turn on this flag
      explicitly if they want to disallow shadow contents in their HitTests.
      
      This change should be refactoring and should not include any
      behavior changes.  After this change, we'll investigate each place
      where disallowShadowContents is used step by step and get rid of
      the flag if it is okay to remove.
      
      No new tests, no behavior change.
      
      * dom/Document.h:
      (Document):
      * dom/TreeScope.cpp:
      (WebCore::nodeFromPoint):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::contains):
      * page/DragController.cpp:
      (WebCore::elementUnderMouse):
      (WebCore::DragController::canProcessDrag):
      (WebCore::DragController::startDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMouseDraggedEvent):
      (WebCore::EventHandler::eventMayStartDrag):
      (WebCore::EventHandler::updateSelectionForMouseDrag):
      (WebCore::EventHandler::hitTestResultAtPoint):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::handleMouseDoubleClickEvent):
      (WebCore::EventHandler::handleMouseMoveEvent):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::EventHandler::updateDragAndDrop):
      (WebCore::EventHandler::isInsideScrollbar):
      (WebCore::EventHandler::handleWheelEvent):
      (WebCore::EventHandler::handleGestureEvent):
      (WebCore::EventHandler::handleGestureLongPress):
      (WebCore::EventHandler::handleGestureScrollBegin):
      (WebCore::EventHandler::bestClickableNodeForTouchPoint):
      (WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
      (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
      (WebCore::EventHandler::sendContextMenuEvent):
      (WebCore::EventHandler::sendContextMenuEventForKey):
      (WebCore::EventHandler::hoverTimerFired):
      (WebCore::EventHandler::dragSourceEndedAt):
      (WebCore::EventHandler::handleDrag):
      (WebCore::EventHandler::handleTouchEvent):
      (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
      * page/EventHandler.h:
      (EventHandler):
      * page/FocusController.cpp:
      (WebCore::updateFocusCandidateIfNeeded):
      * page/Frame.cpp:
      (WebCore::Frame::visiblePositionForPoint):
      * page/TouchDisambiguation.cpp:
      (WebCore::findGoodTouchTargets):
      * rendering/HitTestRequest.h:
      (WebCore::HitTestRequest::disallowsShadowContent):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::addNodeToRectBasedTestResult):
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
      * rendering/svg/RenderSVGResourceClipper.cpp:
      (WebCore::RenderSVGResourceClipper::hitTestClipContent):
      * testing/Internals.cpp:
      (WebCore::Internals::nodesFromRect):
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::hitTestResult):
      * WebKitSupport/FatFingers.cpp:
      (BlackBerry::WebKit::FatFingers::getNodesFromRect):
      * WebKitSupport/ProximityDetector.cpp:
      (BlackBerry::WebKit::ProximityDetector::findBestPoint):
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::visiblePositionForPointIgnoringClipping):
      
      Source/WebKit/chromium:
      
      * src/ContextMenuClientImpl.cpp:
      (WebKit::selectMisspelledWord):
      * src/WebFrameImpl.cpp:
      (WebKit::WebFrameImpl::visiblePositionForWindowPoint):
      * src/WebPluginContainerImpl.cpp:
      (WebKit::WebPluginContainerImpl::isRectTopmost):
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::computeBlockBounds):
      (WebKit::WebViewImpl::bestTapNode):
      
      Source/WebKit/efl:
      
      * ewk/ewk_frame.cpp:
      (ewk_frame_hit_test_new):
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebinspector.cpp:
      (webkit_web_inspector_inspect_coordinates):
      * webkit/webkitwebview.cpp:
      (prepareMouseEventForFrame):
      (webkit_web_view_get_hit_test_result):
      
      Source/WebKit/mac:
      
      * WebView/WebFrame.mm:
      (-[WebFrame elementAtPoint:]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView elementAtPoint:allowShadowContent:]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/QWebFrameAdapter.cpp:
      (QWebFrameAdapter::hitTestContent):
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::gestureNotify):
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::hitTest):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::highlightPotentialActivation):
      (WebKit::WebPage::findZoomableAreaForPoint):
      (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::shouldDelayWindowOrderingEvent):
      (WebKit::WebPage::acceptsFirstMouse):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af1544e8
    • timothy_horton@apple.com's avatar
      [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing · 15745130
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107539
      <rdar://problem/13032692>
      
      Reviewed by Simon Fraser.
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Update WebCoreSystemInterface.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Initially move the Page out of the window if necessary;
      Page defaults to in-window, which is wrong in many cases - we depend on
      Page::isInWindow being accurate to decide whether WebPage::setIsInWindow is actually
      a state change or not.
      (WebKit::WebPage::setIsInWindow):
      * WebProcess/WebProcess.cpp: Inform WebProcess when we go on/off screen.
      (WebKit::WebProcess::WebProcess):
      (WebKit::WebProcess::pageDidMoveOnscreen): Keep track of the number of on-screen pages in this process.
      (WebKit::WebProcess::pageWillMoveOffscreen): If the number of on-screen pages drops to zero,  clean up unused rendering resources.
      * WebProcess/WebProcess.h:
      
      Update WebSystemInterface.
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15745130
    • dino@apple.com's avatar
      When a primary plugin is restarted, also start similar plugins · cf69686e
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113265
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      If we detect a primary plugin that is snapshotted, we immediately restart it.
      When this happens, we should also restart any other plugins that
      match the same origin and type. This allows sites with a lot of
      (geometrically) nearby plugins to behave as if they are a single big plugin.
      
      Tests: plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html
             plugins/snapshotting/autoplay-similar-to-dominant.html
      
      * WebCore.exp.in: Export mimeTypeFromURL.
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Use loadedMimeType helper.
      (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): New method, which copied the
          existing code from userDidClickSnapshot.
      (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Move the similar plugin detection
          out into another function and call it.
      (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Call restartSimilarPlugIns.
      (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use loadedMimeType helper.
      * html/HTMLPlugInImageElement.h: Declaration of restartSimilarPlugIns.
      (WebCore::HTMLPlugInImageElement::loadedMimeType): New helper method since this
          code was being often duplicated.
      
      Source/WebKit2:
      
      Remember the origin of the primary plugin, so that we can
      autostart anything that is similar.
      
      * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
      (WebKit::WebPlugInClient::WebPlugInClient): Keep a pointer to the WebPage.
      (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Pass the page onto the process.
      * WebProcess/WebCoreSupport/WebPlugInClient.h:
      (WebPlugInClient): New member variable for the WebPage we were created with.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Remember the origin information
          for the primary plugin.
      (WebKit::WebPage::matchesPrimaryPlugIn): Returns true if we're seeing something that
          looks like the primary plugin.
      * WebProcess/WebPage/WebPage.h: New method matchesPrimaryPlugIn.
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check if the page thinks this is
          the primary plugin.
      * WebProcess/WebProcess.h: Accept a reference to the page in shouldPlugInAutoStartFromOrigin.
      
      LayoutTests:
      
      Two new tests. The first has one big plugin (that should be detected as the primary)
      and then a few smaller versions (which should autostart along with the primary).
      The second has one big plugin, and then adds a similar one after a short delay.
      
      * platform/mac-wk2/plugins/snapshotting/autoplay-similar-to-dominant-after-delay-expected.txt: Added.
      * platform/mac-wk2/plugins/snapshotting/autoplay-similar-to-dominant-expected.txt: Added.
      * plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html: Added.
      * plugins/snapshotting/autoplay-similar-to-dominant.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf69686e
    • ap@apple.com's avatar
      Follow-up to: · efab0e3d
      ap@apple.com authored
              <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
              https://bugs.webkit.org/show_bug.cgi?id=113256
      
              Reviewed by Mark Rowe.
      
              * NetworkProcess/NetworkResourceLoader.h: Added some forgotten OVERRIDEs.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efab0e3d
    • ap@apple.com's avatar
      <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues · cd1fa45e
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=113256
      
              Reviewed by Brady Eidson.
      
              Added a new code path in ResourceHandle/ResourceHandleClient that doesn't need
              blocking calls. Implemented it for NSURLConnection by changing NSOperationQueue
              version to forward calls to main thread.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd1fa45e
    • timothy_horton@apple.com's avatar
      [wk2] Don't send intrinsic content size updates more than once per runloop · 9ea07bb5
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113258
      <rdar://problem/13492038>
      
      Reviewed by Simon Fraser.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
      Only start the zero-delay timer if it's not already active.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ea07bb5
    • tony@chromium.org's avatar
      Autogenerate the scrollAnimatorEnabled setting in Settings.in · 82972d0f
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113253
      
      Reviewed by James Robinson.
      
      Source/WebCore:
      
      Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
      the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
      updating the callers. I didn't change any WebKit API methods.
      
      Also remove the code in InternalSettings since it's never used and will now be
      autogenerated with proper resetting code.
      
      No new tests, this is a refactor and should compile.
      
      * page/Settings.cpp:
      (WebCore::Settings::Settings): Remove code that is now autogenerated.
      * page/Settings.h:
      (Settings): Remove code that is now autogenerated.
      * page/Settings.in: Add entry for scrollAnimatorEnabled.
      * testing/InternalSettings.cpp: Remove unused code.
      * testing/InternalSettings.h: Remove unused code.
      * testing/InternalSettings.idl: Remove unused code.
      
      Source/WebKit/chromium:
      
      * src/WebSettingsImpl.cpp:
      (WebKit::WebSettingsImpl::setEnableScrollAnimator): Update call to WebCore to use setScrollAnimatorEnabled(bool).
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_update_settings): Update call to WebCore to use setScrollAnimatorEnabled(bool).
      (webkit_web_view_settings_notify): Update call to WebCore to use setScrollAnimatorEnabled(bool).
      
      Source/WebKit/qt:
      
      * Api/qwebsettings.cpp:
      (QWebSettingsPrivate::apply): Update call to WebCore to use setScrollAnimatorEnabled(bool).
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool).
      (WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82972d0f
    • abecsi@webkit.org's avatar
      [Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces · f5389721
      abecsi@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113328
      
      Reviewed by Jocelyn Turcotte.
      
      Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249
      
      We use QProcess::start() with a commandline string to start the web process
      and the string is treated by QProcess as a whitespace delimeted list of the
      command and the arguments, thus we have to escape the path to the process
      binaries so that if the path contains spaces we still run the appropriate
      command.
      
      * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
      (WebKit::ProcessLauncher::launchProcess):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f5389721
    • abecsi@webkit.org's avatar
      [Qt][WK2] QML WebView asserts when double clicking a link · 86ae9002
      abecsi@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113329
      
      Reviewed by Jocelyn Turcotte.
      
      Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30288
      
      Remove an erroneous assert which is no longer valid if
      mouse gestures are enabled.
      
      * UIProcess/qt/QtWebPageEventHandler.cpp:
      (WebKit::QtWebPageEventHandler::handleInputEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86ae9002
    • timothy_horton@apple.com's avatar
      [wk2] Don't send intrinsic content size updates more than once per runloop · 07ab50b1
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113258
      <rdar://problem/13492038>
      
      Reviewed by Anders Carlsson.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea):
      Add a zero-delay timer for intrinsic content size updates.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
      Add a zero-delay timer for intrinsic content size updates.
      (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
      Start our new one-shot zero-delay timer.
      (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
      Inform the WebPage that the intrinsic content size has changed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07ab50b1
    • commit-queue@webkit.org's avatar
      bundle-ids need to be sanitized before using them in filesystem paths · d6ec122f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113030
      <rdar://problem/13300254>
      
      Patch by Simon Cooper <scooper@apple.com> on 2013-03-26
      Reviewed by Alexey Proskuryakov.
      
      When choosing / looking for a specialized Sandbox for a Plugin the
      bundle-id needs to be sanitized before using it to construct a
      filesystem name to look up. The “/“ character should not be allowed
      and transformed into something else, in this case a “:”
      
      * PluginProcess/mac/PluginProcessMac.mm:
      (WebKit::loadSandboxProfile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6ec122f
    • zeno.albisser@digia.com's avatar
      [Qt] UIProcess should initialize WebCoreSystemInterface. · dff51198
      zeno.albisser@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113300
      
      The WebCoreSystemInterface is necessary to detect supported
      mime types on Mac OS. In particular it is needed for download
      support.
      This patch fixes in particular the previously failing
      Qt API qmltest WebViewDownload::test_downloadRequest.
      The test was crashing when using QTKit, because functions
      in WebCoreSystemInterface could not be resolved on the UIProcess side.
      
      Reviewed by Jocelyn Turcotte.
      
      * UIProcess/qt/WebContextQt.cpp:
      (WebKit::WebContext::platformInitializeWebProcess):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dff51198
  4. 25 Mar, 2013 3 commits
    • tkent@chromium.org's avatar
      Rename ENABLE_INPUT_TYPE_DATETIME · 866ba1bd
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113254
      
      Reviewed by Kentaro Hara.
      
      Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
      Actually I'd like to remove the code, but we shouldn't remove it yet
      because we shipped products with it on some platforms.
      
      .:
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig:
      * bindings/generic/RuntimeEnabledFeatures.cpp:
      (WebCore):
      * bindings/generic/RuntimeEnabledFeatures.h:
      (RuntimeEnabledFeatures):
      * css/html.css:
      * html/DateTimeInputType.cpp:
      * html/DateTimeInputType.h:
      * html/InputType.cpp:
      (WebCore::createInputTypeFactoryMap):
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      Source/WebKit/chromium:
      
      * src/WebRuntimeFeatures.cpp:
      (WebKit::WebRuntimeFeatures::enableInputTypeDateTime):
      (WebKit::WebRuntimeFeatures::isInputTypeDateTimeEnabled):
      * tests/WebViewTest.cpp:
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF:
      
      * wtf/FeatureDefines.h:
      
      Tools:
      
      * Scripts/webkitperl/FeatureList.pm:
      * qmake/mkspecs/features/features.pri:
      
      WebKitLibraries:
      
      * win/tools/vsprops/FeatureDefines.props:
      * win/tools/vsprops/FeatureDefines.vsprops:
      * win/tools/vsprops/FeatureDefinesCairo.props:
      * win/tools/vsprops/FeatureDefinesCairo.vsprops:
      
      LayoutTests:
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      866ba1bd
    • dino@apple.com's avatar
      Cleanup plugin snapshotting autostart decision making · 84a90cc7
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113231
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      Move the code that creates a hash of plugin origin info
      out of WebCore. All WebCore needs to do now is simply ask its
      host layer whether or not a tuple of (pluginOrigin, pageOrigin, mimeType)
      should autostart or not.
      
      As a drive-by, the code in subframeLoaderWillCreatePlugIn was not quite
      restarting properly when the displayState was Restarting or
      RestartingWithPendingMouseClick. It still worked most of the time, but usually
      because the code ran soon after a mouse click. Now it should be explicit and
      also allowed us to be more clear about snapshotting at the end of the method.
      
      * html/HTMLPlugInElement.h: No more pluginOriginHash().
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Change signature to accept the tuple
          described above, and compare strings rather than hashes.
      (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Tell host layer the origin
          info rather than hash info.
      (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Remember the url that
          the plugin was loaded from. Make some of the logging messages more clear. Test for
          plugin and page origin rather than hash.
      * html/HTMLPlugInImageElement.h:
      (WebCore::HTMLPlugInImageElement::loadedUrl): New loadedURL member function.
      * page/PlugInClient.h:
      (PlugInClient): Change signature of virtual class to accept origin and mimeType info
          rather than hash.
      
      Source/WebKit2:
      
      Two major changes to the way snapshotting plugins may autostart.
      
      The first is that previously WebCore was keeping a hash that
      represented the combination of page origin, plugin origin and
      mime type. WebKit was responsible for deciding if that particular
      hash should autostart. Now, WebKit keeps the hash, and WebCore
      just asks us whether the combination of origins and mimetype
      should start immediately. You can see this change the in WebPluginClient
      and WebProcess APIs.
      
      The second change is that we now keep two types of structures
      around to decide whether a plugin should autostart. One is the
      existing page + plugin origin combination. The other is simply
      the plugin origin, which allows plugins from major providers
      to autostart no matter what page they were embedded on.
      
      * Shared/WebProcessCreationParameters.cpp:
      (WebKit::WebProcessCreationParameters::encode): Encode the new parameter.
      (WebKit::WebProcessCreationParameters::decode): Decode the new parameter.
      * Shared/WebProcessCreationParameters.h: Also keep a list of strings around.
      
      * UIProcess/API/C/WKContext.cpp:
      (WKContextSetPlugInAutoStartOrigins): The C API to send the list of plugin
          origins over to the context.
      * UIProcess/API/C/WKContext.h:
      
      * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
      (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash): Renamed from addAutoStartOrigin.
          No functional change other than new names for members.
      (WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy): Ditto.
      (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Ditto.
      (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Ditto.
      (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray): New method that converts the
          incoming ImmutableArray into a Vector of Strings.
      (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction): Rename for new members.
      * UIProcess/Plugins/PlugInAutoStartProvider.h: Renaming member variables. Adding
          some typedefs to clean up code.
      (WebKit::PlugInAutoStartProvider::autoStartOrigins): New accessor.
      
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::createNewWebProcess): Renaming, and copy the new parameter into the process creation.
      (WebKit::WebContext::addPlugInAutoStartOriginHash): Renaming.
      (WebKit::WebContext::setPlugInAutoStartOriginHashes): Renaming.
      (WebKit::WebContext::setPlugInAutoStartOrigins): New method.
      * UIProcess/WebContext.h: Adds the new setPlugInAutoStartOrigin method.
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::didInitializePlugin): Drive-by fix that was attempting to restart plugins
          that were in the process of restarting.
      (WebKit::PluginView::pluginDidReceiveUserInteraction): Temporarily suspend update of
          expiration time if the user interacts with a plugin.
      
      * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
      (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Renaming.
      (WebKit::WebPlugInClient::didStartFromOrigin): Ditto.
      * WebProcess/WebCoreSupport/WebPlugInClient.h: Renaming.
      
      * WebProcess/WebProcess.cpp: Drive-by - noticed that we forgot to count seconds in
          a timeout threshold.
      (WebKit::WebProcess::initializeWebProcess): Also add the list of origins when we initialize.
      (WebKit::addCaseFoldedCharacters): Copied from WebCore - adds a String to a hash input.
      (WebKit::hashForPlugInOrigin): Copied from WebCore - hashing function.
      (WebKit::WebProcess::isPlugInAutoStartOriginHash): Renaming.
      (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check the list of pure origins first. If
          that fails, fall back to the hash list of pairs.
      (WebKit::WebProcess::plugInDidStartFromOrigin): Renaming.
      (WebKit::WebProcess::didAddPlugInAutoStartOriginHash): Ditto.
      (WebKit::WebProcess::resetPlugInAutoStartOriginHashes): Ditto.
      (WebKit::WebProcess::plugInDidReceiveUserInteraction): Ditto.
      * WebProcess/WebProcess.h: Renaming some methods, but also adding the input of the new
          origin-only list.
      
      * WebProcess/WebProcess.messages.in: Renaming a message.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84a90cc7
    • commit-queue@webkit.org's avatar
      [Qt] Qml WebKit needs preferences to change security knobs · 4bc3391a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111979
      
      Patch by Maxim Ermilov <maxim.ermilov@canonical.com> on 2013-03-25
      Reviewed by Jocelyn Turcotte.
      
      * UIProcess/API/qt/qwebpreferences.cpp:
      (QWebPreferencesPrivate::testAttribute):
      (QWebPreferencesPrivate::setAttribute):
      (QWebPreferences::universalAccessFromFileURLsAllowed):
      (QWebPreferences::setUniversalAccessFromFileURLsAllowed):
      (QWebPreferences::fileAccessFromFileURLsAllowed):
      (QWebPreferences::setFileAccessFromFileURLsAllowed):
      * UIProcess/API/qt/qwebpreferences_p.h:
      * UIProcess/API/qt/qwebpreferences_p_p.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4bc3391a
  5. 23 Mar, 2013 1 commit
  6. 22 Mar, 2013 6 commits
    • cmuppala@apple.com's avatar
      Add runtime setting for hidden page DOM timer throttling and CSS animation suspension · a756fa61
      cmuppala@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112308
      
      Reviewed by Gavin Barraclough.
      
      Source/WebCore:
      
      No new tests.  Only adding settings to enable/disable existing features
      and hence existing tests suffice.
      
      * WebCore.exp.in:
      * page/Page.cpp:
      (WebCore::Page::setVisibilityState): Check if DOM timer throttling
      and CSS animation suspension are enabled before turning them on.
      (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): Start or stop
      DOM timer throttling based on page visibility and the new setting state.
      (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): Ditto
      for CSS animation suspension.
      * page/Page.h:
      * page/Settings.cpp:
      (WebCore::Settings::Settings): Initialize the flags for enabling hidden
      page DOM timer throttling and CSS animation suspension to false.
      (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Update flag
      and notify page that the state of the setting has changed.
      (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): Ditto.
      * page/Settings.h:
      (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
      (WebCore::Settings::hiddenPageCSSAnimationSuspensionEnabled):
      
      Source/WebKit/mac:
      
      Add private preference for enabling/disabling hidden page DOM timer
      throttling and CSS animation suspension.  The preference should be
      disabled by default to avoid compatibility issues.
      
      * WebView/WebPreferenceKeysPrivate.h:
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      (-[WebPreferences hiddenPageDOMTimerThrottlingEnabled]):
      (-[WebPreferences setHiddenPageDOMTimerThrottlingEnabled:]):
      (-[WebPreferences hiddenPageCSSAnimationSuspensionEnabled]):
      (-[WebPreferences setHiddenPageCSSAnimationSuspensionEnabled:]):
      * WebView/WebPreferencesPrivate.h:
      * WebView/WebView.mm:
      (-[WebView _preferencesChanged:]):
      
      Source/WebKit2:
      
      Add private preference for enabling/disabling hidden page DOM timer
      throttling and CSS animation suspension.  The preference should be
      enabled by default only on Mac, where WebKit2 is a private API and
      hence compatibility is less of a issue.
      
      * Shared/WebPreferencesStore.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled):
      (WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled):
      (WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled):
      (WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled):
      * UIProcess/API/C/WKPreferencesPrivate.h:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Allow
      WebKitTestRunner to override hiddenPageDOMTimerThrottlingEnabled.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      
      LayoutTests:
      
      Hidden page DOM timer throttling is disabled by default in WebKit1 and
      in WebKit2 for platforms other than Mac.  Override the preference to
      enable it during the test.
      
      * fast/dom/timer-throttling-hidden-page.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a756fa61
    • timothy_horton@apple.com's avatar
      Plugin Snapshotting: Auto-start dominant plugins · b33e5e04
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113111
      <rdar://problem/13475726>
      
      Reviewed by Dean Jackson.
      
      * html/HTMLPlugInElement.cpp:
      (WebCore::HTMLPlugInElement::defaultEventHandler):
      Acknowledge the new "Restarting" DisplayState.
      * html/HTMLPlugInElement.h:
      Rename PlayingWithPendingMouseClick to RestartingWithPendingMouseClick for accuracy.
      Add "Restarting" DisplayState, so we can be aware that the plugin is intentionally restarting and not re-snapshot it.
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remove m_isPrimarySnapshottedPlugIn.
      (WebCore::classNameForShadowRoot): Remove m_isPrimarySnapshottedPlugIn.
      (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Restart the plugin when it becomes primary.
      (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Remove m_isPrimarySnapshottedPlugIn.
      (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
      Move the plugin to Restarting unless it's already marked as PendingMouseClick.
      (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): Match the PlayingWithPendingMouseClick rename.
      (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Don't snapshot if we're restarting.
      * html/HTMLPlugInImageElement.h: Remove m_isPrimarySnapshottedPlugIn.
      * rendering/RenderSnapshottedPlugIn.cpp:
      (WebCore::RenderSnapshottedPlugIn::paint): Acknowledge the new "Restarting" DisplayState.
      (WebCore::RenderSnapshottedPlugIn::getCursor): Acknowledge the new "Restarting" DisplayState.
      (WebCore::RenderSnapshottedPlugIn::handleEvent): Match the PlayingWithPendingMouseClick rename.
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::didInitializePlugin):
      (WebKit::PluginView::paint):
      (WebKit::PluginView::invalidateRect):
      (WebKit::PluginView::isAcceleratedCompositingEnabled):
      Acknowledge the new "Restarting" DisplayState.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b33e5e04
    • jer.noble@apple.com's avatar
      After switching to another space and back, video races to catch up with audio · 051dc09b
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113006
      
      Reviewed by Anders Carlsson.
      
      Add an observer for the NSWorkspaceActiveSpaceDidChangeNotification notification, and trigger
      a visibility update when that notification is observed.
      
      * UIProcess/API/mac/WKView.mm:
      (-[WKView dealloc]): Unregister the observer.
      (-[WKView _activeSpaceDidChange:]): Notify the view that its visibility may have changed.
      (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add the observer.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      051dc09b
    • ggaren@apple.com's avatar
      Added a setting for whether JavaScript markup is enabled · aaeb65ec
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112999
      
      Reviewed by Maciej Stachowiak.
      
      This setting is useful for clients that want protection from script
      injection attacks.
      
      ../WebCore: 
      
      * page/Settings.h:
      (Settings): Clarified which clients should call canExecuteScripts().
      
      * page/Settings.in: Added the new setting.
      
      ../WebKit2: 
      
      * Shared/WebPreferencesStore.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesGetJavaScriptMarkupEnabled):
      (WKPreferencesSetJavaScriptMarkupEnabled):
      (WKPreferencesGetJavaScriptEnabled):
      * UIProcess/API/C/WKPreferences.h:
      * UIProcess/API/mac/WKBrowsingContextGroup.mm:
      (-[WKBrowsingContextGroup allowsJavaScriptMarkup]):
      (-[WKBrowsingContextGroup setAllowsJavaScriptMarkup:]):
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences): Plumbed through to API.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aaeb65ec
    • mario@webkit.org's avatar
      [GTK] Include the right GL header for GLES2 · a6566640
      mario@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113034
      
      Reviewed by Martin Robinson.
      
      Include GLES2/gl2.h when using GLES2.
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      
      Source/WebKit2:
      
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6566640
    • timothy@apple.com's avatar
      Fix an assert when opening the Web Inspector window for the first time. · 4eea16f8
      timothy@apple.com authored
      rdar://problem/13471765
      https://webkit.org/b/113053
      
      Reviewed by Eric Carlson.
      
      * UIProcess/mac/WebInspectorProxyMac.mm:
      (WebKit::WebInspectorProxy::createInspectorWindow): Assign m_inspectorWindow
      earlier so it is ready for when center is called and windowDidMove: gets called.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4eea16f8
  7. 21 Mar, 2013 8 commits
    • timothy_horton@apple.com's avatar
      [wk2] Page Overlays: Don't create backing store until the client asks us to paint · 84fa24d8
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112989
      <rdar://problem/13355759>
      
      Reviewed by Anders Carlsson.
      
      * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
      (WebKit::WebInspectorClient::highlight):
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::updateFindUIAfterPageScroll):
      Invalidate the entire overlay on installation, to maintain existing behavior
      on platforms where the fade-in animation is not performed by invalidating the overlay.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::installPageOverlay):
      Don't invalidate the overlay upon installation.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
      Create backing store for the page overlay layer the first time it is painted into.
      (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
      Don't update the size of the page overlay layer unless we intend for it to have backing store.
      (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
      Don't create backing store when we create the page overlay layer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84fa24d8
    • beidson@apple.com's avatar
      If a previously loaded resource is later stored to the disk cache, replace the... · 21302485
      beidson@apple.com authored
      If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
      <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943
      
      Reviewed by Geoff Garen.
      
      Source/WebCore:
      
      No new tests (No change in behavior.)
      
      Give SharedBuffer the ability to replace its contents from another SharedBuffer:
      * platform/SharedBuffer.h:
      * platform/cf/SharedBufferCF.cpp:
      (WebCore::SharedBuffer:: tryReplaceContentsWithPlatformBuffer):
      
      Forward along SharedBuffer's new ability to ResourceBuffer:
      * loader/mac/ResourceBuffer.mm:
      (WebCore::ResourceBuffer:: tryReplaceSharedBufferContents):
      * loader/ResourceBuffer.h:
      
      Give CachedResource the ability to replace its encoded data buffer if appropriate:
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource:: tryReplaceEncodedData):
      * loader/cache/CachedResource.h:
      
      * WebCore.exp.in:
      
      Source/WebKit2:
      
      Add a timer that will try to look up the disk cached buffer for the resource a few seconds after the load
      completes and - if the resource is disk backed - send it to the WebProcess for sharing:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::NetworkResourceLoader):
      (WebKit::NetworkResourceLoader::diskCacheTimerFired):
      (WebKit::NetworkResourceLoader::didReceiveResponse):
      (WebKit::NetworkResourceLoader::didReceiveData):
      (WebKit::NetworkResourceLoader::didFinishLoading):
      * NetworkProcess/NetworkResourceLoader.h:
      
      * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
      (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
      
      Refactor SharedMemory to remove the unnecessary vm_copy and only vm_allocate when an appropriate buffer
      doesn't already exist:
      * Platform/SharedMemory.h:
      * Platform/mac/SharedMemoryMac.cpp:
      (WebKit::SharedMemory::create):
      (WebKit::SharedMemory::createFromVMBuffer):
      (WebKit::SharedMemory::~SharedMemory):
      
      Give ShareableResource the ability to create a CFDataRef that wraps "this", and return it in a SharedBuffer:
      * Shared/ShareableResource.cpp:
      (WebKit::shareableResourceDeallocate):
      (WebKit::createShareableResourceDeallocator):
      (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
      * Shared/ShareableResource.h:
      
      * Shared/WebCoreArgumentCoders.cpp: Encode/decode the cache partition for ResourceRequest.
      
      * WebProcess/Network/NetworkProcessConnection.cpp:
      (WebKit::NetworkProcessConnection::didReceiveMessage):
      (WebKit::NetworkProcessConnection::didCacheResource): Lookup the CachedResource in the WebCore memory cache
        and try to replace its encoded data with the shared mmap'ed buffer.
      * WebProcess/Network/NetworkProcessConnection.h:
      * WebProcess/Network/NetworkProcessConnection.messages.in:
      
      * WebProcess/Network/WebResourceLoader.cpp:
      (WebKit::WebResourceLoader::didReceiveResource):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21302485
    • timothy_horton@apple.com's avatar
      Unreviewed build fix, forgot to stage one file. · 0f6ee354
      timothy_horton@apple.com authored
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame):
      (DrawingArea):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f6ee354
    • timothy_horton@apple.com's avatar
      [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll · a4c83fcf
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111662
      <rdar://problem/13355808>
      
      Reviewed by Dean Jackson.
      
      Instead of setNeedsDisplay()ing the whole page overlay layer every time through
      TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
      necessary to keep things painted in the right place when we scroll (the overlay
      is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.
      
      This works with threaded scrolling because overlay installation forces us
      into main-thread scrolling mode.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
      Plumb scroll offset changes through to the drawing area, so it can invalidate the page overlay.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea):
      Add didChangeScrollOffsetForAnyFrame, for WebFrameLoaderClient to call us back when any frame scrolls.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame):
      Invalidate the page overlay when any frame scrolls, so that find indicators in subframes are kept in the right place.
      (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
      Stop unconditionally invalidating the page overlay when we flush layers.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4c83fcf
    • ap@apple.com's avatar
      [Mac] Move NSOperationQueue out of NetworkingContext · 7d30b67c
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=112970
      
              Reviewed by Brady Eidson.
      
              WebCore clients do not need explicit control over what queue ResourceHandle works on,
              they just want to avoid blocking main thread.
      
              * platform/network/ResourceHandleClient.h:
              (WebCore::ResourceHandleClient::usesAsyncCallbacks): Added. The name doesn't quite
              match what ResourceHandleMac currently does, but it will very soon.
      
              * platform/network/NetworkingContext.h:
              (WebCore::NetworkingContext::scheduledRunLoopPairs):
              * platform/network/mac/ResourceHandleMac.mm:
              (WebCore::operationQueueForAsyncClients):
              (WebCore::ResourceHandle::start):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d30b67c
    • timothy@apple.com's avatar
      Support connecting the Web Inspector without showing it. · d87bd33f
      timothy@apple.com authored
      This allows you to get the debugger attached in the background. When a breakpoint is hit
      the Inspector will open. This change also reduces some WebProcess messaging by removing
      the DidLoadInspectorPage message and stops sending the SetAttachedWindow message on close.
      
      https://bugs.webkit.org/show_bug.cgi?id=112445
      
      Reviewed by Sam Weinig.
      
      * UIProcess/API/C/WKInspector.cpp:
      (WKInspectorIsConnected): Added.
      (WKInspectorConnect): Added.
      (WKInspectorHide): Added.
      
      * UIProcess/API/C/WKInspector.h:
      Added new APIs.
      
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::WebInspectorProxy):
      Initialize new state booleans.
      
      (WebKit::WebInspectorProxy::invalidate):
      Don't set state booleans that didClose already resets.
      
      (WebKit::WebInspectorProxy::connect): Added.
      (WebKit::WebInspectorProxy::show):
      Open if we are already connected. Call connect().
      
      (WebKit::WebInspectorProxy::hide): Added.
      
      (WebKit::WebInspectorProxy::close):
      Call didClose we can detach or close the window immediately instead of waiting for a
      message from the WebProcess.
      
      (WebKit::WebInspectorProxy::attach):
      (WebKit::WebInspectorProxy::detach):
      Check for !m_page to match other functions.
      
      (WebKit::WebInspectorProxy::createInspectorPage):
      (WebKit::WebInspectorProxy::didLoadInspectorPage):
      Removed. Moved logic to open().
      
      (WebKit::WebInspectorProxy::open): Added.
      
      (WebKit::WebInspectorProxy::didClose):
      Clear new state booleans. Don't perform work again if already closed. Use platformDetach()
      instead of detach() to avoid sending the SetAttachedWindow message.
      
      (WebKit::WebInspectorProxy::bringToFront):
      Call open() if we are not visible yet, otherwise platformBringToFront.
      
      * UIProcess/WebInspectorProxy.h:
      (WebKit::WebInspectorProxy::isConnected): Added.
      
      * UIProcess/WebInspectorProxy.messages.in: Removed DidLoadInspectorPage.
      
      * UIProcess/gtk/WebInspectorProxyGtk.cpp:
      (WebKit::WebInspectorProxy::platformHide): Added stub.
      
      * UIProcess/mac/WebInspectorProxyMac.mm:
      (WebKit::WebInspectorProxy::platformHide): Added.
      
      * UIProcess/qt/WebInspectorProxyQt.cpp:
      (WebKit::WebInspectorProxy::platformHide): Added stub.
      
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
      Removed frontendLoaded().
      
      * WebProcess/WebPage/WebInspector.cpp:
      * WebProcess/WebPage/WebInspector.h:
      Removed didLoadInspectorPage().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d87bd33f
    • ap@apple.com's avatar
      Build fix. · bc899baf
      ap@apple.com authored
              * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Include CurrentTime.h, as needed
              to call currentTime().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc899baf
    • timothy_horton@apple.com's avatar
      Tiled page overlay layers don't create tiles until the first flush after they switch to being tiled · 29edb84c
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112860
      <rdar://problem/13468400>
      
      Reviewed by Simon Fraser.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea): Add storage for m_clipsToExposedRect.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
      The page overlay layer will never have children, so we can use flushCompositingState instead of the ForThisLayerOnly variant.
      Pass the visible rect of the page overlay layer (computed by intersecting its bounds with the exposed
      rect that comes from the WKView) to flushCompositingState; don't bother setting the visible rect manually.
      (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
      Store m_clipsToExposedRect so we can use it in flushLayers.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29edb84c