Subpixel rendering: Transition class Image (and its dependencies) from int to float to enable subpixel positioned/sized images.
https://bugs.webkit.org/show_bug.cgi?id=130643

Reviewed by Simon Fraser.

This is in preparation to support subpixel positioned/sized background images. While 1x bitmap images can't take
subpixel sizing on hidpi resolutions, both generated and hidpi images can.
This patch does not change Image behavior in general as both position and size are still snapped to integral values.

No change in behavior.

Source/WebCore:

* WebCore.exp.in:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::fixedSize):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawImageIntoBuffer):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):
* platform/Cursor.cpp:
(WebCore::determineHotSpot):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::size):
(WebCore::BitmapImage::currentFrameSize):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::drawCrossfadeSubimage):
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::adjustParametersForTiledDrawing):
* platform/graphics/Gradient.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::drawPattern):
* platform/graphics/GradientImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::createCompatibleBuffer):
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
(WebCore::Image::adjustSourceRectForDownSampling):
* platform/graphics/Image.h:
(WebCore::Image::setContainerSize):
(WebCore::Image::rect):
(WebCore::Image::width):
(WebCore::Image::height):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
* platform/graphics/IntPoint.cpp:
(WebCore::IntPoint::IntPoint):
* platform/graphics/IntPoint.h:
* platform/graphics/IntSize.cpp:
(WebCore::IntSize::IntSize):
* platform/graphics/IntSize.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/cairo/ImageCairo.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/cg/ImageBufferDataCG.cpp:
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::size):
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
(WebCore::applyRotationForPainting):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/cg/PatternCG.cpp:
(WebCore::Pattern::createPlatformPattern):
* platform/graphics/mac/GraphicsContextMac.mm:
* platform/graphics/mac/IconMac.mm:
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::update):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* platform/win/DragImageCGWin.cpp:
(WebCore::createDragImageFromImage):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageSizeForError):
(WebCore::RenderImage::paintReplaced):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageSizeForRenderer):
* svg/graphics/SVGImageCache.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::size):
* svg/graphics/SVGImageForContainer.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::externalRepresentation):
* testing/Internals.cpp:
(WebCore::Internals::getCurrentCursorInfo):

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeImage):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):

LayoutTests:

* platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/filters-image-05-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/filters-displace-01-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/filters-image-01-b-expected.txt:
* svg/custom/feDisplacementMap-01-expected.txt:
* svg/filters/feImage-change-target-id-expected.txt:
* svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt:
* svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt:
* svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt:
* svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt:
* svg/filters/feImage-late-indirect-update-expected.txt:
* svg/filters/feImage-multiple-targets-id-change-expected.txt:
* svg/filters/feImage-position-expected.txt:
* svg/filters/feImage-preserveAspectRatio-all-expected.txt:
* svg/filters/feImage-preserveAspectratio-expected.txt:
* svg/filters/feImage-reference-invalidation-expected.txt:
* svg/filters/feImage-reference-svg-primitive-expected.txt:
* svg/filters/feImage-remove-target-expected.txt:
* svg/filters/feImage-subregions-expected.txt:
* svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt:
* svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt:
* svg/filters/feImage-target-add-to-document-expected.txt:
* svg/filters/feImage-target-attribute-change-expected.txt:
* svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.txt:
* svg/filters/feImage-target-attribute-change-with-use-indirection-expected.txt:
* svg/filters/feImage-target-changes-id-expected.txt:
* svg/filters/feImage-target-id-change-expected.txt:
* svg/filters/feImage-target-inline-style-change-expected.txt:
* svg/filters/feImage-target-property-change-expected.txt:
* svg/filters/feImage-target-reappend-to-document-expected.txt:
* svg/filters/feImage-target-remove-from-document-expected.txt:
* svg/filters/feImage-target-style-change-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][Cmake] Enable CSS JIT
https://bugs.webkit.org/show_bug.cgi?id=131022

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-04-01
Reviewed by Martin Robinson.

* wtf/Platform.h: Enable CSS JIT for GTK port.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] No longer build WebKit1 gtkdoc
https://bugs.webkit.org/show_bug.cgi?id=130970

Reviewed by Anders Carlsson.

* gtk/common.py:
(gtk_version_of_pkg_config_file): Deleted.
* gtk/generate-gtkdoc:
(get_gtkdoc_module_paths): We no longer need to worry about GTK+ 2, since it
was only applicable for WebKit1.
(get_generator_for_config): No longer look for the WebKit1 configuration file.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move the attributes HashMap out of the parseAttributes function
https://bugs.webkit.org/show_bug.cgi?id=131019

Reviewed by Andreas Kling.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::parseAttributes): Avoid copying the HashMap object that's being returned by
converting it to an xvalue through using std::move() in the return statement.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid unnecessary HashSet copies when calling collectInstancesForSVGElement
https://bugs.webkit.org/show_bug.cgi?id=131020

Reviewed by Andreas Kling.

Remove collectInstancesForSVGElement() to avoid HashSet copies when assigning a const
HashSet reference to a non-const HashSet reference. Instead, range-based for-loops are
deployed to iterate directly over the const reference to HashSet that's returned by
SVGElement::instancesForElement(). SVGElement::containingShadowRoot() return value
is checked to see if the iteration should be performed in the first place, preserving
the behavior of collectInstancesForSVGElement().

* svg/SVGElement.cpp:
(WebCore::SVGElement::addEventListener):
(WebCore::SVGElement::removeEventListener):
(WebCore::collectInstancesForSVGElement): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r166582.

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[UI-side compositing] Fix animations, and add logging
https://bugs.webkit.org/show_bug.cgi?id=131011

Reviewed by Tim Horton.

UI-side animations were broken because GraphicsLayerCARemote::addAnimation()
never called the superclass, so fix.

Add logging for animations to the layer tree commit output.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpProperty):
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::addAnimation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent unnecessary copies in compareEqual template
https://bugs.webkit.org/show_bug.cgi?id=131014

Reviewed by Antti Koivisto.

* rendering/style/RenderStyle.h:
(compareEqual): Casting the second parameter to a non-const, non-reference type
causes an extra copy of that object. Casting to the const reference type of the
first parameter avoids that.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fixing debug builds after r166586.

* svg/SVGElement.cpp:
(WebCore::SVGElement::addEventListener): Fix the ASSERT.
(WebCore::SVGElement::removeEventListener): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166590 268f45cc-cd09-0410-ab3c-d52691b4dbfc