1. 21 Jan, 2014 1 commit
    • lauro.neto@openbossa.org's avatar
      Remove PLATFORM(NIX) from WebCore · ee418384
      lauro.neto@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=127299
      
      Reviewed by Anders Carlsson.
      
      * editing/Editor.cpp:
      (WebCore::Editor::cut):
      (WebCore::Editor::copy):
      (WebCore::Editor::copyImage):
      * editing/Editor.h:
      * html/HTMLCanvasElement.h:
      * loader/EmptyClients.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::defaultObjectContentType):
      * page/ChromeClient.h:
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * platform/Cursor.h:
      * platform/DragData.h:
      * platform/DragImage.h:
      * platform/FileSystem.h:
      * platform/LocalizedStrings.h:
      * platform/Widget.h:
      * platform/audio/FFTFrame.h:
      * platform/audio/HRTFElevation.cpp:
      * platform/cairo/WidgetBackingStore.h:
      * platform/graphics/ANGLEWebKitBridge.h:
      * platform/graphics/FontPlatformData.h:
      * platform/graphics/GLContext.cpp:
      (WebCore::GLContext::createContextForWindow):
      * platform/graphics/GLContext.h:
      * platform/graphics/GraphicsContext3D.h:
      * platform/graphics/GraphicsContext3DPrivate.cpp:
      (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
      * platform/graphics/OpenGLESShims.h:
      * platform/graphics/OpenGLShims.cpp:
      (WebCore::getProcAddress):
      * platform/graphics/OpenGLShims.h:
      * platform/graphics/PlatformLayer.h:
      * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
      * platform/graphics/opengl/Extensions3DOpenGL.cpp:
      (WebCore::Extensions3DOpenGL::createVertexArrayOES):
      (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
      (WebCore::Extensions3DOpenGL::isVertexArrayOES):
      (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
      (WebCore::Extensions3DOpenGL::supportsExtension):
      * platform/graphics/opengl/Extensions3DOpenGL.h:
      * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
      * platform/graphics/opengl/Extensions3DOpenGLES.h:
      * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
      * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
      (WebCore::GraphicsContext3D::reshape):
      * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
      * platform/graphics/texmap/TextureMapper.h:
      * platform/network/ResourceHandle.h:
      * plugins/PluginPackage.cpp:
      * plugins/PluginView.cpp:
      (WebCore::PluginView::PluginView):
      * plugins/PluginView.h:
      * plugins/PluginViewNone.cpp:
      * rendering/SimpleLineLayout.cpp:
      (WebCore::SimpleLineLayout::canUseFor):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee418384
  2. 09 Jan, 2014 2 commits
    • bburg@apple.com's avatar
      REGRESSION (r160152): Selection drag snapshot doesn't appear or has the wrong content on Retina · 284c8368
      bburg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125375
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Move scaling of drag images by the device scale factor out of DragClient
      and into WebCore. This removes several redundant copies and scaling operations.
      
      Fix scaling bugs that were cancelled out by over-allocating the backing store.
      
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Scale the drag image for a link
      according to the device scale factor before giving it to the OS.
      
      (WebCore::DragController::doImageDrag): Scale the drag image for an image
      according to the device scale factor before giving it to the OS.
      
      * page/FrameSnapshotting.cpp:
      (WebCore::snapshotFrameRect): Don't pre-scale or clip the snapshot. The
      ImageBuffer does this already.
      
      * platform/DragImage.cpp:
      (WebCore::createDragImageFromSnapshot): Don't scale the backing store
      when copying an ImageBuffer into an Image.
      
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::ImageBuffer::copyImage): Draw the image in user-space coordinates,
      not in backing-store coordinates. Remove unnecessary assertions. Crop the
      buffer before drawing the image into it.
      
      Source/WebKit2:
      
      Remove scaling from WebDragClient because it is now selectively
      performed by WebCore according to the drag image source.
      
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
      (WebKit::WebDragClient::startDrag): Don't scale the provided drag image.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      284c8368
    • bburg@apple.com's avatar
      Clean up confusing names and calculations in image-dragging functions · 7e579012
      bburg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126661
      
      Reviewed by Timothy Hatcher.
      
      No new tests.
      
      * page/DragController.cpp:
      (WebCore::DragController::doImageDrag): rename variables and
      simplify the calculation of the image's scaled origin.
      
      * platform/DragImage.cpp:
      (WebCore::fitDragImageToMaxSize): rename variables.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e579012
  3. 06 Jan, 2014 1 commit
  4. 21 Dec, 2013 1 commit
    • antti@apple.com's avatar
      Figure out if node is focusable without requiring renderer · f02be1e8
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126118
      
      Reviewed by Andreas Kling.
      
      * dom/Element.cpp:
      (WebCore::Element::computedStyle):
              
          Use inDocument() test instead of the attached() test. We can compute style for anything that
          is in document.
      
      * dom/Node.cpp:
      (WebCore::Node::isContentEditable):
      (WebCore::Node::isContentRichlyEditable):
      (WebCore::Node::hasEditableStyle):
              
          Use computedStyle instead of getting the style from renderer. Computed style gets constructed
          on demand if renderer does not exist. If it does then the existing style is used.
      
      (WebCore::Node::isEditableToAccessibility):
      (WebCore::Node::canStartSelection):
      (WebCore::Node::isRootEditableElement):
      (WebCore::Node::rootEditableElement):
      * dom/Node.h:
      (WebCore::Node::hasEditableStyle):
      (WebCore::Node::hasRichlyEditableStyle):
              
          Renamed from rendererIsEditable since these no longer require renderer.
      
      (WebCore::HTMLElement::supportsFocus):
              
          Stop calling updateStyleIfNeeded() and forcing render tree construction.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f02be1e8
  5. 05 Dec, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Consolidate various frame snapshot capabilities. · 2dd8bf0d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124325
      
      Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-12-04
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Various snapshot creation methods had duplicated code and were split
      between Frame, DragImage, and platform-specific implementationss.
      This patch puts WebCore snapshot methods into FrameSnapshotting
      and removes platform implementations where possible.
      
      DragImage methods reuse snapshot methods where possible. Inspector
      will be able to take snapshots without using drag images.
      
      No new tests, this is a refactoring.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Added.
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::snapshotFrameRect): Move most buffer logic to here.
      (WebCore::snapshotSelection): Moved from Frame.
      (WebCore::snapshotNode): Moved from Frame.
      * page/FrameSnapshotting.h: Added.
      * page/mac/FrameMac.mm: Removed.
      * page/mac/FrameSnapshottingMac.h: Removed.
      * page/mac/FrameSnapshottingMac.mm: Removed.
      * page/win/FrameWin.cpp: remove duplicate implementation.
      * page/win/FrameWin.h: Fix an incorrect parameter name.
      * platform/DragImage.cpp:
      (WebCore::ScopedNodeDragState::ScopedNodeDragState):
      (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
      (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
      (WebCore::createDragImageForNode):
      (WebCore::createDragImageForSelection):
      (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
      (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
      (WebCore::createDragImageForRange): Moved from Frame.
      (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
      (WebCore::createDragImageForLink): use nullptr.
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm: use new header file.
      
      Source/WebKit/mac:
      
      Use new platform-independent methods instead of Mac methods.
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage): use createDragImageForNode.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2dd8bf0d
  6. 28 Nov, 2013 1 commit
  7. 21 Nov, 2013 1 commit
    • gyuyoung.kim@samsung.com's avatar
      Generate toHTMLFooElement() to clean up static_cast<> · b86fc58f
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124571
      
      Reviewed by Ryosuke Niwa.
      
      Though there are a lot of clean up commits before, there are still
      use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
      toHTMLDetails|Meta|Summary|TableCaptionElement().
      
      Additionally, other static_cast<> are removed as well.
      
      No new tests, no behavior changes.
      
      * html/HTMLDetailsElement.h:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::selectNextSourceChild):
      * html/HTMLMetaElement.h:
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::isDisabledFormControl):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::detailsElement):
      * html/HTMLSummaryElement.h:
      * html/HTMLTableCaptionElement.h:
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::caption):
      * html/HTMLTagNames.in:
      * html/MediaDocument.cpp:
      (WebCore::MediaDocumentParser::createDocumentStructure):
      * html/shadow/DetailsMarkerControl.cpp:
      (WebCore::DetailsMarkerControl::summaryElement):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::handleFallbackContent):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
      * page/DragController.cpp:
      (WebCore::DragController::canProcessDrag):
      * page/Frame.cpp:
      (WebCore::Frame::searchForLabelsBeforeElement):
      * page/SpatialNavigation.cpp:
      (WebCore::frameOwnerElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b86fc58f
  8. 20 Nov, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r159551. · a8be4198
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/159551
      https://bugs.webkit.org/show_bug.cgi?id=124669
      
      made many tests asserts (Requested by anttik on #webkit).
      
      * html/HTMLDetailsElement.h:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::selectNextSourceChild):
      * html/HTMLMetaElement.h:
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::isDisabledFormControl):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::detailsElement):
      * html/HTMLSummaryElement.h:
      * html/HTMLTableCaptionElement.h:
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::caption):
      (WebCore::HTMLTableElement::tHead):
      (WebCore::HTMLTableElement::tFoot):
      (WebCore::HTMLTableElement::lastBody):
      * html/HTMLTableRowElement.cpp:
      (WebCore::HTMLTableRowElement::rowIndex):
      * html/HTMLTableSectionElement.h:
      * html/HTMLTagNames.in:
      * html/MediaDocument.cpp:
      (WebCore::MediaDocumentParser::createDocumentStructure):
      * html/shadow/DetailsMarkerControl.cpp:
      (WebCore::DetailsMarkerControl::summaryElement):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::handleFallbackContent):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
      * page/DragController.cpp:
      (WebCore::DragController::canProcessDrag):
      * page/Frame.cpp:
      (WebCore::Frame::searchForLabelsBeforeElement):
      * page/SpatialNavigation.cpp:
      (WebCore::frameOwnerElement):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a8be4198
    • gyuyoung.kim@samsung.com's avatar
      Generate toHTMLFooElement() to clean up static_cast<> · c25dca09
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124571
      
      Reviewed by Darin Adler.
      
      Though there are a lot of clean up commits before, there are still
      use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
      toHTMLDetails|Meta|Summary|TableSection|TableCaptionElement().
      
      Additionally, other static_cast<> are removed as well.
      
      No new tests, no behavior changes.
      
      * html/HTMLDetailsElement.h:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::selectNextSourceChild):
      * html/HTMLMetaElement.h:
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::isDisabledFormControl):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::detailsElement):
      * html/HTMLSummaryElement.h:
      * html/HTMLTableCaptionElement.h:
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::caption):
      (WebCore::HTMLTableElement::tHead):
      (WebCore::HTMLTableElement::tFoot):
      (WebCore::HTMLTableElement::lastBody):
      * html/HTMLTableRowElement.cpp:
      (WebCore::HTMLTableRowElement::rowIndex):
      * html/HTMLTableSectionElement.h:
      * html/HTMLTagNames.in:
      * html/MediaDocument.cpp:
      (WebCore::MediaDocumentParser::createDocumentStructure):
      * html/shadow/DetailsMarkerControl.cpp:
      (WebCore::DetailsMarkerControl::summaryElement):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::handleFallbackContent):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
      * page/DragController.cpp:
      (WebCore::DragController::canProcessDrag):
      * page/Frame.cpp:
      (WebCore::Frame::searchForLabelsBeforeElement):
      * page/SpatialNavigation.cpp:
      (WebCore::frameOwnerElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c25dca09
  9. 19 Nov, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r159455. · dd9a046c
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/159455
      https://bugs.webkit.org/show_bug.cgi?id=124568
      
      broke two api tests (see bug 124564) (Requested by thorton on
      #webkit).
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Removed.
      * page/FrameSnapshotting.h: Removed.
      * page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
      * page/mac/FrameSnapshottingMac.mm: Added.
      (WebCore::imageFromRect):
      (WebCore::selectionImage):
      (WebCore::rangeImage):
      (WebCore::snapshotDragImage):
      * page/win/FrameWin.cpp:
      (WebCore::Frame::dragImageForSelection):
      (WebCore::Frame::nodeImage):
      * page/win/FrameWin.h:
      * platform/DragImage.cpp:
      (WebCore::fitDragImageToMaxSize):
      (WebCore::createDragImageForLink):
      * platform/DragImage.h:
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm:
      
      Source/WebKit/mac:
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd9a046c
  10. 18 Nov, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Consolidate various frame snapshot capabilities. · 6978d8ed
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124325
      
      Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-11-18
      Reviewed by Timothy Hatcher.
      
      Source/WebCore:
      
      Various snapshot creation methods had duplicated code and were split
      between Frame, DragImage, and platform-specific implementationss.
      This patch puts WebCore snapshot methods into FrameSnapshotting
      and removes platform implementations where possible.
      
      DragImage methods reuse snapshot methods where possible. Inspector
      will be able to take snapshots without using drag images.
      
      No new tests, this is a refactoring.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Added.
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::snapshotFrameRect): Move most buffer logic to here.
      (WebCore::snapshotSelection): Moved from Frame.
      (WebCore::snapshotNode): Moved from Frame.
      * page/FrameSnapshotting.h: Added.
      * page/mac/FrameMac.mm: Removed.
      * page/mac/FrameSnapshottingMac.h: Removed.
      * page/mac/FrameSnapshottingMac.mm: Removed.
      * page/win/FrameWin.cpp: remove duplicate implementation.
      * page/win/FrameWin.h: Fix an incorrect parameter name.
      * platform/DragImage.cpp:
      (WebCore::ScopedNodeDragState::ScopedNodeDragState):
      (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
      (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
      (WebCore::createDragImageForNode):
      (WebCore::createDragImageForSelection):
      (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
      (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
      (WebCore::createDragImageForRange): Moved from Frame.
      (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
      (WebCore::createDragImageForLink): use nullptr.
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm: use new header file.
      
      Source/WebKit/mac:
      
      Use new platform-independent methods instead of Mac methods.
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage): use createDragImageForNode.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6978d8ed
  11. 10 Nov, 2013 1 commit
  12. 29 Oct, 2013 1 commit
  13. 24 Oct, 2013 1 commit
    • gyuyoung.kim@samsung.com's avatar
      Integrate css3-images image-orientation with existing EXIF support · c9c27bc2
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=91566
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Original patch by David Barr(davidbarr@chromium.org).
      
      This patch passes an information of image orientation into existing EXIF support functions
      (draw() functions of image classes mainly). We need to let the functions to know the information
      in order to meet the image-orientation requirement.
      
      Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation
      The css3-images module specification is at last call.
      
      Test: fast/css/image-orientation/image-orientation.html
      Image orientation test is to check if incorrect rotation value can be fixed with correct orientation.
      
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::imageSizeForRenderer):
      * page/DragController.cpp:
      (WebCore::DragController::doImageDrag):
      * page/Frame.cpp:
      (WebCore::Frame::nodeImage):
      * platform/graphics/BitmapImage.cpp:
      (WebCore::BitmapImage::updateSize):
      (WebCore::BitmapImage::sizeRespectingOrientation):
      (WebCore::BitmapImage::drawPattern):
      * platform/graphics/BitmapImage.h:
      * platform/graphics/CrossfadeGeneratedImage.cpp:
      (WebCore::CrossfadeGeneratedImage::draw):
      * platform/graphics/CrossfadeGeneratedImage.h:
      * platform/graphics/GeneratedImage.h:
      * platform/graphics/GradientImage.cpp:
      (WebCore::GradientImage::draw):
      * platform/graphics/GradientImage.h:
      * platform/graphics/Image.cpp:
      (WebCore::Image::draw):
      (WebCore::Image::drawTiled):
      * platform/graphics/Image.h:
      * platform/graphics/blackberry/ImageBlackBerry.cpp:
      * platform/graphics/cairo/BitmapImageCairo.cpp:
      (WebCore::BitmapImage::draw):
      * platform/graphics/cg/BitmapImageCG.cpp:
      * platform/graphics/cg/PDFDocumentImage.cpp:
      (WebCore::PDFDocumentImage::draw):
      * platform/graphics/cg/PDFDocumentImage.h:
      * platform/graphics/win/ImageCGWin.cpp:
      (WebCore::BitmapImage::getHBITMAPOfSize):
      (WebCore::BitmapImage::drawFrameMatchingSourceSize):
      * platform/graphics/wince/ImageBufferWinCE.cpp:
      (WebCore::BufferedImage::draw):
      * platform/graphics/wince/ImageWinCE.cpp:
      (WebCore::BitmapImage::draw):
      * platform/mac/DragImageMac.mm:
      (WebCore::createDragImageFromImage):
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::paintSnapshotImage):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::styleDidChange):
      * rendering/RenderSnapshottedPlugIn.cpp:
      (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::changeRequiresLayout):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::drawForContainer):
      (WebCore::SVGImage::nativeImageForCurrentFrame):
      (WebCore::SVGImage::draw):
      * svg/graphics/SVGImage.h:
      * svg/graphics/SVGImageForContainer.cpp:
      (WebCore::SVGImageForContainer::draw):
      * svg/graphics/SVGImageForContainer.h:
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Update export symbols for draw functions.
      
      LayoutTests:
      
      * fast/css/image-orientation/image-orientation-expected.txt: Fixed wrong description.
      * fast/css/image-orientation/image-orientation.html: Remove a space.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9c27bc2
  14. 07 Oct, 2013 1 commit
    • commit-queue@webkit.org's avatar
      CTTE: Use references in and around DragController · f293496b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122427
      
      Patch by Sam Weinig <sam@webkit.org> on 2013-10-07
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Use references to indicate non-nullness of DragController related
      objects.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DragClientEfl.cpp:
      (WebCore::DragClientEfl::willPerformDragDestinationAction):
      (WebCore::DragClientEfl::willPerformDragSourceAction):
      (WebCore::DragClientEfl::actionMaskForDrag):
      (WebCore::DragClientEfl::startDrag):
      * WebCoreSupport/DragClientEfl.h:
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/DragClientGtk.cpp:
      (WebKit::DragClient::willPerformDragDestinationAction):
      (WebKit::DragClient::willPerformDragSourceAction):
      (WebKit::DragClient::actionMaskForDrag):
      (WebKit::DragClient::startDrag):
      * WebCoreSupport/DragClientGtk.h:
      * webkit/webkitwebview.cpp:
      (dragExitedCallback):
      (webkit_web_view_drag_motion):
      (webkit_web_view_drag_data_received):
      (webkit_web_view_drag_drop):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebDragClient.h:
      * WebCoreSupport/WebDragClient.mm:
      (WebDragClient::actionMaskForDrag):
      (WebDragClient::willPerformDragDestinationAction):
      (WebDragClient::willPerformDragSourceAction):
      (WebDragClient::startDrag):
      (WebDragClient::declareAndWriteDragImage):
      * WebView/WebFrame.mm:
      (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
      * WebView/WebView.mm:
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebDragClient.cpp:
      (WebDragClient::actionMaskForDrag):
      (WebDragClient::willPerformDragDestinationAction):
      (WebDragClient::willPerformDragSourceAction):
      (WebDragClient::startDrag):
      * WebCoreSupport/WebDragClient.h:
      
      Source/WebKit2:
      
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      (webkitWebViewBaseDragDataReceived):
      (webkitWebViewBaseDragMotion):
      (dragExitedCallback):
      (webkitWebViewBaseDragDrop):
      * UIProcess/API/mac/WKView.mm:
      (-[WKView draggingEntered:]):
      (-[WKView draggingUpdated:]):
      (-[WKView draggingExited:]):
      (-[WKView performDragOperation:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::dragEntered):
      (WebKit::WebPageProxy::dragUpdated):
      (WebKit::WebPageProxy::dragExited):
      (WebKit::WebPageProxy::performDrag):
      (WebKit::WebPageProxy::performDragControllerAction):
      * UIProcess/WebPageProxy.h:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction):
      (WebKit::WebDragClient::willPerformDragSourceAction):
      (WebKit::WebDragClient::actionMaskForDrag):
      (WebKit::WebDragClient::dragSourceActionMaskForPoint):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
      (WebKit::WebDragClient::startDrag):
      (WebKit::cachedImage):
      (WebKit::WebDragClient::declareAndWriteDragImage):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f293496b
  15. 06 Oct, 2013 1 commit
  16. 05 Oct, 2013 1 commit
  17. 30 Sep, 2013 1 commit
    • darin@apple.com's avatar
      Use RenderElement instead of RenderObject in many places · 8cdf7124
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122078
      
      Reviewed by Andreas Kling.
      
      Source/ThirdParty/ANGLE:
      
      * ANGLE.xcodeproj/project.pbxproj: Let Xcode do its thing to this file.
      
      Source/WebCore:
      
      * WebCore.exp.in: Updated for name changes.
      
      * dom/ContainerNode.h: Moved renderer() here from Element.
      * dom/Element.h: Moved renderer() from here to ContainerNode.
      * render/RenderElement.h: Moved renderer() from Element to ContainerNode.
      
      * accessibility/AccessibilityImageMapLink.cpp:
      (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
      (WebCore::AccessibilityImageMapLink::detachFromParent):
      (WebCore::AccessibilityImageMapLink::elementPath):
      (WebCore::AccessibilityImageMapLink::elementRect):
      * accessibility/AccessibilityImageMapLink.h:
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
      * bindings/objc/DOM.mm:
      (-[DOMElement image]):
      (-[DOMElement _font]):
      (-[DOMElement _imageTIFFRepresentation]):
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::canvasChanged):
      (WebCore::CSSCanvasValue::canvasResized):
      (WebCore::CSSCanvasValue::canvasDestroyed):
      (WebCore::CSSCanvasValue::fixedSize):
      (WebCore::CSSCanvasValue::image):
      * css/CSSCanvasValue.h:
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::computeRenderStyleForProperty):
      * css/CSSCrossfadeValue.cpp:
      (WebCore::subimageKnownToBeOpaque):
      (WebCore::CSSCrossfadeValue::fixedSize):
      (WebCore::CSSCrossfadeValue::knownToBeOpaque):
      (WebCore::CSSCrossfadeValue::image):
      (WebCore::CSSCrossfadeValue::crossfadeChanged):
      * css/CSSCrossfadeValue.h:
      * css/CSSFilterImageValue.cpp:
      (WebCore::CSSFilterImageValue::fixedSize):
      (WebCore::CSSFilterImageValue::knownToBeOpaque):
      (WebCore::CSSFilterImageValue::image):
      (WebCore::CSSFilterImageValue::filterImageChanged):
      * css/CSSFilterImageValue.h:
      * css/CSSFontSelector.cpp:
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientValue::image):
      (WebCore::CSSGradientValue::addStops):
      (WebCore::CSSGradientValue::knownToBeOpaque):
      (WebCore::CSSLinearGradientValue::createGradient):
      (WebCore::CSSRadialGradientValue::createGradient):
      * css/CSSGradientValue.h:
      (WebCore::CSSGradientValue::fixedSize):
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::addClient):
      (WebCore::CSSImageGeneratorValue::removeClient):
      (WebCore::CSSImageGeneratorValue::image):
      (WebCore::CSSImageGeneratorValue::fixedSize):
      (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
      * css/CSSImageGeneratorValue.h:
      (WebCore::CSSImageGeneratorValue::clients):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::knownToBeOpaque):
      * css/CSSImageValue.h:
      * css/DeprecatedStyleBuilder.cpp:
      * dom/DocumentMarkerController.cpp:
      (WebCore::DocumentMarkerController::removeMarkersFromList):
      (WebCore::DocumentMarkerController::repaintMarkers):
      * dom/Element.cpp:
      (WebCore::localZoomForRenderer):
      (WebCore::adjustForLocalZoom):
      (WebCore::Element::offsetParent):
      (WebCore::Element::updateExistingPseudoElement):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::create):
      (WebCore::ElementRareData::ElementRareData):
      * dom/Node.cpp:
      (WebCore::Node::ensureRareData):
      * editing/DeleteButtonController.cpp:
      (WebCore::isDeletableElement):
      * editing/Editor.cpp:
      (WebCore::Editor::hasBidiSelection):
      (WebCore::Editor::baseWritingDirectionForSelectionStart):
      * editing/EditorCommand.cpp:
      (WebCore::verticalScrollDistance):
      * editing/htmlediting.cpp:
      (WebCore::directionOfEnclosingBlock):
      * editing/ios/EditorIOS.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::getImage):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::getImage):
      * editing/markup.cpp:
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::computePath):
      (WebCore::HTMLAreaElement::computeRect):
      (WebCore::HTMLAreaElement::setFocus):
      * html/HTMLAreaElement.h:
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::reset):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::setInnerText):
      * html/HTMLFormControlElement.cpp:
      (WebCore::updateFromElementCallback):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::rendererIsNeeded):
      * html/HTMLFrameOwnerElement.h:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::x):
      (WebCore::HTMLImageElement::y):
      (WebCore::HTMLImageElement::willRespondToMouseClickEvents):
      * html/HTMLMapElement.cpp:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::defaultEventHandler):
      * html/HTMLMeterElement.cpp:
      (WebCore::HTMLMeterElement::renderMeter):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::didRecalcStyle):
      * html/HTMLPlugInElement.cpp:
      (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
      (WebCore::HTMLPlugInElement::defaultEventHandler):
      (WebCore::HTMLPlugInElement::isKeyboardFocusable):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::defaultEventHandler):
      * html/HTMLProgressElement.cpp:
      (WebCore::HTMLProgressElement::renderProgress):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::scrollToSelection):
      (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
      (WebCore::HTMLSelectElement::selectOption):
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::cellAbove):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::hasVisibleTextArea):
      (WebCore::HTMLTextFormControlElement::setSelectionRange):
      * html/InputType.h:
      * html/parser/HTMLResourcePreloader.cpp:
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::MediaControlElement::setDisplayType):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlPanelElement::startDrag):
      (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
      * html/shadow/MeterShadowElement.cpp:
      (WebCore::MeterShadowElement::rendererIsNeeded):
      (WebCore::MeterInnerElement::rendererIsNeeded):
      * inspector/InspectorOverlay.cpp:
      * inspector/InspectorTimelineAgent.cpp:
      * inspector/InspectorTimelineAgent.h:
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::renderImageResource):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::currentFrameKnownToBeOpaque):
      * loader/cache/CachedImage.h:
      * mathml/MathMLElement.cpp:
      * page/ContextMenuController.cpp:
      * page/DragController.cpp:
      (WebCore::DragController::draggableElement):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::EventHandler):
      (WebCore::EventHandler::clear):
      (WebCore::EventHandler::startPanScrolling):
      (WebCore::EventHandler::autoscrollRenderer):
      (WebCore::EventHandler::scrollOverflow):
      (WebCore::EventHandler::logicalScrollOverflow):
      (WebCore::EventHandler::subframeForTargetNode):
      (WebCore::EventHandler::selectCursor):
      (WebCore::layerForNode):
      (WebCore::EventHandler::handleWheelEvent):
      (WebCore::EventHandler::clearGestureScrollNodes):
      * page/EventHandler.h:
      * page/FocusController.cpp:
      * page/Frame.cpp:
      (WebCore::Frame::ownerRenderer):
      (WebCore::Frame::visiblePositionForPoint):
      (WebCore::Frame::nodeImage):
      * page/FrameView.cpp:
      (WebCore::FrameView::applyOverflowToViewport):
      (WebCore::FrameView::applyPaginationToViewport):
      (WebCore::FrameView::calculateScrollbarModesForLayout):
      (WebCore::FrameView::isEnclosedInCompositingLayer):
      (WebCore::FrameView::embeddedContentBox):
      (WebCore::FrameView::addSlowRepaintObject):
      (WebCore::FrameView::removeSlowRepaintObject):
      (WebCore::FrameView::addViewportConstrainedObject):
      (WebCore::FrameView::removeViewportConstrainedObject):
      (WebCore::FrameView::scrollContentsFastPath):
      (WebCore::FrameView::repaintSlowRepaintObjects):
      (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
      (WebCore::FrameView::updateOverflowStatus):
      (WebCore::FrameView::updateScrollCorner):
      (WebCore::FrameView::paintContents):
      (WebCore::FrameView::convertFromRenderer):
      (WebCore::FrameView::convertToRenderer):
      * page/FrameView.h:
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::addImageToResources):
      * page/PageSerializer.h:
      * page/animation/AnimationBase.cpp:
      (WebCore::AnimationBase::AnimationBase):
      (WebCore::AnimationBase::updateStateMachine):
      * page/animation/AnimationBase.h:
      (WebCore::AnimationBase::renderer):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
      (WebCore::AnimationControllerPrivate::clear):
      (WebCore::AnimationControllerPrivate::updateAnimations):
      (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
      (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
      (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
      (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
      (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
      (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
      (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
      (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
      (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
      (WebCore::AnimationController::cancelAnimations):
      (WebCore::AnimationController::updateAnimations):
      (WebCore::AnimationController::getAnimatedStyleForRenderer):
      (WebCore::AnimationController::notifyAnimationStarted):
      (WebCore::AnimationController::pauseAnimationAtTime):
      (WebCore::AnimationController::pauseTransitionAtTime):
      (WebCore::AnimationController::isRunningAnimationOnRenderer):
      (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
      * page/animation/AnimationController.h:
      * page/animation/AnimationControllerPrivate.h:
      * page/animation/CSSPropertyAnimation.cpp:
      (WebCore::crossfadeBlend):
      * page/animation/CompositeAnimation.cpp:
      (WebCore::CompositeAnimation::updateTransitions):
      (WebCore::CompositeAnimation::updateKeyframeAnimations):
      (WebCore::CompositeAnimation::animate):
      * page/animation/CompositeAnimation.h:
      * page/animation/ImplicitAnimation.cpp:
      (WebCore::ImplicitAnimation::ImplicitAnimation):
      (WebCore::ImplicitAnimation::animate):
      (WebCore::ImplicitAnimation::pauseAnimation):
      (WebCore::ImplicitAnimation::sendTransitionEvent):
      * page/animation/ImplicitAnimation.h:
      (WebCore::ImplicitAnimation::create):
      * page/animation/KeyframeAnimation.cpp:
      (WebCore::KeyframeAnimation::KeyframeAnimation):
      (WebCore::KeyframeAnimation::animate):
      (WebCore::KeyframeAnimation::pauseAnimation):
      (WebCore::KeyframeAnimation::endAnimation):
      (WebCore::KeyframeAnimation::sendAnimationEvent):
      * page/animation/KeyframeAnimation.h:
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
      (WebCore::EventHandler::passSubframeEventToSubframe):
      * page/mac/FrameSnapshottingMac.mm:
      (WebCore::snapshotDragImage):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::paint):
      * rendering/CounterNode.cpp:
      (WebCore::CounterNode::CounterNode):
      (WebCore::CounterNode::create):
      * rendering/CounterNode.h:
      (WebCore::CounterNode::owner):
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::FilterEffectRenderer::buildReferenceFilter):
      (WebCore::FilterEffectRenderer::build):
      * rendering/FilterEffectRenderer.h:
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::spellingToolTip):
      (WebCore::HitTestResult::title):
      (WebCore::HitTestResult::innerTextIfTruncated):
      (WebCore::HitTestResult::image):
      * rendering/LayoutRepainter.cpp:
      (WebCore::LayoutRepainter::LayoutRepainter):
      * rendering/LayoutRepainter.h:
      * rendering/LayoutState.h:
      (WebCore::LayoutState::LayoutState):
      * rendering/LineWidth.h:
      * rendering/LogicalSelectionOffsetCaches.h:
      (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject):
      (WebCore::isNonRenderBlockInline):
      (WebCore::containingBlockForFixedPosition):
      (WebCore::containingBlockForAbsolutePosition):
      (WebCore::containingBlockForObjectInFlow):
      (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
      * rendering/PaintInfo.h:
      (WebCore::PaintInfo::PaintInfo):
      (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::paintFillLayers):
      (WebCore::RenderBox::paintFillLayer):
      * rendering/RenderBox.h:
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintFillLayerExtended):
      (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
      * rendering/RenderBoxModelObject.h:
      * rendering/RenderCounter.cpp:
      (WebCore::nextInPreOrder):
      (WebCore::planCounter):
      (WebCore::makeCounterNode):
      (WebCore::RenderCounter::originalText):
      * rendering/RenderElement.cpp:
      (WebCore::RenderElement::~RenderElement):
      (WebCore::RenderElement::insertChildInternal):
      (WebCore::RenderElement::removeChildInternal):
      (WebCore::RenderElement::willBeDestroyed):
      (WebCore::RenderElement::rendererForRootBackground):
      * rendering/RenderImageResource.cpp:
      (WebCore::RenderImageResource::initialize):
      * rendering/RenderImageResource.h:
      * rendering/RenderImageResourceStyleImage.cpp:
      (WebCore::RenderImageResourceStyleImage::initialize):
      * rendering/RenderImageResourceStyleImage.h:
      (WebCore::RenderImageResourceStyleImage::create):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
      (WebCore::RenderLayerCompositor::requiresCompositingLayer):
      (WebCore::RenderLayerCompositor::canBeComposited):
      (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
      (WebCore::RenderLayerCompositor::reasonsForCompositing):
      (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
      (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
      (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
      (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
      (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
      (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
      (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
      (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
      (WebCore::RenderLayerCompositor::requiresCompositingForBlending):
      (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
      (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
      * rendering/RenderLayerCompositor.h:
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::containingBlock):
      (WebCore::mustRepaintFillLayers):
      (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered):
      (WebCore::RenderObject::willBeDestroyed):
      * rendering/RenderScrollbarPart.cpp:
      (WebCore::RenderScrollbarPart::rendererOwningScrollbar):
      * rendering/RenderScrollbarPart.h:
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::paintBackgroundsBehindCell):
      * rendering/RenderTableCell.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::RenderView):
      * rendering/style/FillLayer.cpp:
      (WebCore::FillLayer::hasOpaqueImage):
      * rendering/style/FillLayer.h:
      * rendering/style/KeyframeList.h:
      (WebCore::KeyframeList::KeyframeList):
      * rendering/style/StyleCachedImage.cpp:
      (WebCore::StyleCachedImage::imageSize):
      (WebCore::StyleCachedImage::computeIntrinsicDimensions):
      (WebCore::StyleCachedImage::setContainerSizeForRenderer):
      (WebCore::StyleCachedImage::addClient):
      (WebCore::StyleCachedImage::removeClient):
      (WebCore::StyleCachedImage::image):
      (WebCore::StyleCachedImage::knownToBeOpaque):
      * rendering/style/StyleCachedImage.h:
      * rendering/style/StyleCachedImageSet.cpp:
      (WebCore::StyleCachedImageSet::imageSize):
      (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
      (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
      (WebCore::StyleCachedImageSet::addClient):
      (WebCore::StyleCachedImageSet::removeClient):
      (WebCore::StyleCachedImageSet::image):
      (WebCore::StyleCachedImageSet::knownToBeOpaque):
      * rendering/style/StyleCachedImageSet.h:
      * rendering/style/StyleGeneratedImage.cpp:
      (WebCore::StyleGeneratedImage::imageSize):
      (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
      (WebCore::StyleGeneratedImage::addClient):
      (WebCore::StyleGeneratedImage::removeClient):
      (WebCore::StyleGeneratedImage::image):
      (WebCore::StyleGeneratedImage::knownToBeOpaque):
      * rendering/style/StyleGeneratedImage.h:
      * rendering/style/StyleImage.h:
      (WebCore::StyleImage::imagesEquivalent):
      * rendering/style/StylePendingImage.h:
      (WebCore::StylePendingImage::cssImageValue):
      (WebCore::StylePendingImage::cssImageGeneratorValue):
      (WebCore::StylePendingImage::cssCursorImageValue):
      (WebCore::StylePendingImage::cssImageSetValue):
      (WebCore::StylePendingImage::computeIntrinsicDimensions):
      * testing/Internals.cpp:
      (WebCore::Internals::boundingBox):
      (WebCore::Internals::isSelectPopupVisible):
      (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
      Use RenderElement instead of RenderObject where it was easy to do so.
      For local variables holding the return value of renderer() functions,
      use auto instead, so the most-specific possible type will be used,
      without having to figure out what that is in each case. Also use some
      more OVERRIDE and FINAL and use nullptr instead of 0. And replace some
      cryptic short local variable names with words.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8cdf7124
  18. 27 Sep, 2013 2 commits
    • darin@apple.com's avatar
      rename KURL to URL · 5ffbb5c7
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=16214
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * many files: Renamed, using script.
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      Let the script to try to rename here.
      
      Source/WebKit/blackberry:
      
      * many files: Renamed, using script.
      
      Source/WebKit/efl:
      
      * many files: Renamed, using script.
      
      Source/WebKit/gtk:
      
      * many files: Renamed, using script.
      
      Source/WebKit/mac:
      
      * many files: Renamed, using script.
      
      Source/WebKit/qt:
      
      * many files: Renamed, using script.
      
      Source/WebKit/win:
      
      * many files: Renamed, using script.
      
      Source/WebKit/wince:
      
      * many files: Renamed, using script.
      
      Source/WebKit2:
      
      * many files: Renamed, using script.
      
      Tools:
      
      * many files: Renamed, using script.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ffbb5c7
    • 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
  19. 14 Sep, 2013 2 commits
    • zandobersek@gmail.com's avatar
      REGRESSION(r155228): Call to DragData::asFragment() nullifies... · e11a28e1
      zandobersek@gmail.com authored
      REGRESSION(r155228): Call to DragData::asFragment() nullifies PassRefPtr<Range> in documentFragmentFromDragData
      https://bugs.webkit.org/show_bug.cgi?id=121359
      
      Reviewed by Darin Adler.
      
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData): Pass the naked pointer as the PassRefPtr<Range> argument to the DragData::asFragment()
      call. The naked pointer will get wrapped and protected by a new PassRefPtr. Passing the original PassRefPtr will also create
      a new PassRefPtr, but will leak the reference of the original one, leaving its pointer nullified.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e11a28e1
    • weinig@apple.com's avatar
      [CTTE] Node subclasses should take a Document by reference in their · c1d18d0d
      weinig@apple.com authored
      constructor (HTMLAnchorElement, HTMLAppletElement, HTMLAreaElement, HTMLAudioElement)
      https://bugs.webkit.org/show_bug.cgi?id=121365
      
      Reviewed by Andreas Kling.
      
      * editing/CreateLinkCommand.cpp:
      (WebCore::CreateLinkCommand::doApply):
      * editing/UnlinkCommand.cpp:
      (WebCore::UnlinkCommand::doApply):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::HTMLAnchorElement):
      (WebCore::HTMLAnchorElement::create):
      * html/HTMLAnchorElement.h:
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::HTMLAppletElement):
      (WebCore::HTMLAppletElement::create):
      * html/HTMLAppletElement.h:
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::HTMLAreaElement):
      (WebCore::HTMLAreaElement::create):
      * html/HTMLAreaElement.h:
      * html/HTMLAudioElement.cpp:
      (WebCore::HTMLAudioElement::HTMLAudioElement):
      (WebCore::HTMLAudioElement::create):
      (WebCore::HTMLAudioElement::createForJSConstructor):
      * html/HTMLAudioElement.h:
      * html/HTMLTagNames.in:
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addLink):
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1d18d0d
  20. 13 Sep, 2013 2 commits
    • weinig@apple.com's avatar
      Chrome, DragController and FocusController should hold onto a Page& · fede3e50
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121325
      
      Reviewed by Anders Carlsson.
      
      * editing/FrameSelection.cpp:
      * editing/FrameSelection.h:
      * page/Chrome.cpp:
      (WebCore::Chrome::Chrome):
      (WebCore::Chrome::scroll):
      (WebCore::Chrome::createWindow):
      (WebCore::canRunModalIfDuringPageDismissal):
      (WebCore::Chrome::runBeforeUnloadConfirmPanel):
      (WebCore::Chrome::runJavaScriptAlert):
      (WebCore::Chrome::runJavaScriptConfirm):
      (WebCore::Chrome::runJavaScriptPrompt):
      (WebCore::Chrome::mouseDidMoveOverElement):
      (WebCore::Chrome::setToolTip):
      (WebCore::Chrome::windowScreenDidChange):
      * page/Chrome.h:
      * page/DragController.cpp:
      * page/DragController.h:
      * page/mac/DragControllerMac.mm:
      * page/FocusController.cpp:
      * page/FocusController.h:
      * page/Page.cpp:
      (WebCore::Page::Page):
      * page/PageGroupLoadDeferrer.cpp:
      * page/PageGroupLoadDeferrer.h:
      Take references where possible.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fede3e50
    • darin@apple.com's avatar
      Remove layering-violating Pasteboard::writeURL (for all platforms now) · 22281e3a
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121306
      
      Reviewed by Antti Koivisto.
      
      * editing/Editor.cpp:
      (WebCore::Editor::copyURL): Move the contents of the writeURLToPasteboard function
      in here.
      
      * editing/Editor.h: Removed Mac-specific writeURLToPasteboard, added private
      Mac-specific fillInUserVisibleForm function for the one Mac-specific part of writing URLs.
      
      * editing/efl/EditorEfl.cpp: Deleted Editor::writeURLToPasteboard.
      
      * editing/mac/EditorMac.mm: Deleted Editor::writeURLToPasteboard, moving the code
      into copyURL.
      (WebCore::Editor::fillInUserVisibleForm): Added.
      
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Call copyURL instead of writeURL or
      writeURLToPasteboard.
      
      * platform/Pasteboard.h: Fixed up the PasteboardURL struct so it's suitable for
      cross-platform use. Removed the writeURL function. Removed the Frame* argument from
      the Windows-specific writeURLToDataObject function.
      
      * platform/blackberry/PasteboardBlackBerry.cpp:
      (WebCore::Pasteboard::write): Renamed/refactored from writeURL.
      * platform/gtk/PasteboardGtk.cpp:
      (WebCore::Pasteboard::write): Ditto.
      * platform/nix/PasteboardNix.cpp:
      (WebCore::Pasteboard::write): Ditto.
      * platform/qt/PasteboardQt.cpp:
      (WebCore::Pasteboard::write): Ditto.
      * platform/win/PasteboardWin.cpp:
      (WebCore::Pasteboard::writeURLToDataObject): Removed unused Frame* argument.
      (WebCore::Pasteboard::write): Renamed/refactored from writeURL.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22281e3a
  21. 12 Sep, 2013 1 commit
    • darin@apple.com's avatar
      [EFL] Get rid of layering violations in PasteboardEfl.cpp · a73d415e
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121241
      
      Patch by Christophe Dumez <ch.dumez@sisa.samsung.com> on 2013-09-12
      Reviewed by Darin Adler.
      
      Get rid of layering violations in PasteboardEfl.cpp. For now, just mimic
      the Mac port to avoid divergences and leave port-specific functions
      unimplemented as the EFL port does not support the pasteboard functionality
      yet.
      
      No new tests, no behavior change.
      
      * PlatformEfl.cmake:
      * editing/Editor.cpp:
      (WebCore::Editor::pasteAsPlainTextWithPasteboard):
      (WebCore::Editor::cut):
      (WebCore::Editor::copy):
      (WebCore::Editor::copyURL):
      (WebCore::Editor::copyImage):
      * editing/Editor.h:
      * editing/efl/EditorEfl.cpp: Added.
      (WebCore::Editor::writeSelectionToPasteboard):
      (WebCore::Editor::writeURLToPasteboard):
      (WebCore::Editor::writeImageToPasteboard):
      (WebCore::Editor::readPlainTextFromPasteboard):
      (WebCore::Editor::pasteWithPasteboard):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * platform/Pasteboard.h:
      * platform/efl/PasteboardEfl.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a73d415e
  22. 07 Sep, 2013 1 commit
    • rniwa@webkit.org's avatar
      Range::ownerDocument should return Document& · 55f28e5e
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120908
      
      Reviewed by Andreas Kling.
      
      Source/WebCore: 
      
      Return Document& in Range::ownerDocument(). Also make setDocument take Document& so that this invariant is self-evident.
      
      * bindings/objc/DOM.mm:
      (-[DOMRange boundingBox]):
      (-[DOMRange renderedImageForcingBlackText:]):
      (-[DOMRange textRects]):
      * dom/Range.cpp:
      (WebCore::Range::setDocument):
      (WebCore::Range::setStart):
      (WebCore::Range::setEnd):
      (WebCore::Range::selectNode):
      (WebCore::Range::selectNodeContents):
      * dom/Range.h:
      (WebCore::Range::ownerDocument):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
      * editing/Editor.cpp:
      (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
      (WebCore::isFrameInRange):
      (WebCore::Editor::countMatchesForText):
      * editing/EditorCommand.cpp:
      (WebCore::unionDOMRanges):
      * editing/TextCheckingHelper.cpp:
      (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
      * editing/TextIterator.cpp:
      (WebCore::plainText):
      (WebCore::findPlainText):
      * editing/htmlediting.cpp:
      (WebCore::extendRangeToWrappingNodes):
      * editing/markup.cpp:
      (WebCore::createMarkup):
      (WebCore::createFragmentFromText):
      * page/DragController.cpp:
      (WebCore::documentFragmentFromDragData):
      (WebCore::DragController::concludeEditDrag):
      * page/Page.cpp:
      (WebCore::Page::rangeOfString):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
      * testing/Internals.cpp:
      (WebCore::Internals::addTextMatchMarker):
      
      Source/WebKit/blackberry: 
      
      * WebKitSupport/InPageSearchManager.cpp:
      (BlackBerry::WebKit::InPageSearchManager::findNextString):
      (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
      (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
      (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
      (BlackBerry::WebKit::InPageSearchManager::frameUnloaded):
      (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
      
      Source/WebKit/mac: 
      
      * WebView/WebPDFView.mm:
      (isFrameInRange):
      
      Source/WebKit2: 
      
      * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
      (-[WKDOMRange textRects]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55f28e5e
  23. 01 Sep, 2013 2 commits
    • darin@apple.com's avatar
      Refactor URL and image writing so layer-violating parts are in Editor, not... · 56416c73
      darin@apple.com authored
      Refactor URL and image writing so layer-violating parts are in Editor, not Pasteboard (Mac-only at first)
      https://bugs.webkit.org/show_bug.cgi?id=120573
      
      Reviewed by Andreas Kling.
      
      * editing/Editor.cpp:
      (WebCore::Editor::copy): Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
      (WebCore::Editor::copyURL): Use writeURLToPasteboard instead of Pasteboard::writeURL on Mac.
      (WebCore::innerNonSharedElement): Added. Used in copyImage.
      (WebCore::Editor::copyImage): Use innerNonSharedElement instead of innerNonSharedNode.
      Use writeImageToPasteboard instead of Pasteboard::writeImage on Mac.
      
      * editing/Editor.h: Add new functions, writeURLToPasteboard and writeImageToPasteboard,
      both Mac-only for now.
      
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::pasteWithPasteboard): Removed unneeded "m_frame.editor()" round trip that
      was left behind in this function.
      (WebCore::getImage): Added. Helper used by writeImageToPasteboard.
      (WebCore::Editor::writeURLToPasteboard): Added. Sets up PasteboardURL and then calls
      Pasteboard::write with it.
      (WebCore::Editor::writeImageToPasteboard): Added. Sets up PasteboardImage and then calls
      Pasteboard::write with it.
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Use Editor::writeURLToPasteboard instead of
      Pasteboard::writeURL on Mac.
      
      * platform/Pasteboard.h: Added PasteboardURL and PasteboardImage structures.
      Declare write functions for PasteboardWebContent, PasteboardURL, and PasteboardImage.
      Guard writeURL and writeImage with !PLATFORM(MAC).
      
      * platform/mac/PasteboardMac.mm:
      (WebCore::writeURLForTypes): Changed this to take a PasteboardURL.
      (WebCore::Pasteboard::write): Renamed writeURL and writeImage to this. Refactor both
      to take PasteboardURL and PasteboardImage arguments.
      (WebCore::fileWrapper): Renamed from fileWrapperForImage since the fact that this is
      for an image is now clear from its argument, a PasteboardImage.
      (WebCore::writeFileWrapperAsRTFDAttachment): Changed this function to use early return.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56416c73
    • akling@apple.com's avatar
      EditCommand constructors should take Document&. · d455eb63
      akling@apple.com authored
      <https://webkit.org/b/120566>
      
      Reviewed by Darin Adler.
      
      Let EditCommand's and all subclass constructors take Document& instead of Document*.
      EditCommand::document() now returns a Document&.
      
      Added Editor::document() which returns Editor::frame().document() after asserting
      that it's non-null, to make passing a Document& from Editor functions easier.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d455eb63
  24. 30 Aug, 2013 1 commit
  25. 29 Aug, 2013 1 commit
    • darin@apple.com's avatar
      Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only) · 860f0ea8
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120483
      
      Reviewed by Anders Carlsson.
      
      * editing/Editor.cpp:
      (WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
      function on Mac instead of Pasteboard::writeSelection.
      (WebCore::Editor::copy): Ditto.
      
      * editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
      that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
      Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.
      
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
      puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
      do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
      for each platform.
      
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
      function on Mac instead of Pasteboard::writeSelection.
      
      * platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
      that don't belong in this class because they are layering violations; this becomes the to do list for
      the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
      except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
      Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
      Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.
      
      * platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
      Pasteboard::writeSelectionForTypes, and writeSelection functions.
      (WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
      (WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      860f0ea8
  26. 27 Aug, 2013 1 commit
  27. 25 Aug, 2013 1 commit
  28. 19 Aug, 2013 2 commits
    • psolanki@apple.com's avatar
      <https://webkit.org/b/119918> Frame::selection() should return a reference · 87ae63d7
      psolanki@apple.com authored
      Reviewed by Darin Adler.
      
      m_selection is never NULL so return a reference from Frame::selection(). Also removed some
      unnecessary null checks and assert diff ts exposed as a result.
      
      Source/WebCore:
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::selection):
      (WebCore::AccessibilityRenderObject::setSelectedTextRange):
      (WebCore::AccessibilityRenderObject::isFocused):
      (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
      (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
      * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
      (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
      (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
      (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
      (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::isFrameFocused):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::setDataAndUpdate):
      * dom/Document.cpp:
      (WebCore::Document::nodeChildrenWillBeRemoved):
      (WebCore::Document::nodeWillBeRemoved):
      * dom/Element.cpp:
      (WebCore::Element::updateFocusAppearance):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::stopPendingCorrection):
      (WebCore::AlternativeTextController::applyAlternativeTextToRange):
      (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
      (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
      (WebCore::AlternativeTextController::timerFired):
      (WebCore::AlternativeTextController::respondToChangedSelection):
      * editing/DeleteButtonController.cpp:
      (WebCore::DeleteButtonController::respondToChangedSelection):
      (WebCore::DeleteButtonController::enable):
      (WebCore::DeleteButtonController::deleteTarget):
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
      * editing/DictationCommand.cpp:
      (WebCore::DictationCommand::insertText):
      * editing/EditCommand.cpp:
      (WebCore::EditCommand::EditCommand):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::mergeTypingStyle):
      * editing/Editor.cpp:
      (WebCore::Editor::selectionForCommand):
      (WebCore::Editor::canEdit):
      (WebCore::Editor::canEditRichly):
      (WebCore::Editor::canDHTMLCut):
      (WebCore::Editor::canDHTMLCopy):
      (WebCore::Editor::canCopy):
      (WebCore::Editor::canDelete):
      (WebCore::Editor::canSmartCopyOrDelete):
      (WebCore::Editor::deleteWithDirection):
      (WebCore::Editor::deleteSelectionWithSmartDelete):
      (WebCore::Editor::replaceSelectionWithFragment):
      (WebCore::Editor::selectedRange):
      (WebCore::Editor::tryDHTMLCopy):
      (WebCore::Editor::tryDHTMLCut):
      (WebCore::Editor::hasBidiSelection):
      (WebCore::Editor::selectionUnorderedListState):
      (WebCore::Editor::selectionOrderedListState):
      (WebCore::Editor::increaseSelectionListLevel):
      (WebCore::Editor::increaseSelectionListLevelOrdered):
      (WebCore::Editor::increaseSelectionListLevelUnordered):
      (WebCore::Editor::decreaseSelectionListLevel):
      (WebCore::Editor::findEventTargetFromSelection):
      (WebCore::Editor::applyStyle):
      (WebCore::Editor::applyParagraphStyle):
      (WebCore::Editor::applyStyleToSelection):
      (WebCore::Editor::applyParagraphStyleToSelection):
      (WebCore::Editor::selectionStartHasStyle):
      (WebCore::Editor::selectionHasStyle):
      (WebCore::Editor::selectionStartCSSPropertyValue):
      (WebCore::Editor::appliedEditing):
      (WebCore::Editor::insertTextWithoutSendingTextEvent):
      (WebCore::Editor::insertLineBreak):
      (WebCore::Editor::insertParagraphSeparator):
      (WebCore::Editor::cut):
      (WebCore::Editor::copy):
      (WebCore::Editor::paste):
      (WebCore::Editor::baseWritingDirectionForSelectionStart):
      (WebCore::Editor::selectComposition):
      (WebCore::Editor::setComposition):
      (WebCore::Editor::ignoreSpelling):
      (WebCore::Editor::learnSpelling):
      (WebCore::Editor::advanceToNextMisspelling):
      (WebCore::Editor::misspelledWordAtCaretOrRange):
      (WebCore::Editor::isSelectionUngrammatical):
      (WebCore::Editor::guessesForMisspelledOrUngrammatical):
      (WebCore::Editor::markMisspellingsAfterTypingToWord):
      (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
      (WebCore::Editor::markAndReplaceFor):
      (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
      (WebCore::Editor::revealSelectionAfterEditingOperation):
      (WebCore::Editor::getCompositionSelection):
      (WebCore::Editor::transpose):
      (WebCore::Editor::changeSelectionAfterCommand):
      (WebCore::Editor::selectedText):
      (WebCore::Editor::computeAndSetTypingStyle):
      (WebCore::Editor::findString):
      (WebCore::Editor::respondToChangedSelection):
      (WebCore::Editor::selectionStartHasMarkerFor):
      (WebCore::Editor::toggleOverwriteModeEnabled):
      * editing/EditorCommand.cpp:
      (WebCore::executeToggleStyleInList):
      (WebCore::expandSelectionToGranularity):
      (WebCore::stateTextWritingDirection):
      (WebCore::executeDelete):
      (WebCore::executeDeleteToMark):
      (WebCore::executeMoveBackward):
      (WebCore::executeMoveBackwardAndModifySelection):
      (WebCore::executeMoveDown):
      (WebCore::executeMoveDownAndModifySelection):
      (WebCore::executeMoveForward):
      (WebCore::executeMoveForwardAndModifySelection):
      (WebCore::executeMoveLeft):
      (WebCore::executeMoveLeftAndModifySelection):
      (WebCore::executeMovePageDown):
      (WebCore::executeMovePageDownAndModifySelection):
      (WebCore::executeMovePageUp):
      (WebCore::executeMovePageUpAndModifySelection):
      (WebCore::executeMoveRight):
      (WebCore::executeMoveRightAndModifySelection):
      (WebCore::executeMoveToBeginningOfDocument):
      (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
      (WebCore::executeMoveToBeginningOfLine):
      (WebCore::executeMoveToBeginningOfLineAndModifySelection):
      (WebCore::executeMoveToBeginningOfParagraph):
      (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
      (WebCore::executeMoveToBeginningOfSentence):
      (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
      (WebCore::executeMoveToEndOfDocument):
      (WebCore::executeMoveToEndOfDocumentAndModifySelection):
      (WebCore::executeMoveToEndOfSentence):
      (WebCore::executeMoveToEndOfSentenceAndModifySelection):
      (WebCore::executeMoveToEndOfLine):
      (WebCore::executeMoveToEndOfLineAndModifySelection):
      (WebCore::executeMoveToEndOfParagraph):
      (WebCore::executeMoveToEndOfParagraphAndModifySelection):
      (WebCore::executeMoveParagraphBackwardAndModifySelection):
      (WebCore::executeMoveParagraphForwardAndModifySelection):
      (WebCore::executeMoveUp):
      (WebCore::executeMoveUpAndModifySelection):
      (WebCore::executeMoveWordBackward):
      (WebCore::executeMoveWordBackwardAndModifySelection):
      (WebCore::executeMoveWordForward):
      (WebCore::executeMoveWordForwardAndModifySelection):
      (WebCore::executeMoveWordLeft):
      (WebCore::executeMoveWordLeftAndModifySelection):
      (WebCore::executeMoveWordRight):
      (WebCore::executeMoveWordRightAndModifySelection):
      (WebCore::executeMoveToLeftEndOfLine):
      (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
      (WebCore::executeMoveToRightEndOfLine):
      (WebCore::executeMoveToRightEndOfLineAndModifySelection):
      (WebCore::executeSelectAll):
      (WebCore::executeSelectToMark):
      (WebCore::executeSetMark):
      (WebCore::executeSwapWithMark):
      (WebCore::executeUnselect):
      (WebCore::enabledInRichlyEditableText):
      (WebCore::enabledRangeInEditableText):
      (WebCore::enabledRangeInRichlyEditableText):
      (WebCore::valueFormatBlock):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::setSelection):
      (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
      * editing/InsertLineBreakCommand.cpp:
      (WebCore::InsertLineBreakCommand::doApply):
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::doApply):
      * editing/ModifySelectionListLevel.cpp:
      (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
      (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
      * editing/RemoveFormatCommand.cpp:
      (WebCore::RemoveFormatCommand::doApply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::doApply):
      * editing/SetSelectionCommand.cpp:
      (WebCore::SetSelectionCommand::doApply):
      (WebCore::SetSelectionCommand::doUnapply):
      * editing/SpellingCorrectionCommand.cpp:
      (WebCore::SpellingCorrectionCommand::doApply):
      * editing/TextInsertionBaseCommand.cpp:
      (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
      * editing/TypingCommand.cpp:
      (WebCore::TypingCommand::deleteSelection):
      (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
      (WebCore::TypingCommand::insertText):
      (WebCore::TypingCommand::deleteKeyPressed):
      (WebCore::TypingCommand::forwardDeleteKeyPressed):
      * editing/ios/EditorIOS.mm:
      (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
      (WebCore::styleForSelectionStart):
      (WebCore::Editor::fontForSelection):
      * editing/mac/EditorMac.mm:
      (WebCore::styleForSelectionStart):
      (WebCore::Editor::fontForSelection):
      (WebCore::Editor::canCopyExcludingStandaloneImages):
      (WebCore::Editor::readSelectionFromPasteboard):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::defaultEventHandler):
      (WebCore::HTMLAnchorElement::setActive):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateFocusAppearance):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updateFocusAppearance):
      (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::setSelectionRange):
      (WebCore::HTMLTextFormControlElement::computeSelectionStart):
      (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
      (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
      (WebCore::HTMLTextFormControlElement::selectionChanged):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::clear):
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::createFromSelection):
      * page/ContextMenuController.cpp:
      (WebCore::insertUnicodeCharacter):
      (WebCore::ContextMenuController::contextMenuItemSelected):
      (WebCore::selectionContainsPossibleWord):
      (WebCore::ContextMenuController::populate):
      (WebCore::ContextMenuController::checkOrEnableIfNeeded):
      * page/DOMSelection.cpp:
      (WebCore::selectionShadowAncestor):
      (WebCore::DOMSelection::visibleSelection):
      (WebCore::DOMSelection::isCollapsed):
      (WebCore::DOMSelection::type):
      (WebCore::DOMSelection::rangeCount):
      (WebCore::DOMSelection::collapse):
      (WebCore::DOMSelection::collapseToEnd):
      (WebCore::DOMSelection::collapseToStart):
      (WebCore::DOMSelection::empty):
      (WebCore::DOMSelection::setBaseAndExtent):
      (WebCore::DOMSelection::setPosition):
      (WebCore::DOMSelection::modify):
      (WebCore::DOMSelection::extend):
      (WebCore::DOMSelection::getRangeAt):
      (WebCore::DOMSelection::removeAllRanges):
      (WebCore::DOMSelection::addRange):
      (WebCore::DOMSelection::deleteFromDocument):
      (WebCore::DOMSelection::containsNode):
      (WebCore::DOMSelection::toString):
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove):
      (WebCore::setSelectionToDragCaret):
      (WebCore::DragController::concludeEditDrag):
      (WebCore::DragController::draggableElement):
      (WebCore::selectElement):
      (WebCore::dragLocForSelectionDrag):
      (WebCore::DragController::startDrag):
      * page/DragController.h:
      * page/EventHandler.cpp:
      (WebCore::setSelectionIfNeeded):
      (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
      (WebCore::EventHandler::handleMousePressEventDoubleClick):
      (WebCore::EventHandler::handleMousePressEventSingleClick):
      (WebCore::EventHandler::updateSelectionForMouseDrag):
      (WebCore::EventHandler::lostMouseCapture):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::nodeIsNotBeingEdited):
      (WebCore::EventHandler::selectCursor):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::handleMouseDoubleClickEvent):
      (WebCore::EventHandler::dispatchMouseEvent):
      (WebCore::EventHandler::sendContextMenuEvent):
      (WebCore::EventHandler::sendContextMenuEventForKey):
      (WebCore::handleKeyboardSelectionMovement):
      (WebCore::EventHandler::handleDrag):
      * page/FocusController.cpp:
      (WebCore::FocusController::setFocusedFrame):
      (WebCore::FocusController::setFocused):
      (WebCore::FocusController::advanceFocusInDocumentOrder):
      (WebCore::clearSelectionIfNeeded):
      (WebCore::FocusController::setActive):
      * page/Frame.cpp:
      (WebCore::Frame::dragImageForSelection):
      * page/Frame.h:
      (WebCore::Frame::selection):
      * page/FrameView.cpp:
      (WebCore::FrameView::performPostLayoutTasks):
      (WebCore::FrameView::paintContentsForSnapshot):
      * page/Page.cpp:
      (WebCore::Page::findString):
      (WebCore::Page::findStringMatchingRanges):
      (WebCore::Page::selection):
      * page/mac/FrameMac.mm:
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.mm:
      (WebCore::selectionImage):
      * page/win/FrameWin.cpp:
      (WebCore::imageFromSelection):
      (WebCore::Frame::dragImageForSelection):
      * platform/ios/PasteboardIOS.mm:
      (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::isSelected):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paintCaret):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintAreaElementFocusRing):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollTo):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::paintItemForeground):
      (WebCore::RenderListBox::paintItemBackground):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::selectionBackgroundColor):
      (WebCore::RenderObject::selectionColor):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isFocused):
      * rendering/RenderThemeWin.cpp:
      (WebCore::RenderThemeWin::adjustSearchFieldStyle):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::writeSelection):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::setSelection):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::deselectAll):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::selectSubString):
      * testing/Internals.cpp:
      (WebCore::Internals::absoluteCaretBounds):
      (WebCore::Internals::selectionBounds):
      
      Source/WebKit/blackberry:
      
      * Api/InRegionScroller.cpp:
      (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
      * WebKitSupport/DatePickerClient.cpp:
      (BlackBerry::WebKit::DatePickerClient::setValueAndClosePopup):
      * WebKitSupport/InPageSearchManager.cpp:
      (BlackBerry::WebKit::InPageSearchManager::findNextString):
      (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
      (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
      (BlackBerry::WebKit::InputHandler::setElementUnfocused):
      (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
      (BlackBerry::WebKit::InputHandler::setElementFocused):
      (BlackBerry::WebKit::InputHandler::openDatePopup):
      (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
      (BlackBerry::WebKit::InputHandler::selectionPosition):
      (BlackBerry::WebKit::InputHandler::setSelection):
      (BlackBerry::WebKit::InputHandler::deleteSelection):
      (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::SelectionHandler::cancelSelection):
      (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
      (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
      (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
      (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
      (BlackBerry::WebKit::SelectionHandler::setSelection):
      (BlackBerry::WebKit::SelectionHandler::startCaretViewportRect):
      (BlackBerry::WebKit::SelectionHandler::selectNextParagraph):
      (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity):
      (BlackBerry::WebKit::SelectionHandler::selectObject):
      (BlackBerry::WebKit::directionOfEnclosingBlock):
      (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
      (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded):
      (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
      (BlackBerry::WebKit::SelectionHandler::selectionContains):
      * WebKitSupport/SpellingHandler.cpp:
      (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::selectionRectangle):
      (DumpRenderTreeSupportEfl::firstRectForCharacterRange):
      (DumpRenderTreeSupportEfl::selectedRange):
      * WebCoreSupport/EditorClientEfl.cpp:
      (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      * ewk/ewk_frame.cpp:
      (ewk_frame_text_selection_type_get):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      (WebKit::ChromeClient::paint):
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::firstRectForCharacterRange):
      (DumpRenderTreeSupportGtk::selectedRange):
      (DumpRenderTreeSupportGtk::rectangleForSelection):
      * WebCoreSupport/EditorClientGtk.cpp:
      (WebKit::collapseSelection):
      (WebKit::setSelectionPrimaryClipboardIfNeeded):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_get_range_for_word_around_caret):
      * webkit/webkitwebview.cpp:
      (getLocationForKeyboardGeneratedContextMenu):
      
      Source/WebKit/mac:
      
      * Plugins/WebPluginController.mm:
      * WebView/WebFrame.mm:
      (-[WebFrame _hasSelection]):
      (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
      (-[WebFrame _selectionGranularity]):
      (-[WebFrame _convertToNSRange:]):
      (-[WebFrame _convertToDOMRange:]):
      (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
      (-[WebFrame _typingStyle]):
      (-[WebFrame _selectedNSRange]):
      (-[WebFrame _selectNSRange:]):
      (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
      (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
      * WebView/WebHTMLRepresentation.mm:
      (-[WebHTMLRepresentation currentForm]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView readSelectionFromPasteboard:]):
      (-[WebHTMLView _selectedRange]):
      (-[WebHTMLView _hasSelection]):
      (-[WebHTMLView _hasSelectionOrInsertionPoint]):
      (-[WebHTMLView _hasInsertionPoint]):
      (-[WebHTMLView _isEditable]):
      (-[WebHTMLView jumpToSelection:]):
      (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
      (-[WebHTMLView maintainsInactiveSelection]):
      (isTextInput):
      (isInPasswordField):
      (-[WebHTMLView centerSelectionInVisibleArea:]):
      (-[WebHTMLView _canSmartCopyOrDelete]):
      (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
      (-[WebHTMLView _updateSelectionForInputManager]):
      (-[WebHTMLView selectionRect]):
      (-[WebHTMLView selectionTextRects]):
      (-[WebHTMLView selectionImageRect]):
      (-[WebHTMLView selectAll]):
      (-[WebHTMLView deselectAll]):
      (-[WebHTMLView selectedAttributedString]):
      * WebView/WebTextCompletionController.mm:
      (-[WebTextCompletionController doCompletion]):
      * WebView/WebView.mm:
      (-[WebView setSelectedDOMRange:affinity:]):
      (-[WebView selectedDOMRange]):
      (-[WebView selectionAffinity]):
      (-[WebView setEditable:]):
      (-[WebView _selectionIsCaret]):
      (-[WebView _selectionIsAll]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::selectedRange):
      (DumpRenderTreeSupportQt::firstRectForCharacterRange):
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::respondToChangedSelection):
      (WebCore::EditorClientQt::handleKeyboardEvent):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::hasSelection):
      (QWebPageAdapter::selectedText):
      (QWebPageAdapter::findText):
      (QWebPageAdapter::inputMethodEvent):
      (QWebPageAdapter::inputMethodQuery):
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      (WebFrame::currentForm):
      * WebView.cpp:
      (WebView::updateFocusedAndActiveState):
      (WebView::selectionRect):
      (WebView::centerSelectionInVisibleArea):
      (WebView::hasSelectedRange):
      (WebView::replaceSelectionWithText):
      (WebView::clearSelection):
      (WebView::prepareCandidateWindow):
      (WebView::onIMERequestCharPosition):
      (WebView::onIMERequestReconvertString):
      (WebView::firstRectForCharacterRangeForTesting):
      (WebView::selectedRangeForTesting):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/EditorClientWinCE.cpp:
      (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::updateGlobalSelection):
      * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
      (WebKit::collapseSelection):
      (WebKit::WebEditorClient::updateGlobalSelection):
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
      (WebKit::WebContextMenuClient::lookUpInDictionary):
      (WebKit::WebContextMenuClient::searchWithSpotlight):
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::frameWithSelection):
      (WebKit::FindController::updateFindUIAfterPageScroll):
      (WebKit::FindController::getFindIndicatorBitmapAndRect):
      (WebKit::FindController::getImageForFindMatch):
      (WebKit::FindController::selectFindMatch):
      (WebKit::FindController::updateFindIndicator):
      (WebKit::FindController::drawRect):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::editorState):
      (WebKit::WebPage::scaledSnapshotWithOptions):
      (WebKit::WebPage::centerSelectionInVisibleArea):
      (WebKit::frameWithSelection):
      (WebKit::WebPage::clearSelection):
      (WebKit::WebPage::confirmComposition):
      (WebKit::WebPage::setComposition):
      (WebKit::WebPage::currentSelectionAsRange):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::setComposition):
      (WebKit::WebPage::insertText):
      (WebKit::WebPage::insertDictatedText):
      (WebKit::WebPage::getMarkedRange):
      (WebKit::WebPage::getSelectedRange):
      (WebKit::WebPage::getAttributedSubstringFromRange):
      (WebKit::WebPage::characterIndexForPoint):
      (WebKit::convertToRange):
      (WebKit::WebPage::performDictionaryLookupAtLocation):
      (WebKit::WebPage::readSelectionFromPasteboard):
      (WebKit::WebPage::getStringSelectionForPasteboard):
      (WebKit::WebPage::getDataSelectionForPasteboard):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87ae63d7
    • darin@apple.com's avatar
      <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts · ec40fe3e
      darin@apple.com authored
      Reviewed by Sam Weinig.
      
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
      Initialize strings more efficiently. Put drag-specific data members inside an if statement.
      Replace m_clipboardType with m_forDrag.
      (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
      Removed explicit clipboard type since constructor now defaults to copy and paste style.
      (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
      (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
      (WebCore::Clipboard::setData): Ditto.
      (WebCore::Clipboard::files): Ditto.
      (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
      be used when !ENABLE(DRAG_SUPPORT).
      (WebCore::Clipboard::setDropEffect): Ditto.
      (WebCore::Clipboard::effectAllowed): Ditto.
      (WebCore::Clipboard::setEffectAllowed): Ditto.
      (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
      to this, and kep the overload that does not as well. Made the DragData argument a const&.
      (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
      (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
      calling a dragStarted function.
      (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
      (WebCore::IEOpFromDragOp): Ditto.
      (WebCore::Clipboard::sourceOperation): Ditto.
      (WebCore::Clipboard::destinationOperation): Ditto.
      (WebCore::Clipboard::setSourceOperation): Ditto.
      (WebCore::Clipboard::setDestinationOperation): Ditto.
      
      * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
      class declarations as required. Removed non-helpful comment. Made ClipboardType a private
      implementation detail. Moved functions that are not part of the DOM API down to a separate
      section lower down in the class, and sorted the functions to match the order they appear
      in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
      effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
      implementation since it's an implementation detail. Since this class is no longer polymorphic,
      use only private, not protected. Make m_dragImageElement an Element, not a Node.
      
      * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
      these string properties can never return null strings anyway.
      
      * page/DragController.cpp:
      (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
      (WebCore::DragController::performDrag): Ditto.
      (WebCore::DragController::tryDHTMLDrag): Ditto.
      
      * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
      longer includes it.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec40fe3e
  29. 17 Aug, 2013 5 commits
    • akling@apple.com's avatar
      <https://webkit.org/b/119954> Page::dragCaretController() should return a reference. · b5297527
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Page::m_dragCaretController is never null.
      
      * dom/Document.cpp:
      (WebCore::Document::nodeChildrenWillBeRemoved):
      (WebCore::Document::nodeWillBeRemoved):
      * page/DragController.cpp:
      (WebCore::DragController::cancelDrag):
      (WebCore::DragController::dragEnded):
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      (WebCore::DragController::placeDragCaret):
      * page/Page.h:
      (WebCore::Page::dragCaretController):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paintCaret):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5297527
    • darin@apple.com's avatar
      <https://webkit.org/b/119948> Change drag-specific clipboard writing in... · 6535ea23
      darin@apple.com authored
      <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
      
      Reviewed by Andreas Kling.
      
      * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
      All three are just unneeded forwarding to pasteboard.
      * dom/Clipboard.h: Ditto.
      
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Move the logic in here. Later we might
      want to straighten this out a bit, perhaps using functions in Editor, but it's
      not much code so fine to just have it here for now.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6535ea23
    • darin@apple.com's avatar
      <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument · a9232041
      darin@apple.com authored
      Reviewed by Andreas Kling.
      
      The Element::document is a simpler faster alternative to Element::ownerDocument.
      The only behavior difference between the two is that ownerDocument returns 0 when
      called on a Document.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
      (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
      document and call to ownerDocument, since ownerDocument will never return non-null
      if document returns null.
      (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
      of ownerDocument.
      
      * inspector/DOMEditor.cpp:
      (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
      
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
      (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
      (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
      does the same thing in a roundabout way.
      (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
      (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
      does the same thing in a roundabout way.
      
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9232041
    • darin@apple.com's avatar
      <https://webkit.org/b/119941> Make Page::dragController return a reference · a5e48bb2
      darin@apple.com authored
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * page/Page.h:
      (WebCore::Page::dragController): Return a reference instead of a pointer.
      
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::eventMayStartDrag):
      (WebCore::EventHandler::updateDragSourceActionsAllowed):
      (WebCore::EventHandler::handleDrag):
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::passSubframeEventToSubframe):
      Updated call sites.
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      (dragExitedCallback):
      (webkit_web_view_drag_motion):
      (webkit_web_view_drag_data_received):
      (webkit_web_view_drag_drop):
      Updated call sites.
      
      Source/WebKit/mac:
      
      * WebView/WebFrameView.mm:
      (-[WebFrameView _setDocumentView:]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
      (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
      * WebView/WebView.mm:
      (-[WebView _setInitiatedDrag:]):
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      (-[WebView moveDragCaretToPoint:]):
      (-[WebView removeDragCaret]):
      Updated call sites.
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DragClientQt.cpp:
      (WebCore::DragClientQt::startDrag):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::dragEntered):
      (QWebPageAdapter::dragLeaveEvent):
      (QWebPageAdapter::dragUpdated):
      (QWebPageAdapter::performDrag):
      Updated call sites.
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebDragClient.cpp:
      (WebDragClient::startDrag):
      * WebView.cpp:
      (WebView::keyStateToDragOperation):
      (WebView::DragEnter):
      (WebView::DragOver):
      (WebView::DragLeave):
      (WebView::Drop):
      Updated call sites.
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      (WebKit::WebPage::dragEnded):
      Updated call sites.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5e48bb2
    • akling@apple.com's avatar
      <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!) · 17523501
      akling@apple.com authored
      Reviewed by Geoff Garen.
      
      Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
      It now also returns a reference, as it can never be null.
      
      Removed 8.8 million lines of null-checking as a result.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17523501