1. 09 Nov, 2011 1 commit
  2. 08 Nov, 2011 1 commit
    • zimmermann@webkit.org's avatar
      2011-11-08 Nikolas Zimmermann <nzimmermann@rim.com> · 89d03f85
      zimmermann@webkit.org authored
              Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
              https://bugs.webkit.org/show_bug.cgi?id=71368
      
              Reviewed by Antti Koivisto.
      
              Add some layout tests covering repainting of embedded SVG documents triggered by SMIL animations.
      
              * platform/chromium/test_expectations.txt: Fix test expectations, as described in bug 71226.
              * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png: Added.
              * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.txt: Added.
              * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.png: Added.
              * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.txt: Added.
              * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: Added.
              * svg/as-image/animated-svg-as-image-same-image.html: Added.
              * svg/as-image/resources/animated-rect-same-image.svg: Copied from LayoutTests/svg/as-image/resources/animated-rect-fixed-size.svg.
              * svg/zoom/page/zoom-coords-viewattr-01-b.svg: Add comment, why scrollbars shouldn't appear anymore here.
      
      2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
              https://bugs.webkit.org/show_bug.cgi?id=71368
      
              Reviewed by Antti Koivisto.
      
              Fix regressions/races introduced by r98852. SVGImage repainting didn't work under certain circumstances.
              The problem was hard to reproduce on Mac ports, but easily visible on Chromium, when opening two files
              that shared the same animated SVG image. The problem of sharing a single ImageObserver across multiple
              instances of the same SVGImage, leads to nasty problems, that are timing dependant. changedInRect() calls
              that should only by received in one document, are received in the other as well, due the shared nature
              of CachedImage. To avoid these problems alltogether, a new approach is needed, that was initially suggested
              by Antti.
      
              Avoid creating multiple SVGImages and caching them for different sizes/zoom levels. Introduce SVGImageCache
              which holds rendered versions of the SVGImage at certain sizes/zoom levels. It holds (ImageBuffer, Image) pairs
              for each renderer, associated with a size and zoom level.
      
              This is a major change to the cache as introduced some weeks ago. Instead of holding multiple SVGImages, each containing
              a whole DOM/render tree, we now create bitmap images rendered at the requested sizes/zoom levels and cache them.
      
              Revert ImageBySizeCache changes that were needed to make it usable wih SVGImage. Its now used only in CSSImageGeneratorValue and
              thus the extra information that CSSImageGeneratorValue doesn't need can be removed again (desired/actual size differentations, and the zoom level).
      
              Tests: svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html
                     svg/as-image/animated-svg-as-image-same-image.html
      
              * CMakeLists.txt: Add svg/graphics/SVGImageCache.* to build.
              * GNUmakefile.list.am: Ditto.
              * Target.pri: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.vcproj/copyForwardingHeaders.cmd: Copy headers from svg/graphics, as SVGImageCache is needed by CachedImage in SVG enabled builds.
              * WebCore.xcodeproj/project.pbxproj: Add svg/graphics/SVGImageCache.* to build.
              * css/CSSImageGeneratorValue.cpp: Remove zoom parameter from addClient/getImage, no need to pass 1 default values anymore.
              (WebCore::CSSImageGeneratorValue::addClient):
              (WebCore::CSSImageGeneratorValue::getImage):
              * loader/cache/CachedImage.cpp: Stop using ImageBySizeCache, and switch to the new SVGImageCache.
              (WebCore::CachedImage::removeClientForRenderer):
              (WebCore::CachedImage::lookupOrCreateImageForRenderer):
              (WebCore::CachedImage::setContainerSizeForRenderer):
              (WebCore::CachedImage::imageSizeForRenderer):
              (WebCore::CachedImage::clear):
              (WebCore::CachedImage::createImage):
              (WebCore::CachedImage::destroyDecodedData):
              (WebCore::CachedImage::decodedSizeChanged):
              (WebCore::CachedImage::didDraw):
              (WebCore::CachedImage::shouldPauseAnimation):
              (WebCore::CachedImage::animationAdvanced):
              (WebCore::CachedImage::changedInRect):
              * loader/cache/CachedImage.h:
              * page/DragController.cpp: Stop using imageForRenderer(), as it may return cached BitmapImages, that don't carry a filename extension anymore, which is required here.
              (WebCore::getImage):
              * rendering/ImageBySizeCache.cpp: Revert changes to ImageBySizeCache, which were needed to make it usable for SVGImages. CSSImageGenerator doesn't need it.
              (WebCore::ImageBySizeCache::addClient):
              (WebCore::ImageBySizeCache::removeClient):
              (WebCore::ImageBySizeCache::getImage):
              * rendering/ImageBySizeCache.h: Ditto.
              (WebCore::SizeAndCount::SizeAndCount):
              * rendering/RenderImage.cpp: Stop using imageForRenderer(), use cachedImage()->image(), which is guaranteed to be a SVGImage for svg images, and not a cached bitmap copy.
              (WebCore::RenderImage::embeddedContentBox):
              * rendering/RenderReplaced.cpp: Simplify logic to figure out the intrinsic size - the special logic for the old SVGImage cache can go away now.
              (WebCore::RenderReplaced::computeIntrinsicLogicalWidth):
              (WebCore::RenderReplaced::computeIntrinsicLogicalHeight):
              * rendering/style/StyleCachedImage.cpp: Call removeClientForRenderer(), which takes care of clearing SVGImageCache entries as well.
              (WebCore::StyleCachedImage::removeClient): This change is needed, as we don't want to make removeClient() virtual in CachedResource.
              * rendering/svg/RenderSVGRoot.cpp: Rename isEmbeddedThroughImageElement to isEmbeddedThroughSVGImage, as this is what it actually checks.
              (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
              * rendering/svg/RenderSVGRoot.h:
              * svg/SVGSVGElement.cpp: Fix bug that's visible now with the SVGImageCache, which was already there before, but hard to trigger.
              (WebCore::SVGSVGElement::currentViewBoxRect): The viewBox depends on who's asking for it: the host document or the embedded document? Take that into account.
              * svg/SVGSVGElement.h:
              * svg/graphics/SVGImage.cpp: Cleanup some code. Add new logic that draws a SVGImage into an ImageBuffer at a desired size & zoom.
              (WebCore::SVGImage::setContainerSize):
              (WebCore::SVGImage::size):
              (WebCore::SVGImage::drawSVGToImageBuffer):
              * svg/graphics/SVGImage.h:
              * svg/graphics/SVGImageCache.cpp: Added. SVGImageCache caches Image/ImageBuffer pairs for each _renderer_ and size/zoom level. The ImageBySizeCache only cared about size.
              (WebCore::SVGImageCache::SVGImageCache):
              (WebCore::SVGImageCache::~SVGImageCache):
              (WebCore::SVGImageCache::removeRendererFromCache):
              (WebCore::SVGImageCache::setRequestedSizeAndZoom):
              (WebCore::SVGImageCache::getRequestedSizeAndZoom):
              (WebCore::SVGImageCache::imageContentChanged):
              (WebCore::SVGImageCache::redrawTimerFired):
              (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
              * svg/graphics/SVGImageCache.h: Added.
              (WebCore::SVGImageCache::create):
              (WebCore::SVGImageCache::CachedSizeAndZoom::CachedSizeAndZoom):
              (WebCore::SVGImageCache::CachedImageData::CachedImageData):
      
      2011-11-08  Nikolas Zimmermann  <nzimmermann@rim.com>
      
              Switch SVGImage cache to store ImageBuffers instead of whole SVGImages, including a DOM/Render tree
              https://bugs.webkit.org/show_bug.cgi?id=71368
      
              Reviewed by Antti Koivisto.
      
              * CMakeLists.txt: Add svg/graphics include, for SVGImageCache.h.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89d03f85
  3. 06 Nov, 2011 1 commit
    • jonlee@apple.com's avatar
      Dragging a file onto <input type="file"> should give distinct visual feedback · f9479f53
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=13897
      <rdar://problem/5232483>
      
      Reviewed by Dan Bernstein.
      
      When hovering over a file input element, we set the button's state to active
      to differentiate dragging one file over the input element (which populates that
      element) versus over the document (which would load the file into the view).
      
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::HTMLInputElement):
      (WebCore::HTMLInputElement::canReceiveDroppedFiles):
      (WebCore::HTMLInputElement::setCanReceiveDroppedFiles): If set, the element
      is updated, which sets the active state on the button control.
      * html/HTMLInputElement.h: Add a boolean member representing whether the file
      input can receive dropped files.
      * page/DragController.cpp:
      (WebCore::DragController::DragController): Update/set the file input that
      can receive dropped files.
      (WebCore::DragController::dragExited):
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::concludeEditDrag):
      * page/DragController.h:
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::updateFromElement): Sets the button active
      state if the input can receive dropped files.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9479f53
  4. 02 Nov, 2011 3 commits
    • jonlee@apple.com's avatar
      Expand DragController to provide more information about the dragging session · d18aac0a
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=71324
      <rdar://problem/10379175>
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      * WebCore.xcodeproj/project.pbxproj:
      * page/DragController.cpp:
      (WebCore::DragController::dragEntered):
      (WebCore::DragController::dragUpdated):
      (WebCore::DragController::dragEnteredOrUpdated):
      (WebCore::DragController::tryDocumentDrag): In addition to determining the
      drag operation, DragSession is updated with data regarding whether the mouse
      is over a file input, and the number of items that would be accepted based on
      the mouse's location.
      * page/DragController.h:
      * page/DragSession.h: Added.
      (WebCore::DragSession::DragSession): Keep track of current operation, whether
      the mouse is over a file input element, and how many files would be accepted if
      dropped.
      * platform/DragData.h: Added numberOfFiles()
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/efl/DragDataEfl.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::numberOfFiles):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::numberOfFiles):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::numberOfFiles):
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::dragTargetDragEnterOrOver): The drag operation is contained
      within the new DragSession struct. Minor refactor.
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_drag_motion): Minor refactoring.
      (webkit_web_view_drag_data_received): Minor refactoring.
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (-[WebView draggingEntered:]): DragOperation is now inside the DragSession struct.
      (-[WebView draggingUpdated:]):
      
      Source/WebKit/qt:
      
      * Api/qwebpage.cpp:
      (QWebPagePrivate::dragEnterEvent): Minor refactoring because operation is stored in
      new DragSession struct.
      (QWebPagePrivate::dragMoveEvent): Ditto.
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::DragEnter): Minor refactoring because operation is stored in
      new DragSession struct.
      (WebView::DragOver): Ditto.
      
      Source/WebKit2:
      
      We now pass the DragSession struct from the Web to the UI process, instead of the
      DragOperation enum.
      
      * Scripts/webkit2/messages.py:
      * Shared/WebCoreArgumentCoders.cpp:
      (CoreIPC::::encode):
      (CoreIPC::::decode):
      * Shared/WebCoreArgumentCoders.h:
      * UIProcess/API/mac/WKView.mm:
      (-[WKView draggingUpdated:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy): We now cache the last known DragSession state
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragSession):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::keyStateToDragOperation):
      (WebKit::WebView::DragEnter):
      (WebKit::WebView::DragOver):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      
      LayoutTests:
      
      * editing/pasteboard/script-tests/file-input-files-access.js:
      (runTest): Change the expected behavior of the test-- dragging a file over a disabled
      control should not load that file. Instead, the file should be ignored, and the page
      remains as is.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d18aac0a
    • commit-queue@webkit.org's avatar
      Assert in MoveSelectionCommand::doApply · 5d5f9dc4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=70277
      
      Patch by Devdatta Deshpande <pwjd73@motorola.com> on 2011-11-02
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      A MoveSelectionCommand should be fired only if the selection type is
      RangeSelection, since nothing is selected in other cases.
      
      Test: fast/events/drag-link.html
      
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove):
      
      LayoutTests:
      
      Test to drag-drop anchor element on an already focused editable div
      element.
      
      * fast/events/drag-link-expected.txt: Added.
      * fast/events/drag-link.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d5f9dc4
    • eae@chromium.org's avatar
      Use IntPoint for screen coordinates in MouseEvent · fc240a22
      eae@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71327
      
      Reviewed by Darin Adler.
      
      Change mouse events to use int/IntPoint for screen/window coordinates and
      LayoutUnit/LayoutPoint for coordinates adjusted for zooming.
      
      No new tests.
      
      * dom/MouseRelatedEvent.cpp:
      (WebCore::MouseRelatedEvent::MouseRelatedEvent):
      (WebCore::MouseRelatedEvent::computeRelativePosition):
      * dom/MouseRelatedEvent.h:
      (WebCore::MouseRelatedEvent::screenLocation):
      Revert screenLocation and windowLocation back to int.
      
      * page/DragController.cpp:
      (WebCore::elementUnderMouse):
      Change elementUnderMouse to use a LayoutPoint for hit testing.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::clear):
      (WebCore::EventHandler::currentMousePosition):
      (WebCore::documentPointForWindowPoint):
      (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
      * page/EventHandler.h:
      Revert m_currentMousePosition to IntPoint as it represents a
      screen coordinate.
      
      * platform/PlatformMouseEvent.h:
      (WebCore::PlatformMouseEvent::PlatformMouseEvent):
      (WebCore::PlatformMouseEvent::pos):
      (WebCore::PlatformMouseEvent::x):
      (WebCore::PlatformMouseEvent::y):
      (WebCore::PlatformMouseEvent::globalX):
      (WebCore::PlatformMouseEvent::globalY):
      * platform/mac/PlatformMouseEventMac.mm:
      (WebCore::globalPoint):
      (WebCore::pointForEvent):
      (WebCore::globalPointForEvent):
      Revert PlatformMouseEvent to int/IntPoint as it represents a screen
      coordinate.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@99014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc240a22
  5. 19 Oct, 2011 1 commit
    • dcheng@chromium.org's avatar
      Don't always select images during an image drag. · 87e62f7f
      dcheng@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=62998
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Only select an image being dragged if it is contenteditable.
      
      Test: fast/events/drag-selects-image.html
      
      * dom/Node.cpp:
      (WebCore::Node::isContentRichlyEditable):
      * dom/Node.h:
      * page/DragController.cpp:
      (WebCore::prepareClipboardForImageDrag):
      
      LayoutTests:
      
      * fast/events/drag-selects-image-expected.txt: Added.
      * fast/events/drag-selects-image.html: Added.
      * platform/chromium-win/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      * platform/chromium-win/editing/selection/drag-to-contenteditable-iframe-expected.txt:
      * platform/chromium/test_expectations.txt:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      * platform/mac/editing/selection/drag-to-contenteditable-iframe-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87e62f7f
  6. 14 Oct, 2011 1 commit
    • zimmermann@webkit.org's avatar
      2011-10-13 Nikolas Zimmermann <nzimmermann@rim.com> · 8cf217f7
      zimmermann@webkit.org authored
              Prepare SVGImage intrinsic size negotiation: Introduce an IntSize <-> SVGImage cache in CachedImage
              https://bugs.webkit.org/show_bug.cgi?id=69416
      
              Reviewed by Antti Koivisto.
      
              Refactor ImageBySizeCache out of CSSImageGeneratorValue as CachedImage wants to use the same type of cache for its purposes.
              When introducing the SVGImage intrinsic size negotiation the container size of an SVGImage is dependant on the place where
              it gets embedded (eg width/height attributes of host documents <img> force a certain size).
      
              Currently CachedImage only contains a single RefPtr<Image>, which it constructs out of the decoded data.
              Multiple RenderObjects share the same CachedImages, when embedding eg. a SVG document in a <html:img> or using it in a background-image for a <div>.
              Consider the case where two RenderObjects use the same CachedImage, each with a different container size (200x100 vs 100x200) and the embedded
              document contains a viewBox and some arbitary preserveAspectRatio settings. To honour these we have to relayout the document with the desired
              size (percentual unit resolving etc, all depend on the RenderSVGRoots size).
      
              With the current design this is hard to realize, w/o requring to relayout the embedded document for each embedder that uses an SVGImage.
              This patch introduces a cache right within CachedImage, which manages a map of images to certain sizes, by utilizing the new ImageBySizeCache.
      
              CachedImage::imageForRenderer() takes a RenderObject* parameter, which it uses to look up the last set image container size for a renderer.
              Using that size it queries the cache whether it already has an SVGImage for that size, if not it gets created, by creating a whole
              new instance of SVGImage, filling it with the already decoded data, and passing on a fixed image container size, which overrides the
              size that RenderSVGRoot reports, when computeReplacedLogicalWidth/Height is called and thus laying out the document at the desired size.
              This image is then put in the cache for further reusability.
      
              Likewise CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter and stores that in the cache with an associated container size.
              It requires to touch several files which use CachedImage throughout WebCore/WebKit/WebKit2.
      
              The actual cache is not yet turned on yet, so this is not a functional change so far, as it needs some other changes to SVGImage,
              which will come with the master patch in bug 47156.
      
              No new tests yet, as the new cache isn't turned on yet.
      
              * CMakeLists.txt: Add rendering/ImageBySizeCache.* to build.
              * GNUmakefile.list.am: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
              * bindings/objc/DOM.mm: Ditto (for CachedImage::image()).
              (-[DOMElement image]):
              (-[DOMElement _imageTIFFRepresentation]):
              * bridge/qt/qt_pixmapruntime.cpp:
              (JSC::Bindings::QtPixmapInstance::variantFromObject): Ditto (for CachedImage::image()).
              * css/CSSCanvasValue.cpp: s/m_clients/clients()/, which now live in the ImageBySizeCache instead of CSSImageGeneratorValue.
              (WebCore::CSSCanvasValue::canvasChanged):
              (WebCore::CSSCanvasValue::canvasResized):
              (WebCore::CSSCanvasValue::image):
              * css/CSSGradientValue.cpp: Ditto.
              (WebCore::CSSGradientValue::image):
              * css/CSSImageGeneratorValue.cpp: Move the sizes/clients/images cache into a new ImageBySizeCache class, to make it usable for CachedImage as well.
              (WebCore::CSSImageGeneratorValue::addClient): Adapt to move.
              (WebCore::CSSImageGeneratorValue::removeClient): Ditto.
              (WebCore::CSSImageGeneratorValue::getImage): Ditto.
              (WebCore::CSSImageGeneratorValue::putImage): Ditto.
              * css/CSSImageGeneratorValue.h:
              (WebCore::CSSImageGeneratorValue::clients): Forwarded to the ImageBySizeCache.
              * editing/DeleteButtonController.cpp: 
              (WebCore::isDeletableElement): CachedImage::canRender() now takes a RenderObject* parameter.
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::width): Use new CachedImage::imageSizeForRenderer(RenderObject*) method.
              (WebCore::HTMLImageElement::height): Ditto.
              (WebCore::HTMLImageElement::naturalWidth): Ditto.
              (WebCore::HTMLImageElement::naturalHeight): Ditto.
              * html/ImageDocument.cpp:
              (WebCore::ImageDocumentParser::finish): Ditto.
              (WebCore::ImageDocument::scale): Ditto.
              (WebCore::ImageDocument::resizeImageToFit): Ditto.
              (WebCore::ImageDocument::imageUpdated): Ditto.
              (WebCore::ImageDocument::restoreImageSize): Ditto.
              (WebCore::ImageDocument::imageFitsInWindow): Ditto.
              * html/canvas/CanvasRenderingContext.cpp:
              (WebCore::CanvasRenderingContext::wouldTaintOrigin): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::isOriginClean): Ditto.
              (WebCore::size): Ditto (for CachedImage::imageSizeForRenderer()).
              (WebCore::CanvasRenderingContext2D::drawImage): Ditto.
              (WebCore::CanvasRenderingContext2D::createPattern): Ditto.
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::texImage2D): Ditto.
              (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
              * loader/cache/CachedImage.cpp: Add currently _disabled_ cache for SVGImages. The intrinsic size negotiation will need to use multiple SVGImages
              for each requested size (equal to the size of the embedding place for the image) - make it possible to cache these SVGImages, and maintain a cache
              for them. The hash code is a 1:1 refactoring from the already present code in CSSImageGeneratorValue, now named 'ImageBySizeCache'.
              (WebCore::CachedImage::lookupImageForSize): Looks up an Image from the cache for a given IntSize. Currently turned off.
              (WebCore::CachedImage::lookupImageForRenderer): Looks up an Image from the cache for a given renderer. Currently turned off.
              (WebCore::CachedImage::lookupOrCreateImageForRenderer): Looks up an Image from the cache or creates a new SVGImage for a given size and caches it, if possible. Currently turned off.
              All following changes share this: Don't operate on m_image directly, instead always look up one from the cache for a given size or renderer - if that's not present fallback to m_image.
              When an SVGImage is first created by CachedImage::createImage() and stored in m_image, the cache remains empty.
      
              If eg. <img width="30" height="70" src="foo.svg"> is used which implies a container size of 30x70 a new SVGImage is created with the additional information of a 30x70 container size
              which is immediately passed to the SVGImage after its creation. This SVGImage is put in the ImageBySizeCache associated with a container size of 30x70.
              We now have two SVGImage objects present, one living in CachedImage::m_image, created by createImage() during data decoding, and one living in the ImageBySizeCache
              created by lookupOrCreateImageForRenderer() associated with the 30x70 container. The first SVGImage::size() will return a value as defined in the referenced foo.svg,
              whereas the SVGImage::size() call of the new SVGImage living in the cache reports 30x70 and renders according to that.
      
              Whenever any method of CachedImage is called with a RenderObject* or IntSize, we can't just operate on m_image anymore but instead have to lookup the right
              images for a certain renderer/size from the cache and operate on these. When calling eg. CachedImage::image() with a null renderer, m_image is returned.
              When passing with a valid renderer only cache lookups are done if the m_image is actually a SVGImage, otherwhise lookupImageForSize/Renderer will just return the m_image.
              There is no logical change induced for non-SVGImage derived images.
      
              CachedImage::image() of course needs a RenderObject* parameter now, to identify which of the images from the cache to use, if the underlying image is a SVGImage.
              Luckily these information are already present in StyleCachedImage/StyleImage & friends and only need to be added for some additional methods.
              (WebCore::CachedImage::image): FIXME
              (WebCore::CachedImage::imageForRenderer): Call lookupOrCreateImageForRenderer() instead of returning m_image, if it's not null. Its a no-op for non SVGImage derived objects.
              (WebCore::CachedImage::setContainerSizeForRenderer): For non-SVGImages, just pass on the size to the m_image. For SVGImages, associate the passed in renderer with the IntSize in the cache.
                                                                   This does NOT create the SVGImage yet, this is delayed until imageForRenderer() is called for a given renderer that wants this size.
              (WebCore::CachedImage::imageSize): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
              (WebCore::CachedImage::imageRect): Ditto.
              (WebCore::CachedImage::clear): Force clearing the m_svgImageCache.
              (WebCore::CachedImage::data): Call m_image->size() instead of imageSize(), to avoid having to pass a null renderer to imageSize() as here no renderer is available yet.
              (WebCore::CachedImage::destroyDecodedData): Don't destroy decoded data for SVG images, as m_data needs to be accessable at any time to construct a cloned SVGImage.
                                                          In future we don't need this anymore if we make sure multiple SVGImages share the same trees, but that's for a follow-up patch.
              (WebCore::CachedImage::decodedSizeChanged): Don't operate on m_image, ask lookupImageForRenderer() with the incoming renderer.
              (WebCore::CachedImage::didDraw): Ditto.
              (WebCore::CachedImage::shouldPauseAnimation): Ditto.
              (WebCore::CachedImage::animationAdvanced): Ditto.
              (WebCore::CachedImage::changedInRect): Ditto. (eg. when leaving out this change animated SVG images wouldn't update anymore, as the animation didn't happen on m_image!)
              * loader/cache/CachedImage.h: imageForRenderer/canRender/setContainerSizeForRenderer/imageSizeForRenderer now all take a RenderObject* parameter to identifiy the current user of the image.
              (WebCore::CachedImage::canRender): Pass on the incoming renderer to imageSizeForRenderer().
              * page/DragController.cpp:
              (WebCore::getImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectCursor): Ditto.
              * page/PageSerializer.cpp:
              (WebCore::PageSerializer::serializeFrame): Ditto.
              (WebCore::PageSerializer::addImageToResources): Ditto.
              (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration): Ditto.
              * page/PageSerializer.h:
              * platform/chromium/ClipboardChromium.cpp:
              (WebCore::writeImageToDataObject): Ditto.
              * platform/chromium/PasteboardChromium.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/graphics/Image.h:
              (WebCore::Image::isSVGImage): Add boolean helper to identify SVGImages, just like isBitmapImage().
              * platform/gtk/ClipboardGtk.cpp:
              (WebCore::ClipboardGtk::declareAndWriteDragImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * platform/gtk/PasteboardGtk.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/mac/HTMLConverter.mm:
              (fileWrapperForElement): Ditto.
              * platform/mac/PasteboardMac.mm:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/qt/ClipboardQt.cpp:
              (WebCore::ClipboardQt::declareAndWriteDragImage): Ditto.
              * platform/qt/PasteboardQt.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/win/ClipboardWin.cpp:
              (WebCore::writeImageToDataObject): Ditto.
              * platform/win/PasteboardWin.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * platform/wince/PasteboardWinCE.cpp:
              (WebCore::Pasteboard::writeImage): Ditto.
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::image): Ditto.
              * rendering/ImageBySizeCache.cpp: Copied from WebCore/css/CSSImageGeneratorValue.cpp, to preserve history for the original cache code.
              (WebCore::ImageBySizeCache::ImageBySizeCache): Straight copy from CSSImageGeneratorValue, renamed to ImageBySizeCache, removing all but the cache relevant code.
              (WebCore::ImageBySizeCache::addClient): Ditto.
              (WebCore::ImageBySizeCache::removeClient): Ditto.
              (WebCore::ImageBySizeCache::getImage): Ditto.
              (WebCore::ImageBySizeCache::putImage): Ditto.
              (WebCore::ImageBySizeCache::clear): New function, that clears the cache, introduced for the needs of CachedImage.
              (WebCore::ImageBySizeCache::imageForSize): New function to query an Image* for a given IntSize, introduced for the needs of CachedImage.
              (WebCore::ImageBySizeCache::sizeForClient): New function to query an IntSize for a given renderer.
              * rendering/ImageBySizeCache.h: Copied from WebCore/css/CSSImageGeneratorValue.h.
              (WebCore::ImageBySizeCache::clients):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::paintFillLayer): CachedImage::canRender() now takes a RenderObject* parameter.
              (WebCore::InlineFlowBox::paintBoxDecorations): Ditto.
              (WebCore::InlineFlowBox::paintMask): Ditto.
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paintMaskImages): Ditto.
              (WebCore::RenderBox::repaintLayerRectsForImage): Ditto.
              * rendering/RenderBoxModelObject.cpp:
              (WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
              (WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto (for CachedImage::setContainerSizeForRenderer()).
              (WebCore::RenderBoxModelObject::paintNinePieceImage): Ditto.
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::imageSizeForError): Use new CachedImage::imageForRenderer(RenderObject*) method.
              (WebCore::RenderImage::setImageSizeForAltText): Ditto.
              (WebCore::RenderImage::computeReplacedLogicalWidth): FIXME
              * rendering/RenderImageResource.cpp:
              (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass on m_renderer to CachedImage::setContainerSizeForRenderer().
              * rendering/RenderImageResource.h: Remove constness from setContainerSizeForRenderer.
              (WebCore::RenderImageResource::image): Pass on m_renderer to CachedImage::image().
              (WebCore::RenderImageResource::imageSize): Pass on m_renderer to CachedImage::imageSizeForRenderer().
              * rendering/RenderImageResourceStyleImage.h:
              (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Remove constness, pass on m_renderer to StyleImage::setContainerSizeForRenderer().
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Use new CachedImage::imageForRenderer(RenderObject*) method.
              (WebCore::RenderLayerBacking::updateImageContents): Ditto.
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::computePreferredLogicalWidths): CachedImage::setContainerSizeForRenderer() now takes a RenderObject* parameter.
              * rendering/RenderObject.cpp:
              (WebCore::mustRepaintFillLayers): CachedImage::canRender() now takes a RenderObject* parameter.
              (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered): Ditto.
              * rendering/style/StyleCachedImage.cpp:
              (WebCore::StyleCachedImage::canRender): Pass on incoming renderer to CachedImage::canRender().
              (WebCore::StyleCachedImage::imageSize): Pass on incoming renderer to CachedImage::imageSizeForRenderer().
              (WebCore::StyleCachedImage::setContainerSizeForRenderer): Pass on incoming renderer to CachedImage::setContainerSizeForRenderer().
              (WebCore::StyleCachedImage::addClient): Remove unneeded return statment in void method.
              (WebCore::StyleCachedImage::removeClient): Ditto.
              (WebCore::StyleCachedImage::image): Pass on incoming renderer to CachedImage::image().
              * rendering/style/StyleCachedImage.h: Add RenderObject* parameter to canRender()/setContainerSizeForRenderer(). image() already has one, that was unused so far.
              * rendering/style/StyleGeneratedImage.cpp: Inlined setContainerSizeForRenderer.
              * rendering/style/StyleGeneratedImage.h: 
              (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Add RenderObject* parameter.
              * rendering/style/StyleImage.h:
              (WebCore::StyleImage::canRender): Ditto.
              * rendering/style/StylePendingImage.h:
              (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::build): Use new CachedImage::imageForRenderer(RenderObject*) method.
              * svg/graphics/SVGImage.cpp: Cleanup file, the include hack seems not needed anymore.
              (WebCore::SVGImage::setContainerSize): s/LayoutSize/IntSize/ to match the code in platform/.
              * svg/graphics/SVGImage.h: Ditto.
              (WebCore::SVGImage::isSVGImage): Return true.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8cf217f7
  7. 31 Aug, 2011 2 commits
    • rniwa@webkit.org's avatar
      Unreviewed, rolling out r94142, r94144, r94145, and r94148. · fa92d361
      rniwa@webkit.org authored
      http://trac.webkit.org/changeset/94142
      http://trac.webkit.org/changeset/94144
      http://trac.webkit.org/changeset/94145
      http://trac.webkit.org/changeset/94148
      https://bugs.webkit.org/show_bug.cgi?id=67262
      
      Broke isindex element (Requested by rniwa on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-08-30
      
      Source/WebCore: 
      
      * WebCore.order:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::isPasswordField):
      (WebCore::AccessibilityRenderObject::isIndeterminate):
      (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
      (WebCore::AccessibilityRenderObject::isChecked):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::canShareStyleWithControl):
      (WebCore::CSSStyleSelector::adjustRenderStyle):
      (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
      (WebCore::CSSStyleSelector::applyProperty):
      * dom/CheckedRadioButtons.cpp:
      (WebCore::CheckedRadioButtons::addButton):
      (WebCore::CheckedRadioButtons::removeButton):
      * dom/Node.cpp:
      (WebCore::Node::toInputElement):
      * dom/Node.h:
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::isInPasswordField):
      * html/HTMLInputElement.h:
      (WebCore::HTMLInputElement::toInputElement):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::sliderThumbElementOf):
      (WebCore::RenderSliderThumb::layout):
      (WebCore::RenderSliderContainer::layout):
      (WebCore::SliderThumbElement::hostInput):
      (WebCore::trackLimiterElementOf):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
      (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
      (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::repeatingTimerFired):
      (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
      (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::paintThemePart):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
      (WebCore::RenderTextControlSingleLine::inputElement):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isChecked):
      (WebCore::RenderTheme::isIndeterminate):
      
      Source/WebKit/chromium: 
      
      * src/EditorClientImpl.cpp:
      (WebKit::EditorClientImpl::textFieldDidEndEditing):
      (WebKit::EditorClientImpl::doTextFieldCommandFromEvent):
      * src/WebInputElement.cpp:
      (WebKit::toWebInputElement):
      * src/WebPasswordFormUtils.cpp:
      (WebKit::findPasswordFormFields):
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::setAutofilled):
      (DumpRenderTreeSupportGtk::setValueForUser):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::setAutofilled):
      (DumpRenderTreeSupportQt::setValueForUser):
      (DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa92d361
    • rniwa@webkit.org's avatar
      Get rid of toInputElement() · 7a7015f1
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=67175
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      Got rid of Node::toInputElement and HTMLInputElement::toInputElement and replaced them by
      a global toHTMLInputElement.
      
      * WebCore.order:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::isPasswordField):
      (WebCore::AccessibilityRenderObject::isIndeterminate):
      (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio):
      (WebCore::AccessibilityRenderObject::isChecked):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::canShareStyleWithControl):
      (WebCore::CSSStyleSelector::adjustRenderStyle):
      (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
      (WebCore::CSSStyleSelector::applyProperty):
      * dom/CheckedRadioButtons.cpp:
      (WebCore::CheckedRadioButtons::addButton):
      (WebCore::CheckedRadioButtons::removeButton):
      * dom/Node.cpp:
      * dom/Node.h:
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::isInPasswordField):
      * html/HTMLInputElement.h:
      (WebCore::toHTMLInputElement):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::sliderThumbElementOf):
      (WebCore::RenderSliderThumb::layout):
      (WebCore::RenderSliderContainer::layout):
      (WebCore::SliderThumbElement::hostInput):
      (WebCore::trackLimiterElementOf):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
      (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
      (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::defaultEventHandler):
      (WebCore::SpinButtonElement::repeatingTimerFired):
      (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
      (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::paintThemePart):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
      (WebCore::RenderTextControlSingleLine::inputElement):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isChecked):
      (WebCore::RenderTheme::isIndeterminate):
      
      Source/WebKit/chromium: 
      
      * src/WebInputElement.cpp:
      (WebKit::toWebInputElement):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::setAutofilled):
      (DumpRenderTreeSupportQt::setValueForUser):
      (DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a7015f1
  8. 19 Jul, 2011 1 commit
  9. 30 Jun, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-06-30 Ryosuke Niwa <rniwa@webkit.org> · 4f6c51fe
      rniwa@webkit.org authored
              Reviewed by Kent Tamura.
      
              Replace isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&)
              https://bugs.webkit.org/show_bug.cgi?id=63672
      
              Replaced isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&).
              Also added a safe toTextFormControl to HTMLFormControlElement.h.
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::doApply): Calls enclosingTextFormControl instead of manually
              checking the tag name of shadowAncestorNode.
              * editing/Editor.cpp:
              (WebCore::Editor::selectionForCommand): Rewritten using enclosingTextFormControl and toTextFormControl.
              (WebCore::Editor::cut): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
              (WebCore::Editor::copy): Ditto.
              (WebCore::Editor::setBaseWritingDirection): Calls toTextFormControl instead of manually checking tag name.
              * editing/FrameSelection.cpp:
              (WebCore::FrameSelection::isInPasswordField): Calls enclosingTextFormControl.
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::doApply): Ditto.
              * editing/htmlediting.cpp:
              (WebCore::enclosingTextFormControl): Added.
              * editing/htmlediting.h:
              * html/HTMLFormControlElement.h:
              (WebCore::toTextFormControl): Added.
              * page/DragController.cpp:
              (WebCore::DragController::startDrag): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f6c51fe
  10. 23 Jun, 2011 1 commit
    • dglazkov@chromium.org's avatar
      2011-06-22 Dimitri Glazkov <dglazkov@chromium.org> · c9c5964a
      dglazkov@chromium.org authored
              Reviewed by Kent Tamura.
      
              Move file-choosing and icon-loading management to FileInputType
              https://bugs.webkit.org/show_bug.cgi?id=62069
      
              1) Moved the duties of FileChooserClient and FileIconLoaderClient from
              RenderFileUploadControl to FileInputType, along with all of the
              supporting functions.
      
              2) Moved Icon ownership to FileInputType and exposed accessor on
              HTMInputElement to allow RenderFileUploadControl to query current icon.
      
              As a result, RenderFileUploadControl is now completely stateless, which is
              neat and clean.
      
              Refactoring, covered by existing tests.
      
              * html/FileInputType.cpp:
              (WebCore::FileInputType::handleDOMActivateEvent): Moved logic here from RenderFileUploadControl.
              (WebCore::FileInputType::requestIcon): Ditto.
              (WebCore::FileInputType::filesChosen): Ditto.
              (WebCore::FileInputType::receiveDropForDirectoryUpload): Ditto.
              (WebCore::FileInputType::updateRendering): Ditto.
              (WebCore::FileInputType::chrome): Ditto.
              (WebCore::FileInputType::receiveDroppedFiles): Ditto.
              (WebCore::FileInputType::icon): Added.
              * html/FileInputType.h:
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::setValueFromRenderer): Updated comment.
              (WebCore::HTMLInputElement::receiveDroppedFiles): Added to replace setFileListFromRenderer.
              (WebCore::HTMLInputElement::icon): Added.
              * html/HTMLInputElement.h:
              * html/InputType.cpp:
              (WebCore::InputType::receiveDroppedFiles): Added.
              (WebCore::InputType::icon): Added.
              * html/InputType.h:
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Changed to use HTMLInputElement. Ahh, nice and clean!
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::RenderFileUploadControl::RenderFileUploadControl): Removed code that is no longer necessary.
              (WebCore::RenderFileUploadControl::updateFromElement): Ditto.
              (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use HTMLInputElement icon accessor.
              (WebCore::RenderFileUploadControl::paintObject): Ditto.
              * rendering/RenderFileUploadControl.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9c5964a
  11. 09 Jun, 2011 1 commit
    • dglazkov@chromium.org's avatar
      2011-06-09 Dimitri Glazkov <dglazkov@chromium.org> · 8e55b4db
      dglazkov@chromium.org authored
              Reviewed by Kent Tamura.
      
              Fold isShadowBoundary into isShadowRoot.
              https://bugs.webkit.org/show_bug.cgi?id=62317
      
              Since there are no longer cases where Node::isShadowBoundary() != Node::isShadowRoot, we can remove this function.
      
              In one case where isShadowBoundary was also tested to find ShadowContentElemnt, added a new isContentElement function.
      
              Refactoring, covered by existing tests.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::isAtShadowBoundary): Changed to use isShadowRoot.
              * dom/Element.cpp:
              (WebCore::Element::isSpellCheckingEnabled): Ditto.
              * dom/Node.cpp:
              (WebCore::Node::nonBoundaryShadowTreeRootNode): Ditto.
              (WebCore::Node::nonShadowBoundaryParentNode): Ditto.
              * dom/Node.h:
              (WebCore::Node::isContentElement): Added.
              * dom/NodeRenderingContext.cpp:
              (WebCore::NodeRenderingContext::NodeRenderingContext): Changed to use isShadowRoot.
              * dom/Position.cpp:
              (WebCore::Position::Position): Ditto.
              * dom/ShadowContentElement.h:
              (WebCore::ShadowContentElement::isContentElement): Added.
              * dom/ShadowRoot.cpp:
              (WebCore::ShadowRoot::hasContentElement): Changed to use isContentElement.
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::insertNodeAfter): Changed to use isShadowRoot.
              * editing/htmlediting.cpp:
              (WebCore::visiblePositionBeforeNode): Ditto.
              (WebCore::visiblePositionAfterNode): Ditto.
              * page/DragController.cpp:
              (WebCore::asFileInput): Ditto.
              * rendering/RenderTreeAsText.cpp:
              (WebCore::nodePosition): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e55b4db
  12. 04 Jun, 2011 1 commit
    • dglazkov@chromium.org's avatar
      2011-06-03 Dimitri Glazkov <dglazkov@chromium.org> · d50bc756
      dglazkov@chromium.org authored
              Reviewed by Darin Adler.
      
              Convert file <input> to use the new shadow DOM model
              https://bugs.webkit.org/show_bug.cgi?id=59005
      
              Refactoring, covered by existing tests.
      
              * css/CSSSelector.cpp:
              (WebCore::CSSSelector::pseudoId): Removed FILE_UPLOAD_BUTTON pseudoId and all references to it.
              (WebCore::nameToPseudoTypeMap): Ditto.
              (WebCore::CSSSelector::extractPseudoType): Ditto.
              * css/CSSSelector.h: Ditto.
              * css/html.css:
              (input[type="button"], input[type="submit"], input[type="reset"]): Moved -webkit-file-upload-button to its own rule.
              (input[type="file"]::-webkit-file-upload-button): Added and moved all previously hard-coded properties there.
              * html/FileInputType.cpp:
              (WebCore::UploadButtonElement::create): Added.
              (WebCore::UploadButtonElement::UploadButtonElement): Added.
              (WebCore::UploadButtonElement::shadowPseudoId): Added.
              (WebCore::FileInputType::createShadowSubtree): Added.
              * html/FileInputType.h: Added createShadowSubtree decl.
              * page/DragController.cpp:
              (WebCore::asFileInput): Changed the logic to use new shadow DOM.
              * rendering/RenderFileUploadControl.cpp: Removed UploadButton class.
              (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed initializer for m_button.
              (WebCore::RenderFileUploadControl::updateFromElement): Removed attachment logic that's no longer necessary.
              (WebCore::nodeWidth): Added a helper.
              (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use uploadButton and nodeWidth.
              (WebCore::RenderFileUploadControl::paintObject): Ditto.
              (WebCore::RenderFileUploadControl::uploadButton): Added a helper to retrieve the button.
              (WebCore::RenderFileUploadControl::buttonValue): Changed to use uploadButton.
              * rendering/RenderFileUploadControl.h: Changed decls.
              * rendering/style/RenderStyleConstants.h: Removed FILE_UPLOAD_BUTTON decls.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d50bc756
  13. 02 Jun, 2011 1 commit
  14. 26 May, 2011 1 commit
  15. 16 May, 2011 1 commit
    • yuzo@google.com's avatar
      2011-05-16 Yuzo Fujishima <yuzo@google.com> · f2519532
      yuzo@google.com authored
              Reviewed by Antti Koivisto.
      
              Fix for Bug 43704 - Web font is printed as blank if it is not cached
              https://bugs.webkit.org/show_bug.cgi?id=43704
      
              In setting printing, we should not validate resources already cached
              for the document. If we do, web fonts used for screen are revalidated
              and possiby reloaded. Then the fonts can be shown as blank on print.
              This patch won't save the case where screen and print use different web
              fonts. Nonetheless, this is an improvement.
      
              No new tests because there seems to be no good way to test print images.
      
              * editing/Editor.cpp:
              (WebCore::Editor::paste): Use ResourceCacheValidationSuppressor instead of explicitly allowing/disallowing stale resources.
              * loader/cache/CachedResourceLoader.h:
              (WebCore::ResourceCacheValidationSuppressor::ResourceCacheValidationSuppressor): RAII class for allowing/disallowing stale resources.
              (WebCore::ResourceCacheValidationSuppressor::~ResourceCacheValidationSuppressor):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Use ResourceCacheValidationSuppressor instead of explicitly allowing/disallowing stale resources.
              * page/Frame.cpp:
              (WebCore::Frame::setPrinting): Use ResourceCacheValidationSuppressor to allow stale resources in printing.
      2011-05-16  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Fix for Bug 43704 - Web font is printed as blank if it is not cached
              https://bugs.webkit.org/show_bug.cgi?id=43704
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]): Use ResourceCacheValidationSuppressor to allow stale resources in printing.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2519532
  16. 13 May, 2011 1 commit
    • dcheng@chromium.org's avatar
      2011-05-13 Daniel Cheng <dcheng@chromium.org> · 0eb6dc60
      dcheng@chromium.org authored
              Reviewed by Tony Chang.
      
              Improve drag start logic
              https://bugs.webkit.org/show_bug.cgi?id=59409
      
              Add a new test to test drag start edge cases on Mac (because of a non-zero text drag delay)
              as well as rebase an existing test.
      
              * fast/css/user-drag-none.html: Text nodes are no longer draggable.
              * platform/mac/editing/pasteboard/drag-selections-to-contenteditable-expected.txt: Added.
              * platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html: Added.
      2011-05-13  Daniel Cheng  <dcheng@chromium.org>
      
              Reviewed by Tony Chang.
      
              Improve drag start logic
              https://bugs.webkit.org/show_bug.cgi?id=59409
      
              Rewrite and simplify the dragging logic to better match IE, Firefox, and the behavior
              defined in the spec. Among other things:
              - draggableNode() no longer returns text nodes when dragging anchors.
              - When starting a drag over an image in a selection, prefer to drag the selection.
              - Several redundant hit tests have been removed.
              - Minor refactoring to make the logic easier to follow.
      
              Test: platform/mac/editing/pasteboard/drag-selections-to-contenteditable.html
      
              * WebCore.xcodeproj/project.pbxproj:
              * page/DragController.cpp:
              (WebCore::DragController::draggableNode):
              (WebCore::DragController::startDrag):
              * page/DragController.h:
              * page/DragState.h:
              (WebCore::DragState::shouldDispatchEvents):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::EventHandler):
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::updateDragSourceActionsAllowed):
              (WebCore::EventHandler::updateDragAndDrop):
              (WebCore::EventHandler::cancelDragAndDrop):
              (WebCore::EventHandler::dragHysteresisExceeded):
              (WebCore::EventHandler::dragSourceEndedAt):
              (WebCore::ExactlyOneBitSet):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0eb6dc60
  17. 10 May, 2011 1 commit
    • dcheng@chromium.org's avatar
      2011-05-09 Daniel Cheng <dcheng@chromium.org> · 252dcbe7
      dcheng@chromium.org authored
              Reviewed by Tony Chang.
      
              Refactor RenderObject::draggableNode.
              https://bugs.webkit.org/show_bug.cgi?id=60503
      
              This patch lays the ground for refactoring the drag start logic. It moves draggableNode to
              DragController to avoid the awkward plumbing of calling DragController from RenderObject and
              also moves EventHandlerDragState out from EventHandler so it can be shared between
              EventHandler and DragController where appropriate.
      
              No new tests since there should be no behavior change.
      
              * GNUmakefile.list.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * page/DragController.cpp:
              (WebCore::DragController::draggableNode):
              (WebCore::DragController::mayStartDragAtEventLocation):
              * page/DragController.h:
              * page/DragState.h: Added.
              (WebCore::DragState::DragState):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::dragState):
              (WebCore::EventHandler::eventMayStartDrag):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
              * rendering/RenderObject.cpp:
              * rendering/RenderObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      252dcbe7
  18. 09 May, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-05-08 Ryosuke Niwa <rniwa@webkit.org> · afbef274
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Extract a DragCaretController from FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60273
      
              Extracted CaretBase and DragCaretController from FrameSelection. CaretBase is a base class for
              DragCaretController and FrameSelection and provides functions to paint caret.
      
              Since DragCaretController doesn't need to store selection, it only holds one VisiblePosition.
      
              * WebCore.exp.in:
              * editing/FrameSelection.cpp:
              (WebCore::CaretBase::CaretBase): Added.
              (WebCore::DragCaretController::DragCaretController): Added; Set m_caretVisible true.
              (WebCore::DragCaretController::isContentRichlyEditable): Added.
              (WebCore::FrameSelection::FrameSelection): Several member variables are move to CaretBase.
              (WebCore::DragCaretController::setCaretPosition): Extracted from FrameSelection::setSelection.
              (WebCore::FrameSelection::setSelection): Removed an early exit for DragCaretController.
              (WebCore::clearRenderViewSelection): Extracted from FrameSelection::respondToNodeModification.
              (WebCore::DragCaretController::nodeWillBeRemoved): Extracted from FrameSelection::nodeWillBeRemoved
              and respondToNodeModification. Note that the position DragCaretController holds is equivalent to
              FrameSelection's base or start so when removingNodeRemovesPosition returns true for m_position,
              we used to execute the first if clause and cleared render tree selection and DOM tree selection.
              This is exactly what new DragCaretController::nodeWillBeRemoved does.
              (WebCore::FrameSelection::nodeWillBeRemoved): Simplified early exist conditions.
              (WebCore::FrameSelection::respondToNodeModification): Calls clearRenderViewSelection.
              (WebCore::CaretBase::updateCaretRect): Takes document, caretPosition, selection type, and boolean isOrphaned.
              Note that we can't obtain the document from caretPosition because VisiblePosition can be null even if
              FrameSelection's start was not null.
              (WebCore::caretRendersInsideNode): Moved; Made static local.
              (WebCore::CaretBase::caretRenderer): Extracted from FrameSelection::caretRenderer.
              (WebCore::FrameSelection::caretRenderer): Calls CaretBase::caretRenderer.
              (WebCore::DragCaretController::caretRenderer): Ditto.
              (WebCore::FrameSelection::localCaretRect): Calls updateCaretRect with extra arguments.
              (WebCore::CaretBase::absoluteBoundsForLocalRect): Moved from FrameSelection; Takes Node*.
              (WebCore::CaretBase::caretRepaintRect): Ditto.
              (WebCore::FrameSelection::recomputeCaretRect): Calls absoluteBoundsForLocalRect, caretRepaintRect,
              and shouldRepaintCaret with extra arguments.
              (WebCore::CaretBase::shouldRepaintCaret): Takes a boolean isContentEditable.
              (WebCore::FrameSelection::invalidateCaretRect): Calls CaretBase::invalidateCaretRect.
              (WebCore::CaretBase::invalidateCaretRect): Extracted from FrameSelection::invalidateCaretRect.
              (WebCore::FrameSelection::paintCaret): Calls CaretBase::paintCaret.
              (WebCore::CaretBase::paintCaret): Extracted from FrameSelection::paintCaret.
              (WebCore::FrameSelection::updateAppearance): Removed an assertion that this function is never called for
              DragCaretController.
              (WebCore::DragCaretController::paintDragCaret): Moved from FrameSelection::paintDragCaret.
              * editing/FrameSelection.h:
              (WebCore::CaretBase::localCaretRectForPainting): Added.
              (WebCore::DragCaretController::isContentEditable): Added.
              (WebCore::DragCaretController::hasCaret): Added.
              (WebCore::DragCaretController::caretPosition): Added.
              (WebCore::DragCaretController::clear): Added.
              * page/DragController.cpp:
              (WebCore::DragController::tryDocumentDrag): Uses DragCaretController.
              (WebCore::DragController::dispatchTextInputEventFor): Ditto.
              (WebCore::DragController::concludeEditDrag): Ditto.
              (WebCore::DragController::placeDragCaret): Ditto.
              * page/Page.cpp:
              (WebCore::Page::Page): Instantiates DragCaretController instead of FrameSelection.
              * page/Page.h:
              (WebCore::Page::dragCaretController): Returns DragCaretController* instead of FrameSelection*.
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintCaret): Uses FrameSelection and DragCaretController.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afbef274
  19. 05 May, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-05-05 Ryosuke Niwa <rniwa@webkit.org> · 78bbc94c
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::selectWordAroundCaret):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::textInputType):
              (WebKit::WebViewImpl::caretOrSelectionBounds):
              (WebKit::WebViewImpl::caretOrSelectionRange):
              (WebKit::WebViewImpl::clearFocusedNode):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * Api/qwebframe.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * webkit/webkitwebview.cpp:
              (getLocationForKeyboardGeneratedContextMenu):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebView.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebDOMSelection.cpp:
              * WebDOMSelection.h:
              * WebKitSupport/EditorClientWx.cpp:
              * WebView.cpp:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebView/WebFrame.mm:
              (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
              * WebView/WebFrameInternal.h:
              * WebView/WebHTMLView.mm:
              * WebView/WebTextCompletionController.mm:
              (-[WebTextCompletionController doCompletion]):
              * WebView/WebView.mm:
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * WebCoreSupport/EditorClientEfl.cpp:
              (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      2011-05-05  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename SelectionController to FrameSelection
              https://bugs.webkit.org/show_bug.cgi?id=60234
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * accessibility/AccessibilityObject.cpp:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine):
              * accessibility/mac/AccessibilityObjectWrapper.mm:
              * bindings/objc/ExceptionHandlers.h:
              * css/CSSStyleSelector.cpp:
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::cloneChildNodes):
              * dom/Document.cpp:
              * dom/InputElement.cpp:
              * editing/DeleteButtonController.cpp:
              * editing/EditCommand.cpp:
              * editing/EditingAllInOne.cpp:
              * editing/EditingStyle.cpp:
              * editing/Editor.cpp:
              (WebCore::Editor::canCopy):
              (WebCore::Editor::canDelete):
              (WebCore::Editor::markMisspellingsAfterTypingToWord):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              (WebCore::Editor::changeSelectionAfterCommand):
              (WebCore::Editor::respondToChangedSelection):
              * editing/Editor.h:
              * editing/EditorCommand.cpp:
              (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):
              * editing/FrameSelection.cpp: Copied from Source/WebCore/editing/SelectionController.cpp.
              (WebCore::FrameSelection::FrameSelection):
              (WebCore::FrameSelection::moveTo):
              (WebCore::FrameSelection::setSelection):
              (WebCore::FrameSelection::nodeWillBeRemoved):
              (WebCore::FrameSelection::respondToNodeModification):
              (WebCore::FrameSelection::textWillBeReplaced):
              (WebCore::FrameSelection::setIsDirectional):
              (WebCore::FrameSelection::directionOfEnclosingBlock):
              (WebCore::FrameSelection::willBeModified):
              (WebCore::FrameSelection::positionForPlatform):
              (WebCore::FrameSelection::startForPlatform):
              (WebCore::FrameSelection::endForPlatform):
              (WebCore::FrameSelection::modifyExtendingRight):
              (WebCore::FrameSelection::modifyExtendingForward):
              (WebCore::FrameSelection::modifyMovingRight):
              (WebCore::FrameSelection::modifyMovingForward):
              (WebCore::FrameSelection::modifyExtendingLeft):
              (WebCore::FrameSelection::modifyExtendingBackward):
              (WebCore::FrameSelection::modifyMovingLeft):
              (WebCore::FrameSelection::modifyMovingBackward):
              (WebCore::FrameSelection::modify):
              (WebCore::FrameSelection::xPosForVerticalArrowNavigation):
              (WebCore::FrameSelection::clear):
              (WebCore::FrameSelection::setStart):
              (WebCore::FrameSelection::setEnd):
              (WebCore::FrameSelection::setBase):
              (WebCore::FrameSelection::setExtent):
              (WebCore::FrameSelection::setCaretRectNeedsUpdate):
              (WebCore::FrameSelection::updateCaretRect):
              (WebCore::FrameSelection::caretRenderer):
              (WebCore::FrameSelection::localCaretRect):
              (WebCore::FrameSelection::absoluteBoundsForLocalRect):
              (WebCore::FrameSelection::absoluteCaretBounds):
              (WebCore::FrameSelection::caretRepaintRect):
              (WebCore::FrameSelection::recomputeCaretRect):
              (WebCore::FrameSelection::shouldRepaintCaret):
              (WebCore::FrameSelection::invalidateCaretRect):
              (WebCore::FrameSelection::paintCaret):
              (WebCore::FrameSelection::debugRenderer):
              (WebCore::FrameSelection::contains):
              (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
              (WebCore::FrameSelection::selectAll):
              (WebCore::FrameSelection::setSelectedRange):
              (WebCore::FrameSelection::isInPasswordField):
              (WebCore::FrameSelection::caretRendersInsideNode):
              (WebCore::FrameSelection::focusedOrActiveStateChanged):
              (WebCore::FrameSelection::pageActivationChanged):
              (WebCore::FrameSelection::updateSecureKeyboardEntryIfActive):
              (WebCore::FrameSelection::setUseSecureKeyboardEntry):
              (WebCore::FrameSelection::setFocused):
              (WebCore::FrameSelection::isFocusedAndActive):
              (WebCore::FrameSelection::updateAppearance):
              (WebCore::FrameSelection::setCaretVisible):
              (WebCore::FrameSelection::clearCaretRectIfNeeded):
              (WebCore::FrameSelection::caretBlinkTimerFired):
              (WebCore::FrameSelection::notifyRendererOfSelectionChange):
              (WebCore::FrameSelection::setFocusedNodeIfNeeded):
              (WebCore::FrameSelection::paintDragCaret):
              (WebCore::FrameSelection::copyTypingStyle):
              (WebCore::FrameSelection::shouldDeleteSelection):
              (WebCore::FrameSelection::bounds):
              (WebCore::FrameSelection::getClippedVisibleTextRectangles):
              (WebCore::FrameSelection::currentForm):
              (WebCore::FrameSelection::revealSelection):
              (WebCore::FrameSelection::setSelectionFromNone):
              (WebCore::FrameSelection::shouldChangeSelection):
              (WebCore::FrameSelection::formatForDebugger):
              (WebCore::FrameSelection::showTreeForThis):
              (showTree):
              * editing/FrameSelection.h: Copied from Source/WebCore/editing/SelectionController.h.
              (WebCore::FrameSelection::typingStyle):
              (WebCore::FrameSelection::clearTypingStyle):
              (WebCore::FrameSelection::setTypingStyle):
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/ModifySelectionListLevel.cpp:
              * editing/RemoveFormatCommand.cpp:
              * editing/ReplaceSelectionCommand.cpp:
              * editing/SelectionController.cpp: Removed.
              * editing/SelectionController.h: Removed.
              * editing/SetSelectionCommand.cpp:
              (WebCore::SetSelectionCommand::SetSelectionCommand):
              (WebCore::SetSelectionCommand::doApply):
              (WebCore::SetSelectionCommand::doUnapply):
              * editing/SetSelectionCommand.h:
              (WebCore::SetSelectionCommand::create):
              * editing/SpellingCorrectionCommand.cpp:
              (WebCore::SpellingCorrectionCommand::doApply):
              * editing/SpellingCorrectionController.cpp:
              (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * editing/chromium/FrameSelectionChromium.cpp: Copied from Source/WebCore/editing/chromium/SelectionControllerChromium.cpp.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/chromium/SelectionControllerChromium.cpp: Removed.
              * editing/gtk/FrameSelectionGtk.cpp: Copied from Source/WebCore/editing/gtk/SelectionControllerGtk.cpp.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/gtk/SelectionControllerGtk.cpp: Removed.
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::canCopyExcludingStandaloneImages):
              * editing/mac/FrameSelectionMac.mm: Copied from Source/WebCore/editing/mac/SelectionControllerMac.mm.
              (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
              * editing/mac/SelectionControllerMac.mm: Removed.
              * editing/qt/EditorQt.cpp:
              * loader/archive/cf/LegacyWebArchive.cpp:
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::populate):
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::type):
              (WebCore::DOMSelection::modify):
              (WebCore::DOMSelection::addRange):
              (WebCore::DOMSelection::deleteFromDocument):
              (WebCore::DOMSelection::containsNode):
              * page/DragController.cpp:
              (WebCore::DragController::dragIsMove):
              * page/DragController.h:
              * page/EventHandler.cpp:
              (WebCore::setSelectionIfNeeded):
              (WebCore::setNonDirectionalSelectionIfNeeded):
              (WebCore::EventHandler::sendContextMenuEventForKey):
              (WebCore::EventHandler::handleKeyboardSelectionMovement):
              * page/EventHandler.h:
              * page/FocusController.cpp:
              (WebCore::clearSelectionIfNeeded):
              * page/Frame.cpp:
              (WebCore::Frame::Frame):
              * page/Frame.h:
              (WebCore::Frame::selection):
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::dragCaretController):
              * page/chromium/DragControllerChromium.cpp:
              * page/chromium/EventHandlerChromium.cpp:
              * page/win/DragControllerWin.cpp:
              * page/win/EventHandlerWin.cpp:
              * rendering/HitTestResult.cpp:
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::destroy):
              (WebCore::RenderBlock::paintCaret):
              * rendering/RenderImage.cpp:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::destroy):
              * rendering/RenderLayer.cpp:
              * rendering/RenderListBox.cpp:
              * rendering/RenderObjectChildList.cpp:
              (WebCore::RenderObjectChildList::removeChildNode):
              * rendering/RenderTextControl.cpp:
              * rendering/RenderTextControlSingleLine.cpp:
              * rendering/RenderTheme.cpp:
              * rendering/RenderTreeAsText.cpp:
              * svg/SVGSVGElement.cpp:
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGTextContentElement::selectSubString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78bbc94c
  20. 02 May, 2011 1 commit
    • weinig@apple.com's avatar
      2011-05-02 Sam Weinig <sam@webkit.org> · 00a4f524
      weinig@apple.com authored
              Reviewed by Adam Barth.
      
              Prune some #includes from DOMWindow.h
              https://bugs.webkit.org/show_bug.cgi?id=59907
      
              * Plugins/WebBaseNetscapePluginView.mm:
              * WebView/WebFrame.mm:
              Add now missing SecurityOrigin.h #includes.
      2011-05-02  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Adam Barth.
      
              Prune some #includes from DOMWindow.h
              https://bugs.webkit.org/show_bug.cgi?id=59907
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::setSecurityOrigin):
              * page/DOMWindow.h:
              Remove #includes of SecurityOrigin and MessagePort by forward declaring
              and moving the SecurityOrigin setter to the .cpp file. Also adds EventTarget
              #include that was getting added by MessagePort.h.
      
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/ScriptController.h:
              * html/HTMLAnchorElement.cpp:
              * html/HTMLMediaElement.cpp:
              * html/parser/XSSFilter.cpp:
              * inspector/InspectorDOMStorageResource.cpp:
              * loader/MainResourceLoader.cpp:
              * page/DragController.cpp:
              * page/EventSource.cpp:
              * page/Location.cpp:
              * websockets/WebSocket.cpp:
              * xml/XSLTProcessorLibxslt.cpp:
              Add now missing SecurityOrigin.h #includes.
      2011-05-02  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Adam Barth.
      
              Prune some #includes from DOMWindow.h
              https://bugs.webkit.org/show_bug.cgi?id=59907
      
              * WebProcess/WebPage/WebFrame.cpp:
              Add now missing SecurityOrigin.h #include.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00a4f524
  21. 25 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-25 Chang Shu <cshu@webkit.org> · 595681f4
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              Code refactoring. No new tests.
      
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
              * dom/Document.cpp:
              (WebCore::acceptsEditingFocus):
              * dom/Node.cpp:
              (WebCore::Node::rendererIsEditable):
              (WebCore::Node::shouldUseInputMethod):
              (WebCore::Node::canStartSelection):
              (WebCore::Node::rootEditableElement):
              * dom/Node.h:
              (WebCore::Node::isContentEditable):
              (WebCore::Node::rendererIsEditable):
              (WebCore::Node::rendererIsRichlyEditable):
              * dom/Position.cpp:
              (WebCore::nextRenderedEditable):
              (WebCore::previousRenderedEditable):
              (WebCore::Position::atEditingBoundary):
              (WebCore::Position::parentEditingBoundary):
              (WebCore::Position::upstream):
              (WebCore::Position::downstream):
              (WebCore::Position::isCandidate):
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::isCandidate):
              * editing/AppendNodeCommand.cpp:
              (WebCore::AppendNodeCommand::AppendNodeCommand):
              (WebCore::AppendNodeCommand::doApply):
              (WebCore::AppendNodeCommand::doUnapply):
              * editing/ApplyStyleCommand.cpp:
              (WebCore::containsNonEditableRegion):
              (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
              (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
              (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
              * editing/DeleteButtonController.cpp:
              (WebCore::isDeletableElement):
              (WebCore::enclosingDeletableElement):
              * editing/DeleteFromTextNodeCommand.cpp:
              (WebCore::DeleteFromTextNodeCommand::doApply):
              (WebCore::DeleteFromTextNodeCommand::doUnapply):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/Editor.cpp:
              (WebCore::Editor::canDeleteRange):
              (WebCore::Editor::markMisspellingsOrBadGrammar):
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
              * editing/EditorCommand.cpp:
              (WebCore::verticalScrollDistance):
              * editing/FormatBlockCommand.cpp:
              (WebCore::enclosingBlockToSplitTreeTo):
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::outdentParagraph):
              * editing/InsertIntoTextNodeCommand.cpp:
              (WebCore::InsertIntoTextNodeCommand::doApply):
              (WebCore::InsertIntoTextNodeCommand::doUnapply):
              * editing/InsertNodeBeforeCommand.cpp:
              (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
              (WebCore::InsertNodeBeforeCommand::doApply):
              (WebCore::InsertNodeBeforeCommand::doUnapply):
              * editing/JoinTextNodesCommand.cpp:
              (WebCore::JoinTextNodesCommand::doApply):
              (WebCore::JoinTextNodesCommand::doUnapply):
              * editing/MergeIdenticalElementsCommand.cpp:
              (WebCore::MergeIdenticalElementsCommand::doApply):
              (WebCore::MergeIdenticalElementsCommand::doUnapply):
              * editing/RemoveNodeCommand.cpp:
              (WebCore::RemoveNodeCommand::doApply):
              (WebCore::RemoveNodeCommand::doUnapply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplacementFragment::ReplacementFragment):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
              (WebCore::SelectionController::setSelectionFromNone):
              * editing/SplitElementCommand.cpp:
              (WebCore::SplitElementCommand::executeApply):
              (WebCore::SplitElementCommand::doUnapply):
              * editing/SplitTextNodeCommand.cpp:
              (WebCore::SplitTextNodeCommand::doApply):
              (WebCore::SplitTextNodeCommand::doUnapply):
              (WebCore::SplitTextNodeCommand::doReapply):
              * editing/SplitTextNodeContainingElementCommand.cpp:
              (WebCore::SplitTextNodeContainingElementCommand::doApply):
              * editing/VisiblePosition.cpp:
              (WebCore::VisiblePosition::canonicalPosition):
              * editing/WrapContentsInDummySpanCommand.cpp:
              (WebCore::WrapContentsInDummySpanCommand::doUnapply):
              (WebCore::WrapContentsInDummySpanCommand::doReapply):
              * editing/htmlediting.cpp:
              (WebCore::highestEditableRoot):
              (WebCore::lowestEditableAncestor):
              (WebCore::isEditablePosition):
              (WebCore::isRichlyEditablePosition):
              (WebCore::firstEditablePositionAfterPositionInRoot):
              (WebCore::extendRangeToWrappingNodes):
              (WebCore::enclosingNodeWithTag):
              (WebCore::enclosingNodeOfType):
              (WebCore::highestEnclosingNodeOfType):
              (WebCore::canMergeLists):
              * editing/visible_units.cpp:
              (WebCore::previousLeafWithSameEditability):
              (WebCore::previousLinePosition):
              (WebCore::nextLeafWithSameEditability):
              (WebCore::nextLinePosition):
              (WebCore::startOfParagraph):
              (WebCore::endOfParagraph):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::supportsFocus):
              (WebCore::HTMLAnchorElement::defaultEventHandler):
              (WebCore::HTMLAnchorElement::setActive):
              (WebCore::HTMLAnchorElement::canStartSelection):
              (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::supportsFocus):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::supportsFocus):
              (WebCore::HTMLElement::isContentEditable):
              (WebCore::HTMLElement::contentEditable):
              * html/HTMLElement.h:
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              (WebCore::DragController::canProcessDrag):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMouseReleaseEvent):
              (WebCore::EventHandler::selectCursor):
              * page/FocusController.cpp:
              (WebCore::relinquishesEditingFocus):
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::isContentEditable):
              * rendering/RenderBlock.cpp:
              (WebCore::positionForPointRespectingEditingBoundaries):
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::RenderBlock::addOverflowFromInlineChildren):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::canBeProgramaticallyScrolled):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::createVisiblePosition):
              * rendering/RootInlineBox.cpp:
              (WebCore::isEditableLeaf):
              * svg/SVGAElement.cpp:
              (WebCore::SVGAElement::supportsFocus):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * src/WebNode.cpp:
              (WebKit::WebNode::isContentEditable):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setFocus):
              (WebKit::WebViewImpl::setComposition):
              (WebKit::WebViewImpl::confirmComposition):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-03-25  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              rename Node::isContentEditable and all call sites to rendererIsEditable
              https://bugs.webkit.org/show_bug.cgi?id=54290
      
              This is part of the effort to separate JS API HTMLElement isContentEditable from
              internal Node::rendererIsEditable.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      595681f4
  22. 21 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-21 Chang Shu <cshu@webkit.org> · f52c4946
      commit-queue@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              Restore the expected result before r79953. r79953 changed behavior slightly in function
              finishedLoadingWithDataSource in file mac/WebView/WebHTMLRepresentation.mm, where
              core(webFrame)->editor()->applyEditingStyleToBodyElement() was called but not before r79953
              or after this patch.
      
              * platform/mac/editing/selection/designmode-no-caret-expected.txt:
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * WebCore.exp.in:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              * dom/Node.cpp:
              (WebCore::Node::isContentEditable):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelectionFromNone):
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::setEditable):
              (WebCore::Page::isEditable):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_get_editable):
              (webkit_web_view_set_editable):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              (-[WebView isEditable]):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * Api/qwebpage.cpp:
              (QWebPage::setContentEditable):
              (QWebPage::isContentEditable):
      2011-03-21  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Alexey Proskuryakov.
      
              REGRESSION (r79953): Can't type in MS Outlook 2011
              https://bugs.webkit.org/show_bug.cgi?id=56665
      
              r79953 removed the WebView level editablity which is persistent no matter whether
              underlying document itself is changed and editability gets lost. The resolution is to
              set this WebView editable value to WebCore. This avoids the callback from WebCore to
              WebKit which was the main goal in r79953 to improve performance.
      
              * WebFrame.cpp:
              (wxWebFrame::MakeEditable):
              (wxWebFrame::IsEditable):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f52c4946
  23. 15 Mar, 2011 1 commit
  24. 01 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-02-28 Chang Shu <cshu@webkit.org> · 83c267fc
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Updated expected results after the change that syncs the WebKit isEditable
              and WebCore isContentEditable.
      
              * platform/mac/editing/selection/designmode-no-caret-expected.txt:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Frame::isContentEditable is currently based on two things: Editor::clientIsEditable and
              Document::inDesignMode. In fact, it should only rely on Document::inDesignMode. As a result,
              Editor::clientIsEditable and its client-side implementation can be removed.
      
              * WebCore.exp.in:
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isReadOnly):
              * editing/Editor.cpp:
              * editing/Editor.h:
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::setSelectionFromNone):
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::isContentEditable):
              (WebCore::HTMLElement::isContentRichlyEditable):
              * page/DragController.cpp:
              (WebCore::DragController::operationForLoad):
              * page/EditorClient.h:
              * page/Frame.cpp:
              * page/Frame.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * src/EditorClientImpl.cpp:
              * src/EditorClientImpl.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/EditorClientEfl.cpp:
              * WebCoreSupport/EditorClientEfl.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * WebCoreSupport/EditorClientGtk.cpp:
              * WebCoreSupport/EditorClientGtk.h:
              * webkit/webkitwebview.cpp:
              (webkit_web_view_init):
              (webkit_web_view_get_editable):
              (webkit_web_view_set_editable):
              * webkit/webkitwebviewprivate.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              * WebCoreSupport/EditorClientHaiku.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              * WebView/WebView.mm:
              (-[WebView setEditable:]):
              (-[WebView isEditable]):
              * WebView/WebViewData.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * Api/qwebpage.cpp:
              (QWebPagePrivate::QWebPagePrivate):
              (QWebPage::setContentEditable):
              (QWebPage::isContentEditable):
              * Api/qwebpage_p.h:
              * WebCoreSupport/EditorClientQt.cpp:
              * WebCoreSupport/EditorClientQt.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/WebEditorClient.cpp:
              * WebCoreSupport/WebEditorClient.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation.
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              * WebCoreSupport/EditorClientWinCE.h:
      2011-02-28  Chang Shu  <cshu@webkit.org>
      
              Reviewed by Ryosuke Niwa.
      
              Remove the support of Frame::isContentEditable and its dependencies.
              https://bugs.webkit.org/show_bug.cgi?id=54292
      
              Remove the WebKit side implementation. Make WebKit support depend on Document::inDesignMode.
      
              * WebFrame.cpp:
              (wxWebFrame::wxWebFrame):
              (wxWebFrame::MakeEditable):
              (wxWebFrame::IsEditable):
              * WebFrame.h:
              * WebKitSupport/EditorClientWx.cpp:
              * WebKitSupport/EditorClientWx.h:
              * WebView.cpp:
              (wxWebView::wxWebView):
              * WebView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83c267fc
  25. 21 Feb, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-02-17 Ryosuke Niwa <rniwa@webkit.org> · 62b16970
      rniwa@webkit.org authored
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode().
      
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::setComposition): Check the nullity of startContainer() instead of startPosition()->node().
              (WebKit::WebViewImpl::confirmComposition): Ditto.
              (WebKit::WebViewImpl::textInputType):
              (WebKit::WebViewImpl::caretOrSelectionBounds):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Replaced the call to node() by a call to containerNode() because the returned node is
              used to determine whether or not the selected contents are editable and such a check
              must be done against the container node.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode().
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_popup_menu_handler):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              * WebView/WebFrame.mm:
              (-[WebFrame _smartDeleteRangeForProposedRange:]):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Replaced the call to node() by a call to containerNode() because the returned node is
              used to determine whether or not the selected contents are editable and such a check
              must be done against the container node.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2011-02-17  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Kent Tamura.
      
              Rename Position::node() to Position::deprecatedNode()
              https://bugs.webkit.org/show_bug.cgi?id=54622
      
              Done the rename. All calls to node() are replaced by calls to deprecatedNode() except when
              calls were of the form node()->document() and node()->inDocument() in which case they were
              replaced by anchorNode()->document() and anchorNode()->inDocument() respectively.
      
              * WebCore.exp.in: Added Position::containerNode.
      
              The rest abbreviated for simplicity. Please see svn log.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62b16970
  26. 20 Feb, 2011 1 commit
  27. 15 Feb, 2011 2 commits
    • darin@apple.com's avatar
      2011-02-15 Jia Pu <jpu@apple.com> · 060d7a1a
      darin@apple.com authored
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebCoreSupport/WebEditorClient.cpp:
              (WebFrameImpl::replaceSelection): Adopted new signature of ReplaceSelectionCommand::create().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
      
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::recordAutocorrectionResponse): Ditto.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
                   Adopted new signature of ReplaceSelectionCommand::create().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Manual test: manual-tests/autocorrection/undo-autocorrection.html
      
              When user undoes an autocorrection, we need to do four things:
              1. Revert the change in text that has been made by correction.
              2. Revert the selection to pre-correction state so that user can immediately continue typing.
              3. Add appropriate markers to reverted text so that it won't be corrected again and/or shown
                 as misspelled.
              4. If applicable, notify spell checking service to record this reversion.
      
              To achieve these, this patch introduces following changes:
              1. Created SpellingCorrectionCommand so that correction can be undone in similar way as any
                 other editing command. SpellingCorrectionCommand is a composition of SetSelectionCommand,
                 SpellingCorrectionRecordUndoCommand and ReplaceSelectionCommand.
              2. Created SetSelectionCommand so that undo command can restore selection state.
              3. Added member function recordAutocorrectionResponse() to editor client.
      
              To improve readability, this patch also consolidates various boolean arguments in SelectionController::setSelection()
              and ReplaceSelectionCommand::ReplaceSelectionCommand(). These boolean arguments have been
              replaced by enum variable.
      
              * WebCore.exp.in: Updated for changes in Editor and ReplaceSelectionCommand.
      
              * WebCore.xcodeproj/project.pbxproj: Updated for new source files.
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphs): Adopted new signature of ReplaceSelectionCommand::create().
      
              * editing/Editor.cpp:
              (WebCore::Editor::replaceSelectionWithFragment): Ditto.
              (WebCore::Editor::unappliedEditing): Cleaned up trailing whitespace.
              (WebCore::Editor::reappliedEditing): Ditto.
              (WebCore::Editor::selectComposition): Adopted new signature of SelectionController::setSelection().
              (WebCore::Editor::confirmComposition): Ditto.
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Rearranged code to reduce the
                  level of deeply nested if statement. Adopted SpellingCorrectionCommand.
              (WebCore::Editor::applyCorrectionPanelInfo): Adopted SpellingCorrectionCommand.
              (WebCore::Editor::unappliedSpellCorrection): Function for adding markers to reverted text and
                  for notifiying editor client about undone correction.
              (WebCore::Editor::changeSelectionAfterCommand): Adopted new signature of SelectionController::setSelection().
              (WebCore::Editor::respondToChangedSelection): Use SelectionController::SetSelectionOptions
                  instead of boolean variables.
      
              * editing/Editor.h: Added Editor::unappliedSpellCorrection().
      
              * editing/EditorCommand.cpp:
              (WebCore::executeInsertFragment): Adopted new signature of ReplaceSelectionCommand::create().
      
              * editing/MoveSelectionCommand.cpp:
              (WebCore::MoveSelectionCommand::doApply): Ditto.
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Replaced all boolean arguments
                  with an enum value.
      
              * editing/ReplaceSelectionCommand.h:
              (WebCore::ReplaceSelectionCommand::create): Ditto.
      
              * editing/SelectionController.cpp: Adopted new signature of SelectionController::setSelection().
              (WebCore::SelectionController::moveTo):
              (WebCore::SelectionController::setSelection):
              (WebCore::SelectionController::respondToNodeModification):
              (WebCore::SelectionController::setBase):
              (WebCore::SelectionController::setExtent):
              (WebCore::SelectionController::setSelectedRange):
      
              * editing/SelectionController.h:
              (WebCore::SelectionController::setSelection): Replaced all boolean arguments with an enum value.
      
              * editing/SetSelectionCommand.cpp: Added.
              (WebCore::SetSelectionCommand::SetSelectionCommand):
              (WebCore::SetSelectionCommand::doApply):
              (WebCore::SetSelectionCommand::doUnapply):
      
              * editing/SetSelectionCommand.h: Added.
              (WebCore::SetSelectionCommand::create):
      
              * editing/mac/SpellingCorrectionCommand.cpp: Added.
              (WebCore::SpellingCorrectionRecordUndoCommand::create):
              (WebCore::SpellingCorrectionRecordUndoCommand::SpellingCorrectionRecordUndoCommand):
              (WebCore::SpellingCorrectionRecordUndoCommand::doApply):
              (WebCore::SpellingCorrectionRecordUndoCommand::doUnapply):
              (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):
              (WebCore::SpellingCorrectionCommand::doApply):
      
              * editing/mac/SpellingCorrectionCommand.h: Added.
              (WebCore::SpellingCorrectionCommand::create):
      
              * loader/EmptyClients.h: Updated for the new function declared in EditorClient.
              (WebCore::EmptyEditorClient::recordAutocorrectionResponse):
      
              * manual-tests/autocorrection/undo-autocorrection.html: Added.
      
              * page/ContextMenuController.cpp:
              (WebCore::ContextMenuController::contextMenuItemSelected): Adopted new signature of ReplaceSelectionCommand::create().
      
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag): Ditto.
      
              * page/EditorClient.h: Added EditorClient::recordAutocorrectionResponse().
      2011-02-15  Jia Pu  <jpu@apple.com>
      
              Reviewed by Darin Adler.
      
              Autocorrection should respect undo.
              https://bugs.webkit.org/show_bug.cgi?id=52221
              <rdar://problem/8663399>
      
              Please see WebCore/ChangeLog for detailed description.
      
              * WebProcess/WebCoreSupport/WebEditorClient.h: Updated for the new function declared in EditorClient.
      
              * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
              (WebKit::WebEditorClient::recordAutocorrectionResponse): Ditto.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::replaceSelectionWithText): Adopted new signature of ReplaceSelectionCommand::create().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      060d7a1a
    • andreas.kling@nokia.com's avatar
      2011-02-15 Andreas Kling <kling@webkit.org> · a0943e6e
      andreas.kling@nokia.com authored
              Reviewed by Darin Adler.
      
              Rename Color::name() to Color::nameForRenderTreeAsText()
              https://bugs.webkit.org/show_bug.cgi?id=54464
      
              Color::name() returns the color as either #RRGGBB or #RRGGBBAA.
              Since the latter is not a valid CSS color, it can't be re-parsed
              by WebKit, and should only be used in DRT dumps.
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::extractTextStyles):
              * page/DragController.cpp:
              (WebCore::DragController::concludeEditDrag):
              * platform/graphics/Color.cpp:
              (WebCore::Color::nameForRenderTreeAsText):
              * platform/graphics/Color.h:
              * platform/graphics/GraphicsLayer.cpp:
              (WebCore::GraphicsLayer::dumpProperties):
              * platform/graphics/filters/FEFlood.cpp:
              (WebCore::FEFlood::externalRepresentation):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::RenderTreeAsText::writeRenderObject):
              * rendering/svg/SVGRenderTreeAsText.cpp:
              (WebCore::operator<<):
              (WebCore::writeRenderSVGTextBox):
              * svg/SVGAnimateElement.cpp:
              (WebCore::SVGAnimateElement::applyResultsToTarget):
              * svg/SVGColor.cpp:
              (WebCore::SVGColor::cssText):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0943e6e
  28. 08 Feb, 2011 1 commit
    • enrica@apple.com's avatar
      Reviewed Adam Roben and Darin Adler. · 3492e98b
      enrica@apple.com authored
      Source/WebCore: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      <rdar://problem/8514409>
      
      * loader/EmptyClients.h: Removed createDragImageFromLink.
      * page/DragClient.h: Ditto.
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): changed call to createDragImageFromLink.
      * platform/DragImage.h:
      * platform/mac/DragImageMac.mm:
      (WebCore::createDragImageForLink): Moved from DragClient.
      * platform/win/ClipboardUtilitiesWin.cpp: Added a series of functions
      to de-serialize the drag data from the map into an IDataObject.
      (WebCore::getWebLocData):
      (WebCore::texthtmlFormat):
      (WebCore::createGlobalData):
      (WebCore::getFullCFHTML):
      (WebCore::urlWFormat):
      (WebCore::urlFormat):
      (WebCore::filenameWFormat):
      (WebCore::filenameFormat):
      (WebCore::htmlFormat):
      (WebCore::smartPasteFormat):
      (WebCore::getURL):
      (WebCore::getPlainText):
      (WebCore::getTextHTML):
      (WebCore::ClipboardDataItem::ClipboardDataItem):
      (WebCore::getStringData):
      (WebCore::getUtf8Data):
      (WebCore::getCFData):
      (WebCore::setUCharData):
      (WebCore::setCharData):
      (WebCore::setCFData):
      (WebCore::getClipboardMap):
      (WebCore::getClipboardData):
      (WebCore::setClipboardData):
      * platform/win/ClipboardUtilitiesWin.h:
      * platform/win/DragImageWin.cpp: Moved createDragImageForLink from DragClient
      to a platform specific file in WebCore. It makes a lot more sense here, since
      the drag image is always created in WebCore for all the other content types
      except for links.
      (WebCore::dragLabelFont):
      (WebCore::createDragImageForLink):
      * platform/win/WCDataObject.cpp: Added new way to
      construct a WCDataObject from a DragDataMap.
      (WebCore::WCDataObject::createInstance):
      (WebCore::WCDataObject::clearData):
      * platform/win/WCDataObject.h:
      
      Source/WebKit/chromium: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
              
      * src/DragClientImpl.cpp:
      * src/DragClientImpl.h:
      
      Source/WebKit/efl: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientEfl.cpp:
      * WebCoreSupport/DragClientEfl.h:
      
      Source/WebKit/gtk: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientGtk.cpp:
      * WebCoreSupport/DragClientGtk.h:
      
      Source/WebKit/haiku: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientHaiku.cpp:
      * WebCoreSupport/DragClientHaiku.h:
      
      Source/WebKit/mac: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/WebDragClient.h:
      * WebCoreSupport/WebDragClient.mm:
      (WebDragClient::startDrag):
      
      Source/WebKit/qt: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientQt.cpp:
      * WebCoreSupport/DragClientQt.h:
      
      Source/WebKit/win: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/WebDragClient.cpp:
      (WebDragClient::startDrag):
      * WebCoreSupport/WebDragClient.h:
      
      Source/WebKit/wince: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebCoreSupport/DragClientWinCE.cpp:
      * WebCoreSupport/DragClientWinCE.h:
      
      Source/WebKit/wx: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      
      Removed createDragImageForLink from DragClient.
      
      * WebKitSupport/DragClientWx.cpp:
      * WebKitSupport/DragClientWx.h:
      
      Source/WebKit2: 
      
      WebKit2: drag and drop support on Windows.
      https://bugs.webkit.org/show_bug.cgi?id=52775
      <rdar://problem/8514409>
              
      This patch contains the remaining work to support
      a WebKit window as drag source on Windows.
      I've added the code to generate the image for dragging a link as
      well as the steps necessary to package the HBITMAP into a SharedMemory
      object and send it over to the UI process where DoDragDrop is performed.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::setDragImage):
      (WebKit::WebPageProxy::startDragDrop):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::startDrag): Made startDrag for
      platforms other than Windows and Mac.
      * WebProcess/WebCoreSupport/WebDragClient.h:
      * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Added.
      (WebKit::draggingSourceOperationMaskToDragCursors):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebCoreSupport/win/WebDragSource.cpp: Added.
      This object implements the IDropSource interface.
      (WebDragSource::createInstance):
      (WebDragSource::WebDragSource):
      (WebDragSource::QueryInterface):
      (WebDragSource::AddRef):
      (WebDragSource::Release):
      (WebDragSource::QueryContinueDrag):
      (WebDragSource::GiveFeedback):
      * WebProcess/WebCoreSupport/win/WebDragSource.h: Added.
      * win/WebKit2.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3492e98b
  29. 01 Feb, 2011 1 commit
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=53520 · aa0cba07
      hyatt@apple.com authored
              
      Reviewed by Oliver Hunt.
      
      Remove the physical terminology from IntRect and FloatRect.
              
      Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
      we need to update our terminology to be more accurate.
      
      I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
      renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
      even for flipped rectangles.
      
      ../WebCore: 
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
      * accessibility/mac/AccessibilityObjectWrapper.mm:
      (-[AccessibilityObjectWrapper position]):
      * dom/ClientRect.h:
      (WebCore::ClientRect::right):
      (WebCore::ClientRect::bottom):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::convertLogicalToDevice):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::normalizeRect):
      * inspector/InspectorAgent.cpp:
      (WebCore::InspectorAgent::drawElementTitle):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::adjustWindowRect):
      * page/DragController.cpp:
      (WebCore::dragLocForSelectionDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::sendContextMenuEventForKey):
      * page/PrintContext.cpp:
      (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
      (WebCore::PrintContext::pageNumberForElement):
      * page/SpatialNavigation.cpp:
      (WebCore::end):
      (WebCore::areRectsFullyAligned):
      (WebCore::areRectsMoreThanFullScreenApart):
      (WebCore::below):
      (WebCore::rightOf):
      (WebCore::isRectInDirection):
      (WebCore::entryAndExitPointsForDirection):
      (WebCore::virtualRectForDirection):
      * page/WindowFeatures.cpp:
      (WebCore::WindowFeatures::WindowFeatures):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::wheelEvent):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::setFrameRect):
      * platform/ScrollbarThemeComposite.cpp:
      (WebCore::ScrollbarThemeComposite::splitTrack):
      * platform/chromium/ScrollbarThemeChromium.cpp:
      (WebCore::ScrollbarThemeChromium::paintTickmarks):
      * platform/graphics/FloatQuad.h:
      (WebCore::FloatQuad::FloatQuad):
      * platform/graphics/FloatRect.cpp:
      (WebCore::FloatRect::intersects):
      (WebCore::FloatRect::contains):
      (WebCore::FloatRect::intersect):
      (WebCore::FloatRect::unite):
      (WebCore::enclosingIntRect):
      * platform/graphics/FloatRect.h:
      (WebCore::FloatRect::maxX):
      (WebCore::FloatRect::maxY):
      (WebCore::FloatRect::contains):
      * platform/graphics/IntRect.cpp:
      (WebCore::IntRect::intersects):
      (WebCore::IntRect::contains):
      (WebCore::IntRect::intersect):
      (WebCore::IntRect::unite):
      * platform/graphics/IntRect.h:
      (WebCore::IntRect::maxX):
      (WebCore::IntRect::maxY):
      (WebCore::IntRect::shiftXEdgeTo):
      (WebCore::IntRect::shiftMaxXEdgeTo):
      (WebCore::IntRect::shiftYEdgeTo):
      (WebCore::IntRect::shiftMaxYEdgeTo):
      (WebCore::IntRect::contains):
      * platform/graphics/WidthIterator.cpp:
      (WebCore::WidthIterator::advance):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::drawRect):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::fillRect):
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::getImageData):
      (WebCore::putImageData):
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::BitmapImage::draw):
      * platform/graphics/filters/FilterEffect.cpp:
      (WebCore::FilterEffect::copyImageBytes):
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::platformBoundsForGlyph):
      * platform/graphics/transforms/AffineTransform.cpp:
      (WebCore::AffineTransform::mapRect):
      * platform/graphics/win/FontCGWin.cpp:
      (WebCore::drawGDIGlyphs):
      * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
      (WebCore::MediaPlayerPrivate::paint):
      * platform/gtk/RenderThemeGtk.cpp:
      (WebCore::centerRectVerticallyInParentInputElement):
      * platform/mac/WidgetMac.mm:
      (WebCore::Widget::paint):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
      (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::selectionRect):
      (WebCore::InlineTextBox::paint):
      (WebCore::InlineTextBox::positionForOffset):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::addOverflowFromChildren):
      (WebCore::RenderBlock::paintChildren):
      (WebCore::RenderBlock::paintEllipsisBoxes):
      (WebCore::RenderBlock::inlineSelectionGaps):
      (WebCore::RenderBlock::adjustPointToColumnContents):
      (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
      (WebCore::RenderBlock::adjustForColumns):
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::FloatingObject::right):
      (WebCore::RenderBlock::FloatingObject::bottom):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::reflectedRect):
      (WebCore::RenderBox::localCaretRect):
      (WebCore::RenderBox::addShadowOverflow):
      (WebCore::RenderBox::addLayoutOverflow):
      (WebCore::RenderBox::visualOverflowRectForPropagation):
      (WebCore::RenderBox::layoutOverflowRectForPropagation):
      (WebCore::RenderBox::flipForWritingMode):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::paintColumnBorder):
      (WebCore::RenderFrameSet::paintRowBorder):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::paintOutlineForLine):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::getRectToExpose):
      (WebCore::cornerRect):
      (WebCore::RenderLayer::positionOverflowControls):
      (WebCore::RenderLayer::overflowBottom):
      (WebCore::RenderLayer::overflowRight):
      (WebCore::RenderLayer::paintResizer):
      * rendering/RenderLineBoxList.cpp:
      (WebCore::RenderLineBoxList::rangeIntersectsRect):
      (WebCore::RenderLineBoxList::paint):
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::positionListMarker):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::paint):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
      * rendering/RenderOverflow.h:
      (WebCore::RenderOverflow::RenderOverflow):
      (WebCore::RenderOverflow::addLayoutOverflow):
      (WebCore::RenderOverflow::addVisualOverflow):
      (WebCore::RenderOverflow::setLayoutOverflow):
      (WebCore::RenderOverflow::setVisualOverflow):
      (WebCore::RenderOverflow::resetLayoutOverflow):
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::shouldPaint):
      * rendering/RenderScrollbarTheme.cpp:
      (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
      * rendering/RenderTable.cpp:
      (WebCore::RenderTable::paint):
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::paint):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::paintObject):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::absoluteQuads):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::forwardEvent):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintMenuListButtonGradients):
      (WebCore::RenderThemeMac::paintMenuListButton):
      (WebCore::RenderThemeMac::paintSliderTrack):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::computeRectForRepaint):
      (WebCore::RenderView::docBottom):
      (WebCore::RenderView::docRight):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::paddedLayoutOverflowRect):
      * rendering/svg/RenderSVGInlineText.cpp:
      (WebCore::RenderSVGInlineText::localCaretRect):
      
      ../WebKit/mac: 
      
      * WebView/WebHTMLView.mm:
      (setNeedsDisplayInRect):
      
      ../WebKit2: 
      
      * Platform/Region.cpp:
      (WebKit::Region::Shape::Shape):
      * UIProcess/API/mac/WKPrintingView.mm:
      (pageDidComputePageRects):
      * UIProcess/FindIndicator.cpp:
      (WebKit::FindIndicator::draw):
      * UIProcess/TiledDrawingAreaProxy.cpp:
      (WebKit::TiledDrawingAreaProxy::invalidate):
      (WebKit::TiledDrawingAreaProxy::paint):
      (WebKit::TiledDrawingAreaProxy::createTiles):
      * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
      (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
      * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
      (WebKit::NetscapePlugin::callSetWindow):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa0cba07
  30. 13 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: WebKit2: Add support for drag and drop · 9d9813d0
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * WebCore.exp.in:
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove): Added DragData parameter.
      (WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
      (WebCore::DragController::concludeEditDrag): Same as above.
      * page/DragController.h: Added parameter to isCopyKeyDown.
      * page/mac/DragControllerMac.mm:
      The following methods have been modified to use the information stored
      in the DragData class.
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * platform/DragData.h:
      (WebCore::DragData::flags):
      * platform/DragData.cpp: Added default flags parameter to the constructor.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      All the following files have been modified to add the DragData
      parameter to isCopyKeyDown. I plan to improve this in the future
      and make isCopyKeyDown not platform specific.
      * page/android/DragControllerAndroid.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/brew/DragControllerBrew.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/efl/DragControllerEfl.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/haiku/DragControllerHaiku.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/wx/DragControllerWx.cpp:
      (WebCore::DragController::isCopyKeyDown):
      
      WebKit/mac: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      These are the changes to align the behavior for WebKit.
      
      * WebView/WebView.mm:
      (-[WebView applicationFlags:]): Added.
      (-[WebView draggingEntered:]): Added parameter to the DragData constructor.
      (-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
      (-[WebView draggingExited:]): Added parameter to the DragData constructor.
      (-[WebView performDragOperation:]): Added parameter to the DragData constructor.
      
      WebKit2: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * Shared/DragControllerAction.h: Added.
      * UIProcess/API/mac/WKView.mm:
      Added implemention of the methods required to add suport for a drop target.
      To maintain asynchronous communication with the WebProcess, we always return
      the previous calculated value for the drag operation.
      (-[WKView _registerDraggedTypes]):
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView applicationFlags:]):
      (-[WKView draggingEntered:]):
      (-[WKView draggingUpdated:]):
      (-[WKView draggingExited:]):
      (-[WKView prepareForDragOperation:]):
      (-[WKView performDragOperation:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::performDragControllerAction):
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragOperation):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction):
      (WebKit::WebDragClient::willPerformDragSourceAction):
      (WebKit::WebDragClient::actionMaskForDrag):
      (WebKit::WebDragClient::dragSourceActionMaskForPoint):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d9813d0
  31. 11 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: Paste and drag and drop use different code paths to interact with the pasteboard. · 964ea218
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      No new tests. A test is already available for this
      (editing/pasteboard/drag-image-to-contenteditable-in-iframe.html) but had incorrect results.
      
      * WebCore.exp.in:
      * loader/EmptyClients.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      (WebCore::EmptyEditorClient::canonicalizeURL):
      (WebCore::EmptyEditorClient::canonicalizeURLString):
      * page/DragController.cpp:
      The following methods have been changed to pass a pointer to the Frame object
      to the DragData class.
      (WebCore::documentFragmentFromDragData):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      * page/EditorClient.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      The following files have been modified to pass the Frame object to the DragData method calls.
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::dragOperation):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::dragOperation):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::dragOperation):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::dragOperation):
      * platform/DragData.h: Removed Mac specific constructor and reference to PasteboardHelper class.
      * platform/Pasteboard.h: Added public constructor to create a Pasteboard object from an NSPasteboard.
      The following files were all modified to match the new parameters of the methods listed.
      * platform/android/DragDataAndroid.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/haiku/DragDataHaiku.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData):
      (WebCore::DragData::asPlainText):
      (WebCore::insertablePasteboardTypes):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::getBestURL):
      (WebCore::Pasteboard::asURL):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asFragment):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      
      WebKit: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebKit.xcodeproj/project.pbxproj: Removed WebPasteboardHelper.mm and WebPasteboardHelper.h.
      
      WebKit/mac: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebEditorClient::canonicalizeURL):
      (WebEditorClient::canonicalizeURLString):
      * WebCoreSupport/WebPasteboardHelper.h: Removed.
      * WebCoreSupport/WebPasteboardHelper.mm: Removed.
      * WebView/WebHTMLView.mm: Removed comment.
      * WebView/WebView.mm: The following methods have been changed to use the new DragData
      constructor that doesn't use the WebPasteboardHelper reference.
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      
      WebKit2: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebKit::WebEditorClient::canonicalizeURL):
      (WebKit::WebEditorClient::canonicalizeURLString):
      
      LayoutTests: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      
      Reviewed by Alexey Proskuryakov.
      
      New test results added to match the correct behavior.
              
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      964ea218
  32. 08 Jan, 2011 1 commit
  33. 07 Jan, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-01-07 Rafael Weinstein <rafaelw@chromium.org> · 54439938
      commit-queue@webkit.org authored
              Reviewed by Eric Seidel.
      
              Cleanup: Fold shadowParentNode into shadowHost
              https://bugs.webkit.org/show_bug.cgi?id=51059
      
              Replaces all uses of shadowParentNode.
      
              No new tests because no behavior has changed.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::initForStyleResolve):
              * dom/Node.cpp:
              (WebCore::Node::shadowHost):
              (WebCore::Node::shadowAncestorNode):
              (WebCore::eventTargetRespectingSVGTargetRules):
              (WebCore::Node::getEventAncestors):
              * dom/Node.h:
              * editing/Editor.cpp:
              (WebCore::Editor::findString):
              * page/DragController.cpp:
              (WebCore::asFileInput):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::instanceAssociatedWithShadowTreeElement):
              (WebCore::EventHandler::dispatchMouseEvent):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/RenderSVGShadowTreeRootContainer.cpp:
              (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement):
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::title):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      54439938
  34. 21 Dec, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-12-21 Dominic Cooney <dominicc@google.com> · 3fa5e11c
      commit-queue@webkit.org authored
              Reviewed by Adam Barth.
      
              Rename Node::isShadowNode to isShadowRoot
              https://bugs.webkit.org/show_bug.cgi?id=51060
      
              The method gets whether the node is the root of a shadow tree;
              renamed to reflect intent.
      
              A simple rename--no new tests needed.
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::initForStyleResolve):
              (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
              * dom/Node.cpp:
              (WebCore::Node::shadowTreeRootNode):
              (WebCore::Node::isInShadowTree):
              (WebCore::eventTargetRespectingSVGTargetRules):
              (WebCore::Node::getEventAncestors):
              * dom/Node.h:
              (WebCore::Node::isShadowRoot):
              * dom/Range.cpp:
              (WebCore::Range::checkNodeBA):
              * page/DragController.cpp:
              (WebCore::asFileInput):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::dispatchMouseEvent):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::hasLineIfEmpty):
              * rendering/TextControlInnerElements.cpp:
              (WebCore::TextControlInnerElement::attachInnerElement):
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::title):
              * svg/SVGUseElement.cpp:
              (WebCore::ShadowTreeUpdateBlocker::while):
              * svg/animation/SVGSMILElement.cpp:
              (WebCore::SVGSMILElement::insertedIntoDocument):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fa5e11c
  35. 03 Dec, 2010 1 commit
  36. 12 Nov, 2010 1 commit