1. 27 Sep, 2013 1 commit
    • darin@apple.com's avatar
      Add empty MainFrame class · ade301ac
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121770
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      For now, MainFrame simply derives from Frame and adds nothing.
      Next, we will make each Frame point back to its MainFrame.
      
      * CMakeLists.txt: Added MainFrame.cpp/h.
      * GNUmakefile.list.am: Ditto.
      * Target.pri: Ditto.
      * WebCore.exp.in: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj: Ditto.
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * page/Frame.cpp:
      (WebCore::Frame::Frame): Use references instead of pointers for constructor.
      (WebCore::Frame::create): Pass references instead of pointers to constructor.
      * page/Frame.h: Made constructor protected instead of private, and marked
      destructor virtual explicitly. Also marked virtual functions OVERRIDE and FINAL.
      
      * page/MainFrame.cpp: Added.
      * page/MainFrame.h: Added.
      
      * page/Page.cpp:
      (WebCore::Page::Page): Use MainFrame::create instead of Frame::create.
      (WebCore::Page::frameIsMainFrame): Moved here, no longer inline.
      (WebCore::Page::renderTreeSize): Use const Frame* instead of Frame*.
      (WebCore::Page::checkSubframeCountConsistency): Ditto.
      * page/Page.h: Changed mainFrame() to return MainFrame& and m_mainFrame to
      be a RefPtr<MainFrame>.
      
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      * bindings/js/PageScriptDebugServer.cpp:
      * bindings/js/ScriptProfiler.cpp:
      * bindings/js/ScriptState.cpp:
      * css/MediaQueryEvaluator.cpp:
      * dom/Document.cpp:
      * history/CachedFrame.cpp:
      * history/CachedPage.cpp:
      * history/PageCache.cpp:
      * html/HTMLPlugInImageElement.cpp:
      * inspector/InspectorAgent.cpp:
      * inspector/InspectorCanvasAgent.cpp:
      * inspector/InspectorClient.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorFrontendClientLocal.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInputAgent.cpp:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorOverlay.cpp:
      * inspector/InspectorPageAgent.cpp:
      * inspector/PageRuntimeAgent.cpp:
      * loader/FrameLoader.cpp:
      * loader/HistoryController.cpp:
      * loader/archive/mhtml/MHTMLArchive.cpp:
      * page/AutoscrollController.cpp:
      * page/Chrome.cpp:
      * page/ContextMenuController.cpp:
      * page/DOMWindow.cpp:
      * page/DragController.cpp:
      * page/EventHandler.cpp:
      * page/FocusController.cpp:
      * page/FrameTree.cpp:
      * page/FrameView.cpp:
      * page/GestureTapHighlighter.cpp:
      * page/PageGroup.cpp:
      * page/PageGroupLoadDeferrer.cpp:
      * page/PageSerializer.cpp:
      * page/PageThrottler.cpp:
      * page/Settings.cpp:
      * page/SpatialNavigation.cpp:
      * page/mac/DragControllerMac.mm:
      * page/mac/PageMac.cpp:
      * page/scrolling/ScrollingCoordinator.cpp:
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
      * plugins/DOMMimeType.cpp:
      * storage/StorageEventDispatcher.cpp:
      * svg/graphics/SVGImage.cpp:
      * testing/InternalSettings.cpp:
      * testing/Internals.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
      * WebCoreSupport/InspectorClientEfl.cpp:
      * ewk/ewk_view.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      * WebCoreSupport/GtkAdjustmentWatcher.cpp:
      * webkit/webkitwebframe.cpp:
      * webkit/webkitwebview.cpp:
      * webkit/webkitviewportattributes.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebDragClient.mm:
      * WebCoreSupport/WebInspectorClient.mm:
      * WebCoreSupport/WebPlatformStrategies.mm:
      * WebView/WebFrame.mm:
      * WebView/WebHTMLView.mm:
      * WebView/WebView.mm:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/qt:
      
      * Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp:
      * Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:
      * Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit/win:
      
      * win/WebCoreSupport/WebDragClient.cpp:
      * win/WebCoreSupport/WebContextMenuClient.cpp:
      * win/WebDropSource.cpp:
      * win/WebFrame.cpp:
      * win/WebView.cpp:
      Include MainFrame.h instead of Frame.h as needed.
      
      Source/WebKit2:
      
      * WebProcess/FullScreen/WebFullScreenManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/Storage/StorageAreaMap.cpp:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
      * WebProcess/WebPage/FindController.cpp:
      * WebProcess/WebPage/PageOverlay.cpp:
      * WebProcess/WebPage/WebInspector.cpp:
      * WebProcess/WebPage/WebPage.cpp:
      * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
      * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      Include MainFrame.h instead of Frame.h as needed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ade301ac
  2. 27 Aug, 2013 1 commit
  3. 26 Aug, 2013 1 commit
  4. 24 Aug, 2013 1 commit
  5. 09 Aug, 2013 1 commit
  6. 02 Nov, 2012 1 commit
    • michael.bruning@digia.com's avatar
      [Qt][WK2] ASSERT hit for every mouse click · 2330ae3e
      michael.bruning@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=100607
      
      Reviewed by Jocelyn Turcotte.
      
      .:
      
      Added a test with a link that contains an <em> tag surrounding the entire inner text.
      The test should be run on an assert enabled build and the assert should not be
      triggered when tapping the link.
      
      * ManualTests/tap-gesture-on-em-link-tap-highlight-assert.html: Added.
      
      Source/WebCore:
      
      Changed the logic of absolutePathForRenderer to use the first highlight box as the mid box
      by uniting the two in case the mid box is empty. This allows the first box to be merged with
      the last box should they intersect, and thereby prevents an ASSERT in addHighlightRect that is
      triggered by two intersecting boxes being passed to addHighlightRect as separate ones.
      
      Also, this patch removes some superfluous checks for LayoutRect::isEmpty, which is being checked
      in LayoutRect::intersects already.
      
      No new tests, but added manual test: ManualTests/tap-gesture-on-em-link-tap-highlight-assert.html
      
      * page/GestureTapHighlighter.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2330ae3e
  7. 01 Oct, 2012 1 commit
    • fmalita@chromium.org's avatar
      Refactor layer-related logic out of RenderBoxModelObject · 49d26f2b
      fmalita@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86022
      
      Reviewed by David Hyatt.
      
      This patch extracts layer-related logic into a dedicated class
      (RenderLayerModelObject) and refactors dependent code to make use
      of the new type instead of RenderBoxModelObject. This is in preparation
      of adding non-RenderBoxModelObject layer supprt.
      
      All methods that were using RenderBoxModelObject for layer-related
      functionality are updated to work with RenderLayerModelObject
      instead (a RenderLayer's renderer() can no longer be assumed to be
      a RenderBoxModelObject).
      
      No new tests: refactoring with no behavior changes.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.order:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * rendering/LayoutRepainter.h:
      (WebCore):
      (LayoutRepainter):
      * rendering/RenderBR.h:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::selectionGapRectsForRepaint):
      (WebCore::RenderBlock::rectWithOutlineForRepaint):
      * rendering/RenderBlock.h:
      (RenderBlock):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::styleDidChange):
      (WebCore::RenderBox::updateFromStyle):
      (WebCore::RenderBox::outlineBoundsForRepaint):
      (WebCore::RenderBox::mapLocalToContainer):
      (WebCore::RenderBox::pushMappingToContainer):
      (WebCore::RenderBox::clippedOverflowRectForRepaint):
      (WebCore::RenderBox::computeRectForRepaint):
      (WebCore::RenderBox::enclosingFloatPaintingLayer):
      * rendering/RenderBox.h:
      (RenderBox):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore):
      (WebCore::RenderBoxModelObject::RenderBoxModelObject):
      (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
      (WebCore::RenderBoxModelObject::willBeDestroyed):
      (WebCore::RenderBoxModelObject::updateFromStyle):
      * rendering/RenderBoxModelObject.h:
      (RenderBoxModelObject):
      * rendering/RenderGeometryMap.cpp:
      (WebCore::RenderGeometryMap::pushMappingsToAncestor):
      (WebCore::RenderGeometryMap::popMappingsToAncestor):
      * rendering/RenderGeometryMap.h:
      (RenderGeometryMap):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::updateFromStyle):
      (WebCore::RenderInline::clippedOverflowRectForRepaint):
      (WebCore::RenderInline::rectWithOutlineForRepaint):
      (WebCore::RenderInline::computeRectForRepaint):
      (WebCore::RenderInline::mapLocalToContainer):
      (WebCore::RenderInline::pushMappingToContainer):
      * rendering/RenderInline.h:
      (RenderInline):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::RenderLayer):
      (WebCore::RenderLayer::updateLayerPositions):
      (WebCore::RenderLayer::computeRepaintRects):
      (WebCore::checkContainingBlockChainForPagination):
      (WebCore::RenderLayer::updateLayerPosition):
      (WebCore::isPositionedContainer):
      (WebCore::RenderLayer::hasAncestorWithFilterOutsets):
      (WebCore::RenderLayer::scrollTo):
      (WebCore::RenderLayer::repaintIncludingNonCompositingDescendants):
      * rendering/RenderLayer.h:
      (RenderLayer):
      (WebCore::RenderLayer::renderer):
      * rendering/RenderLayerBacking.h:
      (WebCore::RenderLayerBacking::renderer):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateBacking):
      (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
      (WebCore::RenderLayerCompositor::requiresCompositingLayer):
      (WebCore::RenderLayerCompositor::reasonForCompositing):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::selectionRectForRepaint):
      * rendering/RenderListMarker.h:
      (RenderListMarker):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::addChild):
      (WebCore::addLayers):
      (WebCore::RenderObject::removeLayers):
      (WebCore::RenderObject::moveLayers):
      (WebCore::RenderObject::findNextLayer):
      (WebCore::RenderObject::enclosingLayer):
      (WebCore::RenderObject::setLayerNeedsFullRepaint):
      (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
      (WebCore::RenderObject::containerForRepaint):
      (WebCore::RenderObject::repaintUsingContainer):
      (WebCore::RenderObject::repaint):
      (WebCore::RenderObject::repaintRectangle):
      (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
      (WebCore::RenderObject::rectWithOutlineForRepaint):
      (WebCore::RenderObject::clippedOverflowRectForRepaint):
      (WebCore::RenderObject::computeRectForRepaint):
      (WebCore::RenderObject::computeFloatRectForRepaint):
      (WebCore::RenderObject::adjustStyleDifference):
      (WebCore::RenderObject::mapLocalToContainer):
      (WebCore::RenderObject::pushMappingToContainer):
      (WebCore::RenderObject::shouldUseTransformFromContainer):
      (WebCore::RenderObject::getTransformFromContainer):
      (WebCore::RenderObject::localToContainerQuad):
      (WebCore::RenderObject::localToContainerPoint):
      (WebCore::RenderObject::container):
      (WebCore::RenderObject::willBeDestroyed):
      (WebCore::RenderObject::isComposited):
      * rendering/RenderObject.h:
      (WebCore):
      (WebCore::RenderObject::isLayerModelObject):
      (RenderObject):
      (WebCore::RenderObject::selectionRectForRepaint):
      (WebCore::RenderObject::outlineBoundsForRepaint):
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::selectionRectForRepaint):
      (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
      * rendering/RenderReplaced.h:
      (RenderReplaced):
      * rendering/RenderSelectionInfo.h:
      (WebCore::RenderSelectionInfoBase::repaintContainer):
      (RenderSelectionInfoBase):
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
      (WebCore::RenderTableCell::computeRectForRepaint):
      * rendering/RenderTableCell.h:
      (RenderTableCell):
      * rendering/RenderTableCol.cpp:
      (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
      * rendering/RenderTableCol.h:
      (RenderTableCol):
      * rendering/RenderTableRow.cpp:
      (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
      * rendering/RenderTableRow.h:
      (RenderTableRow):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::clippedOverflowRectForRepaint):
      (WebCore::RenderText::selectionRectForRepaint):
      * rendering/RenderText.h:
      (RenderText):
      * rendering/RenderLayerModelObject.cpp: Added.
      (WebCore):
      (WebCore::RenderLayerModelObject::RenderLayerModelObject):
      (WebCore::RenderLayerModelObject::~RenderLayerModelObject):
      (WebCore::RenderLayerModelObject::destroyLayer):
      (WebCore::RenderLayerModelObject::ensureLayer):
      (WebCore::RenderLayerModelObject::hasSelfPaintingLayer):
      (WebCore::RenderLayerModelObject::willBeDestroyed):
      (WebCore::RenderLayerModelObject::styleWillChange):
      (WebCore::RenderLayerModelObject::styleDidChange):
      * rendering/RenderLayerModelObject.h: Added.
      (WebCore):
      (RenderLayerModelObject):
      (WebCore::RenderLayerModelObject::layer):
      (WebCore::RenderLayerModelObject::updateFromStyle):
      (WebCore::toRenderLayerModelObject):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::mapLocalToContainer):
      (WebCore::RenderView::pushMappingToContainer):
      (WebCore::isComposited):
      (WebCore::RenderView::computeRectForRepaint):
      (WebCore::RenderView::absoluteRects):
      (WebCore::RenderView::absoluteQuads):
      (WebCore::RenderView::selectionBounds):
      (WebCore::RenderView::setSelection):
      (WebCore::RenderView::clearSelection):
      * rendering/RenderView.h:
      (RenderView):
      * rendering/RenderingAllInOne.cpp:
      * rendering/svg/RenderSVGBlock.cpp:
      (WebCore::RenderSVGBlock::updateFromStyle):
      * rendering/svg/RenderSVGBlock.h:
      (RenderSVGBlock):
      * rendering/svg/RenderSVGForeignObject.cpp:
      (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
      (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
      (WebCore::RenderSVGForeignObject::mapLocalToContainer):
      (WebCore::RenderSVGForeignObject::pushMappingToContainer):
      * rendering/svg/RenderSVGForeignObject.h:
      (RenderSVGForeignObject):
      * rendering/svg/RenderSVGGradientStop.h:
      * rendering/svg/RenderSVGHiddenContainer.h:
      * rendering/svg/RenderSVGInline.cpp:
      (WebCore::RenderSVGInline::clippedOverflowRectForRepaint):
      (WebCore::RenderSVGInline::computeFloatRectForRepaint):
      (WebCore::RenderSVGInline::mapLocalToContainer):
      (WebCore::RenderSVGInline::pushMappingToContainer):
      * rendering/svg/RenderSVGInline.h:
      (RenderSVGInline):
      * rendering/svg/RenderSVGModelObject.cpp:
      (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
      (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
      (WebCore::RenderSVGModelObject::mapLocalToContainer):
      (WebCore::RenderSVGModelObject::pushMappingToContainer):
      (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
      * rendering/svg/RenderSVGModelObject.h:
      (RenderSVGModelObject):
      * rendering/svg/RenderSVGRoot.cpp:
      (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
      (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
      (WebCore::RenderSVGRoot::mapLocalToContainer):
      (WebCore::RenderSVGRoot::pushMappingToContainer):
      * rendering/svg/RenderSVGRoot.h:
      (RenderSVGRoot):
      * rendering/svg/RenderSVGText.cpp:
      (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
      (WebCore::RenderSVGText::computeRectForRepaint):
      (WebCore::RenderSVGText::computeFloatRectForRepaint):
      (WebCore::RenderSVGText::mapLocalToContainer):
      (WebCore::RenderSVGText::pushMappingToContainer):
      * rendering/svg/RenderSVGText.h:
      (RenderSVGText):
      * rendering/svg/SVGRenderSupport.cpp:
      (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
      (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
      (WebCore::SVGRenderSupport::mapLocalToContainer):
      (WebCore::SVGRenderSupport::pushMappingToContainer):
      * rendering/svg/SVGRenderSupport.h:
      (WebCore):
      (SVGRenderSupport):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49d26f2b
  8. 26 Sep, 2012 1 commit
  9. 13 Aug, 2012 1 commit
  10. 18 May, 2012 1 commit
  11. 12 Apr, 2012 2 commits
    • jchaffraix@webkit.org's avatar
      Reduce the use of RenderLayer outside of the rendering code · 9dbf6d18
      jchaffraix@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=83728
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      Test: fast/layers/scrollByLines-overflow-no-layer.html
      
      This is mostly a layering violation change. This changes reduces the number of
      RenderLayer use outside rendering/ by a third but there are still numerous uses.
      
      While auditing the different uses of RenderLayer, I found a potential crasher
      and fixed it which is why we have a test case.
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
      * dom/Document.cpp:
      (WebCore::Document::nodesFromRect):
      (WebCore::Document::handleZeroPadding):
      (WebCore::nodeFromPoint):
      (WebCore::Document::prepareMouseEvent):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::contains):
      * page/DragController.cpp:
      (WebCore::elementUnderMouse):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMouseDraggedEvent):
      (WebCore::EventHandler::eventMayStartDrag):
      (WebCore::EventHandler::updateSelectionForMouseDrag):
      (WebCore::EventHandler::hitTestResultAtPoint):
      (WebCore::EventHandler::handleWheelEvent):
      (WebCore::EventHandler::hoverTimerFired):
      (WebCore::EventHandler::handleDrag):
      Updated these call sites to use RenderView::hitTest.
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      * page/FrameView.cpp:
      (WebCore::FrameView::contentsInCompositedLayer):
      (WebCore::FrameView::scrollContentsFastPath):
      Updated these call sites to use RenderObject::isComposited().
      
      * dom/Element.cpp:
      (WebCore::Element::scrollByUnits):
      Call directly RenderBox::scroll instead of calling the layer.
      This actually fixes a crasher that slipped through the cracks.
      
      * editing/visible_units.cpp:
      * html/shadow/TextControlInnerElements.cpp:
      * page/ContextMenuController.cpp:
      * page/FocusController.cpp:
      * page/Frame.cpp:
      * page/GestureTapHighlighter.cpp:
      * page/PrintContext.cpp:
      * plugins/mac/PluginViewMac.mm:
      Removed unneeded #include.
      
      * plugins/gtk/PluginViewGtk.cpp:
      * plugins/qt/PluginViewQt.cpp:
      Replaced RenderLayer.h #include with RenderObject.h as
      we use RenderObject::absoluteToLocal.
      
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::isComposited):
      * rendering/RenderObject.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::hitTest):
      * rendering/RenderView.h:
      Added 2 new functions that pipe through the RenderLayer.
      
      LayoutTests:
      
      The test checks that calling scrollByUnit without a RenderLayer doesn't crash.
      
      * fast/layers/scrollByLines-overflow-no-layer.html: Added.
      * fast/layers/scrollByLines-overflow-no-layer-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9dbf6d18
    • commit-queue@webkit.org's avatar
      [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset. · 9dc3f4b2
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=83428
      
      Patch by Zalan Bujtas <zbujtas@gmail.com> on 2012-04-12
      Reviewed by Kenneth Rohde Christiansen.
      
      Source/WebCore:
      
      When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
      coordinates. It is already done at ScrollView base class and this patch copies the logic to the
      FrameView subclass.
      Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.
      
      Test: touchadjustment/iframe-with-mainframe-scroll-offset.html
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::bestClickableNodeForTouchPoint):
      (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
      * page/EventHandler.h:
      (EventHandler):
      * page/FrameView.cpp:
      (WebCore::FrameView::convertFromRenderer):
      (WebCore::FrameView::convertToRenderer):
      * page/GestureTapHighlighter.cpp:
      * testing/Internals.cpp:
      (WebCore::Internals::setDelegatesScrolling):
      (WebCore::Internals::touchPositionAdjustedToBestClickableNode):
      (WebCore::Internals::bestZoomableAreaForTouchPoint):
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit2:
      
      When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
      coordinates. It is already done at ScrollView base class and this patch copies the logic to the
      FrameView subclass.
      Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::highlightPotentialActivation):
      (WebKit::WebPage::findZoomableAreaForPoint):
      
      LayoutTests:
      
      * touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset-expected.txt: Added.
      * touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html: Added.
      * touchadjustment/zoom-basic.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9dc3f4b2
  12. 30 Mar, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Fix defective size_t overflow in GestureTapHighlighter. · f3f52cd3
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=82605
      
      Patch by Zalan Bujtas <zbujtas@gmail.com> on 2012-03-30
      Reviewed by Kenneth Rohde Christiansen.
      
      .:
      
      * ManualTests/tap-gesture-in-iframe-with-tap-highlight-crash.html: Added.
      
      Source/WebCore:
      
      In pathForRenderer, the for loop has 'i < rects().size() - 1' as test expression,
      where rects().size() returns with size_t.
      In case of empty rect, it leads to unsigned int overflow. Overflow value makes
      the associated for loop run with invalid values.
      Fix it by making loop variable int and stop using size_t type in the test expression.
      Also, return early, if no focus ring found.
      
      Manual test added. Tap gesture highlighter is getting triggered by UI process.
      
      * page/GestureTapHighlighter.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3f52cd3
  13. 26 Mar, 2012 1 commit
  14. 19 Mar, 2012 1 commit
    • eae@chromium.org's avatar
      Correct usage of LayoutUnits in page code in preparation for turning on subpixel layout · fdb2f38a
      eae@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81538
      
      Reviewed by Eric Seidel.
      
      Fix usage of LayoutUnits and conversions between types in page code.
      
      No new tests.
      
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::innerHeight):
      (WebCore::DOMWindow::innerWidth):
      Explicitly cast long to int. InspectorInstrumentation requires a long and
      FractionalLayoutUnit has no constructor that takes long.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::sendContextMenuEventForKey):
      Pixel snap overflow rect as selection rects are integer based.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::scrollContentsFastPath):
      Pixel snap repaint rects when computing update rect as all scrolling is
      done on integer bounds.
      
      * page/GestureTapHighlighter.cpp:
      Change rects vector to IntRect as addFocusRingRects operates on IntRects.
      
      * page/Page.cpp:
      (WebCore::Page::addRelevantRepaintedObject):
      (WebCore::Page::addRelevantUnpaintedObject):
      Change paint methods to take a LayoutRect paint rect.
      
      * page/SpatialNavigation.cpp:
      (WebCore::distanceDataForNode):
      Change distance calculation to use floats instead of converting to float
      at the end.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdb2f38a
  15. 17 Feb, 2012 1 commit
    • mrobinson@webkit.org's avatar
      Fix some warnings encountered during the GTK+ build · c47a416b
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=78911
      
      Reviewed by Xan Lopez.
      
      Source/WebCore:
      
      No new tests. These are just fixes for warnings.
      
      * page/GestureTapHighlighter.cpp: Avoid using potentially signed operations on
      a size_t type. Use size_t for iterating over members of a vector.
      * platform/graphics/texmap/TextureMapperBackingStore.cpp: Use size_t where necessary.
      (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded): Ditto.
      * platform/graphics/texmap/TextureMapperLayer.cpp: Ditto.
      (WebCore::TextureMapperLayer::computeTransformsRecursive): Ditto.
      (WebCore::TextureMapperLayer::paintSelfAndChildren): Ditto.
      (WebCore::TextureMapperLayer::intermediateSurfaceRect): Ditto.
      
      Source/WebKit2:
      
      * UIProcess/API/gtk/WebKitLoaderClient.cpp:
      (attachLoaderClientToView): Initialize a new member of the loader client struct.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c47a416b
  16. 10 Feb, 2012 1 commit
    • eae@chromium.org's avatar
      Convert Frame/FrameView to LayoutUnits in preparation for turning on subpixel layout · 23cf2776
      eae@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=78311
      
      Reviewed by Eric Seidel.
      
      No new tests, no new functionality.
      
      * page/Frame.cpp:
      (WebCore::Frame::nodeImage):
      Pixel snap painting rect for image to ensure that it is painted aligned
      to device pixels. This avoids avoid unwanted anti-aliasing.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::windowClipRectForLayer):
      Pixel snap clip rects as all window coordinates and sizes are exposed as
      integers.
      
      * page/GestureTapHighlighter.cpp:
      * page/Page.cpp:
      (WebCore::Page::addRelevantRepaintedObject):
      As the painting is done aligned on pixel boundaries we need to pixel snap
      the view rect when checking if it intersects the objects paint rect.
      
      * page/mac/FrameMac.mm:
      (WebCore::Frame::snapshotDragImage):
      (WebCore::Frame::nodeImage):
      Pixel snap painting rect for image to ensure that it is painted aligned
      to device pixels. This avoids avoid unwanted anti-aliasing.
      
      * page/win/FrameCGWin.cpp:
      (WebCore::Frame::nodeImage):
      Pixel snap painting rect for image to ensure that it is painted aligned
      to device pixels. This avoids avoid unwanted anti-aliasing.
      
      * rendering/LayoutTypes.h:
      (WebCore::pixelSnappedIntRect):
      (WebCore):
      No-op implementation of pixelSnappedIntRect for now.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23cf2776
  17. 02 Feb, 2012 1 commit
  18. 31 Jan, 2012 1 commit
  19. 25 Jan, 2012 1 commit
    • kenneth@webkit.org's avatar
      [Qt] Implement tap feedback respecting -webkit-tap-highlight-color · 5f775c22
      kenneth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76914
      
      Reviewed by Simon Hausmann.
      
      .:
      
      Add a manual test.
      
      * ManualTests/qt/tap-highlighting.html: Added.
      
      Source/WebCore:
      
      Implement highlighting of dom nodes with a rounded rect, respecting
      the color of -webkit-tap-highlight-color and any transform applied
      to the element.
      
      Tested with manual test.
      
      * Target.pri:
      * page/GestureTapHighlighter.cpp: Added.
      (WebCore::GestureTapHighlighter::pathForNodeHighlight):
      * page/GestureTapHighlighter.h: Added.
      
      Source/WebKit2:
      
      Implement tap highlighting for Qt. When a touch press is issued,
      which is not handled by the web page, then we highlight any
      activatable node below. In all otehr cases, we hide any highlights.
      
      The highlighting itself is painted on an accelerated PageOverlay,
      on the web process side.
      
      * Target.pri:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::handlePotentialActivation):
      * UIProcess/WebPageProxy.h:
      * UIProcess/qt/QtTapGestureRecognizer.cpp:
      (WebKit::QtTapGestureRecognizer::recognize):
      * UIProcess/qt/QtWebPageEventHandler.cpp:
      (QtWebPageEventHandler::handlePotentialSingleTapEvent):
      * UIProcess/qt/QtWebPageEventHandler.h:
      * WebProcess/WebPage/TapHighlightController.cpp: Added.
      (WebKit::TapHighlightController::TapHighlightController):
      (WebKit::TapHighlightController::~TapHighlightController):
      (WebKit::TapHighlightController::highlight):
      (WebKit::TapHighlightController::hideHighlight):
      (WebKit::TapHighlightController::pageOverlayDestroyed):
      (WebKit::TapHighlightController::willMoveToWebPage):
      (WebKit::TapHighlightController::didMoveToWebPage):
      (WebKit::highlightColor):
      (WebKit::TapHighlightController::drawRect):
      (WebKit::TapHighlightController::mouseEvent):
      * WebProcess/WebPage/TapHighlightController.h: Added.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      (WebKit::WebPage::highlightPotentialActivation):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::tapHighlightController):
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5f775c22