1. 08 Apr, 2011 1 commit
  2. 06 Apr, 2011 1 commit
    • beidson@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973 · 452dbe28
      beidson@apple.com authored
      WK2 icon database should be able to get a CGImage of a specific size
      
      Reviewed by Anders Carlsson.
      
      ../WebCore: 
      
      * platform/graphics/BitmapImage.h:
      * platform/graphics/Image.h:
      (WebCore::Image::getFirstCGImageRefOfSize):
              
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
        first frame of the requested size.
      
      ../WebKit2: 
      
      * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
      (WKIconDatabaseTryGetCGImageForURL): Change this API to take a requested size, and find the first matching
        CGImage in the icon.
      * UIProcess/API/C/cg/WKIconDatabaseCG.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      452dbe28
  3. 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
  4. 08 Jan, 2011 1 commit
  5. 29 Dec, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-12-28 Pratik Solanki <psolanki@apple.com> · 761d5d01
      commit-queue@webkit.org authored
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=51522
              Use deviceRGBColorSpaceRef() instead of calling CGColorSpaceCreateDeviceRGB()
      
              * page/win/FrameCGWin.cpp:
              (WebCore::imageFromRect):
              * platform/graphics/cg/GradientCG.cpp:
              (WebCore::Gradient::platformGradient):
              * platform/graphics/cg/GraphicsContext3DCG.cpp:
              (WebCore::GraphicsContext3D::paintToCanvas):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/gstreamer/ImageGStreamerCG.mm:
              (ImageGStreamer::ImageGStreamer):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::CGContextWithHDC):
              (WebCore::GraphicsContext::releaseWindowsContext):
              (WebCore::GraphicsContext::drawWindowsBitmap):
              * platform/graphics/win/ImageCGWin.cpp:
              (WebCore::BitmapImage::create):
              (WebCore::BitmapImage::getHBITMAPOfSize):
              * platform/image-decoders/cg/ImageDecoderCG.cpp:
              (WebCore::createColorSpace):
              * platform/win/DragImageCGWin.cpp:
              (WebCore::allocImage):
              (WebCore::createCgContextFromBitmap):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::paintMenuListButtonGradients):
              (WebCore::RenderThemeMac::paintSliderTrack):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
              (WebCore::RenderThemeSafari::paintSliderTrack):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      761d5d01
  6. 20 Oct, 2010 1 commit
    • krit@webkit.org's avatar
      2010-10-20 Dirk Schulze <krit@webkit.org> · 2f1d5352
      krit@webkit.org authored
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * src/WebFontImpl.cpp:
              (WebKit::WebFontImpl::drawText):
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::paintWithContext):
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::doPixelReadbackToCanvas):
              * tests/TransparencyWinTest.cpp:
              (WebCore::TEST):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * FullscreenVideoController.cpp:
              (HUDButton::draw):
              (HUDSlider::draw):
              (FullscreenVideoController::draw):
              * WebCoreSupport/WebDragClient.cpp:
              (WebDragClient::createDragImageForLink):
              * WebKitGraphics.cpp:
              (WebDrawText):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * Misc/WebKitNSStringExtras.mm:
              (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Merging these two enums makes it easier to implement color-interpolation as well as
              color-interpolation-filter for SVG.
              Added ColorSpaceLinearRGB to the ColorSpace enum and changed ImageColorSpace to ColorSpace in all related
              files. Renamed enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
              Removed gray scale support in ImageBuffer since it is not used anymore on WebKit.
      
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator ColorSpace):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::paintCaret):
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::paint):
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
              (WebCore::CanvasRenderingContext2D::setShadow):
              (WebCore::CanvasRenderingContext2D::applyShadow):
              (WebCore::CanvasRenderingContext2D::drawImage):
              (WebCore::CanvasRenderingContext2D::drawImageFromRect):
              (WebCore::CanvasRenderingContext2D::drawTextInternal):
              * html/canvas/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyStrokeColor):
              (WebCore::CanvasStyle::applyFillColor):
              * inspector/InspectorController.cpp:
              (WebCore::drawOutlinedQuad):
              (WebCore::InspectorController::drawElementTitle):
              * mathml/RenderMathMLBlock.cpp:
              (WebCore::RenderMathMLBlock::paint):
              * mathml/RenderMathMLFraction.cpp:
              (WebCore::RenderMathMLFraction::paint):
              * mathml/RenderMathMLRoot.cpp:
              (WebCore::RenderMathMLRoot::paint):
              * mathml/RenderMathMLSquareRoot.cpp:
              (WebCore::RenderMathMLSquareRoot::paint):
              * page/FrameView.cpp:
              (WebCore::FrameView::paintContents):
              * page/PrintContext.cpp:
              (WebCore::PrintContext::spoolAllPagesWithBoundaries):
              * platform/ScrollView.cpp:
              (WebCore::ScrollView::wheelEvent):
              * platform/ScrollbarTheme.h:
              (WebCore::ScrollbarTheme::paintScrollCorner):
              * platform/ScrollbarThemeComposite.cpp:
              (WebCore::ScrollbarThemeComposite::paintScrollCorner):
              * platform/chromium/PopupMenuChromium.cpp:
              (WebCore::PopupContainer::paintBorder):
              (WebCore::PopupListBox::paint):
              (WebCore::PopupListBox::paintRow):
              * platform/chromium/ScrollbarThemeChromium.cpp:
              (WebCore::ScrollbarThemeChromium::paintTickmarks):
              * platform/chromium/ScrollbarThemeChromiumMac.mm:
              (WebCore::ScrollbarThemeChromiumMac::paint):
              * platform/graphics/ColorSpace.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setStrokePattern):
              (WebCore::GraphicsContext::setFillPattern):
              (WebCore::GraphicsContext::setStrokeGradient):
              (WebCore::GraphicsContext::setFillGradient):
              * platform/graphics/GraphicsContextPrivate.h:
              (WebCore::GraphicsContextState::GraphicsContextState):
              * platform/graphics/ImageBuffer.cpp:
              (WebCore::ImageBuffer::transformColorSpace):
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::create):
              * platform/graphics/cairo/ImageBufferCairo.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              * platform/graphics/cg/ColorCG.cpp:
              (WebCore::cachedCGColorSpace):
              (WebCore::cachedCGColor):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::linearRGBColorSpaceRef):
              * platform/graphics/cg/GraphicsContextCG.h:
              * platform/graphics/cg/ImageBufferCG.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              (WebCore::cgImage):
              (WebCore::ImageBuffer::draw):
              * platform/graphics/cg/ImageBufferData.h:
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::imageWithColorSpace):
              * platform/graphics/chromium/GLES2Canvas.cpp:
              (WebCore::GLES2Canvas::clearRect):
              (WebCore::GLES2Canvas::fillRect):
              * platform/graphics/chromium/TransparencyWin.cpp:
              (WebCore::TransparencyWin::setupLayerForWhiteLayer):
              * platform/graphics/filters/FEColorMatrix.cpp:
              (WebCore::FEColorMatrix::apply):
              * platform/graphics/filters/FEComposite.cpp:
              (WebCore::FEComposite::apply):
              * platform/graphics/filters/FEFlood.cpp:
              (WebCore::FEFlood::apply):
              * platform/graphics/filters/FEMerge.cpp:
              (WebCore::FEMerge::apply):
              * platform/graphics/filters/FEOffset.cpp:
              (WebCore::FEOffset::apply):
              * platform/graphics/filters/FETile.cpp:
              (WebCore::FETile::apply):
              * platform/graphics/filters/FilterEffect.cpp:
              (WebCore::FilterEffect::effectContext):
              * platform/graphics/filters/SourceAlpha.cpp:
              (WebCore::SourceAlpha::apply):
              * platform/graphics/filters/SourceGraphic.cpp:
              (WebCore::SourceGraphic::apply):
              * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
              (WebCore::MediaPlayerPrivateGStreamer::paint):
              * platform/graphics/gtk/FontGtk.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/mac/GraphicsLayerCA.mm:
              (WebCore::setLayerBorderColor):
              (WebCore::setLayerBackgroundColor):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              * platform/graphics/qt/ImageBufferQt.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              (WebCore::ImageBuffer::draw):
              * platform/graphics/skia/ImageBufferSkia.cpp:
              (WebCore::ImageBuffer::ImageBuffer):
              * platform/graphics/skia/PlatformContextSkia.cpp:
              (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
              * platform/graphics/win/FontCGWin.cpp:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              (WebCore::GraphicsContext::drawFocusRing):
              * platform/graphics/win/GraphicsLayerCACF.cpp:
              (WebCore::setLayerBorderColor):
              (WebCore::setLayerBackgroundColor):
              * platform/graphics/win/ImageCGWin.cpp:
              (WebCore::BitmapImage::getHBITMAPOfSize):
              * platform/graphics/win/ImageCairoWin.cpp:
              (WebCore::BitmapImage::getHBITMAPOfSize):
              (WebCore::BitmapImage::drawFrameMatchingSourceSize):
              * platform/graphics/win/WebLayer.cpp:
              (WebCore::WebLayer::drawInContext):
              * platform/graphics/wince/GraphicsContextWinCE.cpp:
              (WebCore::GraphicsContext::clearRect):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/wince/ImageWinCE.cpp:
              (WebCore::BitmapImage::getHBITMAPOfSize):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::GraphicsContext):
              * platform/gtk/RenderThemeGtk.cpp:
              (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
              (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
              (WebCore::paintMediaButton):
              (WebCore::RenderThemeGtk::paintMediaSliderTrack):
              (WebCore::RenderThemeGtk::paintMediaSliderThumb):
              * platform/mac/ScrollbarThemeMac.mm:
              (WebCore::ScrollbarThemeMac::paint):
              * platform/win/PopupMenuWin.cpp:
              (WebCore::PopupMenuWin::paint):
              * platform/win/WebCoreTextRenderer.cpp:
              (WebCore::doDrawTextAtPoint):
              * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
              (WebCore::drawTextWithSpacing):
              * plugins/PluginView.cpp:
              (WebCore::PluginView::paintMissingPluginIcon):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::beginTransparencyLayers):
              (WebCore::RenderLayer::paintResizer):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::paint):
              * rendering/RenderMediaControlsChromium.cpp:
              (WebCore::paintMediaButton):
              (WebCore::paintMediaSlider):
              (WebCore::paintMediaVolumeSlider):
              (WebCore::paintMediaTimelineContainer):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::paint):
              * rendering/RenderSVGResourceClipper.cpp:
              (WebCore::RenderSVGResourceClipper::applyClippingToContext):
              * rendering/RenderSVGResourceFilter.cpp:
              (WebCore::RenderSVGResourceFilter::applyResource):
              (WebCore::RenderSVGResourceFilter::postApplyResource):
              * rendering/RenderSVGResourceGradient.cpp:
              (WebCore::createMaskAndSwapContextForTextGradient):
              * rendering/RenderSVGResourceMasker.cpp:
              (WebCore::RenderSVGResourceMasker::applyResource):
              (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
              * rendering/RenderSVGResourcePattern.cpp:
              (WebCore::RenderSVGResourcePattern::createTileImage):
              * rendering/RenderSVGResourceSolidColor.cpp:
              (WebCore::RenderSVGResourceSolidColor::applyResource):
              * rendering/RenderScrollbarTheme.cpp:
              (WebCore::RenderScrollbarTheme::paintScrollCorner):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::paintProgressBar):
              (WebCore::RenderThemeMac::paintMenuListButton):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::paintMenuListButton):
              * rendering/RenderThemeWinCE.cpp:
              (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
              (WebCore::RenderThemeWinCE::paintSliderTrack):
              (WebCore::RenderThemeWinCE::paintSliderThumb):
              * rendering/SVGImageBufferTools.cpp:
              (WebCore::SVGImageBufferTools::createImageBuffer):
              * rendering/SVGImageBufferTools.h:
              * rendering/style/StyleRareInheritedData.cpp:
              (WebCore::StyleRareInheritedData::StyleRareInheritedData):
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::build):
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::nativeImageForCurrentFrame):
              * svg/graphics/filters/SVGFEImage.cpp:
              (WebCore::FEImage::apply):
      2010-10-20  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Merge ColorSpace and ImageColorSpace enums
              https://bugs.webkit.org/show_bug.cgi?id=47922
      
              Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
              to follow webkit style rules.
      
              * UIProcess/FindIndicator.cpp:
              (WebKit::FindIndicator::draw):
              * WebProcess/WebPage/FindPageOverlay.cpp:
              (WebKit::FindPageOverlay::drawRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f1d5352
  7. 19 Oct, 2010 1 commit
    • commit-queue@webkit.org's avatar
      2010-10-19 Yongjun Zhang <yongjun_zhang@apple.com> · 7f0d00f2
      commit-queue@webkit.org authored
              Reviewed by Dan Bernstein.
      
              Pixel cracks when using background image sprite on transformed element at certain scales.
              https://bugs.webkit.org/show_bug.cgi?id=47868
      
              * fast/images/pixel-crack-image-background-webkit-transform-scale.html: Added.
              * fast/images/resources/pixel-crack-image-background-webkit-transform-scale.png: Added.
              * platform/mac/fast/images/pixel-crack-image-background-webkit-transform-scale-expected.checksum: Added.
              * platform/mac/fast/images/pixel-crack-image-background-webkit-transform-scale-expected.png: Added.
              * platform/mac/fast/images/pixel-crack-image-background-webkit-transform-scale-expected.txt: Added.
      2010-10-19  Yongjun Zhang  <yongjun_zhang@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Pixel cracks when using background image sprite on transformed element at certain scales.
              https://bugs.webkit.org/show_bug.cgi?id=47868
      
              The pixel bleeding happens when the current context has scale and interpolation is kCGInterpolationHigh
              or kCGInterpolationDefault.  If the source rect size is smaller than the intrinsic image size,  some
              pixels outside of the clip rect will also be used to interpolate the color value for clip edges, which
              results in unwanted thin lines around the painted area.  We need to use sub-image patch to get rid of
              the artifacts in this case.
      
              Test: fast/images/pixel-crack-image-background-webkit-transform-scale.html
      
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f0d00f2
  8. 06 Oct, 2010 2 commits
    • darin@apple.com's avatar
      Try to fix Windows build. · 7d6117fb
      darin@apple.com authored
      * platform/graphics/cg/ColorCG.cpp:
      (WebCore::cachedCGColor): Put in braces to make the Windows compiler
      happy with this file.
      
      * platform/graphics/cg/ImageCG.cpp: Added include of RetainPtr.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d6117fb
    • darin@apple.com's avatar
      2010-10-06 Darin Adler <darin@apple.com> · 33f75299
      darin@apple.com authored
              Reviewed by Alexey Proskuryakov.
      
              Cache CGColor as we do NSColor
              https://bugs.webkit.org/show_bug.cgi?id=47226
      
              This fixes performance problems on certain web pages that use
              multiple colors. Once in the past we were using NSColor. Now that
              we are using CGColor, we need the same sort of caching that we have
              for NSColor.
      
              One example: <http://results.active.com/uploads/html/100759.html>.
      
              * WebCore.xcodeproj/project.pbxproj: Add GraphicsContextCG.h.
      
              * platform/graphics/Color.h: Replace createCGColor with cachedCGColor.
      
              * platform/graphics/cg/ColorCG.cpp:
              (WebCore::cachedCGColorSpace): Added.
              (WebCore::leakCGColor): Added. 
              (WebCore::cachedCGColor): Added.
      
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::setCGFillColor): Use cachedCGColor.
              (WebCore::setCGStrokeColor): Ditto.
              (WebCore::GraphicsContext::fillRect): Ditto.
              (WebCore::GraphicsContext::setPlatformShadow): Ditto.
      
              * platform/graphics/cg/GraphicsContextCG.h: Added.
              * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
              Moved the color space functions here.
      
              * platform/graphics/cg/ImageCG.cpp: Tweaked headers and formatting.
      
              * platform/graphics/mac/ColorMac.mm: Removed the createCGColor
              function.
      
              * platform/graphics/mac/GraphicsContextMac.mm:
              (WebCore::drawFocusRingToContext): Removed innappropriate use of
              RetainPtr for the arguments to this function.
              (WebCore::GraphicsContext::drawFocusRing): Use cachedCGColor.
      
              * platform/graphics/mac/GraphicsLayerCA.mm:
              (WebCore::setLayerBorderColor): Use cachedCGColor.
              (WebCore::setLayerBackgroundColor): Ditto.
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              (WebCore::GraphicsContext::drawFocusRing): Ditto.
              * platform/graphics/win/GraphicsLayerCACF.cpp:
              (WebCore::setLayerBorderColor): Ditto.
              (WebCore::setLayerBackgroundColor): Ditto.
      
              * platform/graphics/win/WKCACFLayerRenderer.cpp:
              (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): Use
              CGColorCreateGenericRGB for color used only for debugging.
              * platform/graphics/win/WebTiledLayer.cpp:
              (WebCore::WebTiledLayer::addTile): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33f75299
  9. 08 Feb, 2010 1 commit
    • krit@webkit.org's avatar
      2010-02-08 Dirk Schulze <krit@webkit.org> · 2b95a9a6
      krit@webkit.org authored
              Reviewed by Nikolas Zimmermann.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              This adds back AffineTransform. This saves additional 4% memory consumption
              on the 50k rects stress test: https://bugs.webkit.org/attachment.cgi?id=46721
              It also makes it possible to optimize the calculations internally of
              AffineTransform to the needs of 2D transformations (the second benefit for SVG,
              which uses transformations relative often at the moment.
              Everything that is 2D related (like images, patterns, gradients, fonts), uses
              AffineTransform now.
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSSVGMatrixCustom.cpp:
              (WebCore::JSSVGMatrix::multiply):
              (WebCore::JSSVGMatrix::inverse):
              (WebCore::JSSVGMatrix::rotateFromVector):
              * bindings/js/JSSVGPODTypeWrapper.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bindings/scripts/CodeGeneratorObjC.pm:
              * bindings/scripts/CodeGeneratorV8.pm:
              * bindings/v8/V8Index.h:
              * bindings/v8/custom/V8SVGMatrixCustom.cpp:
              (WebCore::V8SVGMatrix::multiplyCallback):
              (WebCore::V8SVGMatrix::inverseCallback):
              (WebCore::V8SVGMatrix::rotateFromVectorCallback):
              * html/HTMLCanvasElement.cpp: Changed to AffineTransform now
              (WebCore::HTMLCanvasElement::baseTransform):
              * html/HTMLCanvasElement.h:
              * platform/graphics/FloatPoint.cpp:
              (WebCore::FloatPoint::matrixTransform):
              * platform/graphics/FloatPoint.h:
              * platform/graphics/GeneratedImage.cpp:
              (WebCore::GeneratedImage::drawPattern):
              * platform/graphics/GeneratedImage.h:
              * platform/graphics/Gradient.cpp:
              (WebCore::Gradient::setGradientSpaceTransform):
              (WebCore::Gradient::setPlatformGradientSpaceTransform):
              * platform/graphics/Gradient.h:
              (WebCore::Gradient::gradientSpaceTransform):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/Image.cpp:
              (WebCore::Image::drawTiled):
              * platform/graphics/Image.h:
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::baseTransform):
              * platform/graphics/Path.h:
              * platform/graphics/Pattern.cpp:
              (WebCore::Pattern::setPatternSpaceTransform):
              * platform/graphics/Pattern.h:
              (WebCore::Pattern::create):
              (WebCore::Pattern::tileImage):
              * platform/graphics/cairo/FontCairo.cpp:
              (WebCore::Font::drawGlyphs):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::setPlatformFill):
              (WebCore::setPlatformStroke):
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/cairo/PathCairo.cpp:
              * platform/graphics/cairo/PatternCairo.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/cg/PathCG.cpp:
              * platform/graphics/cg/PatternCG.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/haiku/GraphicsContextHaiku.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/haiku/ImageHaiku.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/haiku/PathHaiku.cpp:
              * platform/graphics/qt/FontQt.cpp:
              (WebCore::Font::drawComplexText):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              (WebCore::GraphicsContext::getCTM):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::fillRect):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/qt/PathQt.cpp:
              * platform/graphics/qt/PatternQt.cpp:
              (WebCore::Pattern::createPlatformPattern):
              * platform/graphics/skia/GradientSkia.cpp:
              (WebCore::Gradient::setPlatformGradientSpaceTransform):
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/skia/PathSkia.cpp:
              * platform/graphics/skia/PatternSkia.cpp:
              (WebCore::Pattern::platformPattern):
              * platform/graphics/skia/SkiaFontWin.cpp:
              (WebCore::windowsCanHandleTextDrawing):
              * platform/graphics/transforms/AffineTransform.cpp:
              (WebCore::AffineTransform::makeIdentity): needed by some parts of WebCore
              (WebCore::AffineTransform::scale): Didn't scale the complete matrix
              (WebCore::AffineTransform::translate): Didn't respect other transformations
              (WebCore::AffineTransform::shear): direct calculation, no extra multiply of matrices
              (WebCore::AffineTransform::map):
              (WebCore::AffineTransform::mapPoint):
              (WebCore::AffineTransform::mapRect):
              * platform/graphics/transforms/AffineTransform.h:
              (WebCore::AffineTransform::isIdentityOrTranslation):
              * platform/graphics/transforms/TransformationMatrix.cpp:
              (WebCore::TransformationMatrix::toAffineTransform):
              * platform/graphics/transforms/TransformationMatrix.h:
              * platform/graphics/win/FontCGWin.cpp:
              (WebCore::drawGDIGlyphs):
              * platform/graphics/win/GraphicsContextCGWin.cpp:
              * platform/graphics/win/GraphicsContextCairoWin.cpp:
              * platform/graphics/win/GraphicsContextWin.cpp:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              * platform/graphics/wince/FontWince.cpp:
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContextPlatformPrivate::concatCTM):
              (WebCore::GraphicsContext::fillPath):
              (WebCore::GraphicsContext::strokePath):
              (WebCore::GraphicsContext::getCTM):
              (WebCore::GraphicsContext::drawBitmapPattern):
              * platform/graphics/wince/ImageBufferWince.cpp:
              (WebCore::):
              (WebCore::BufferedImage::drawPattern):
              * platform/graphics/wince/PathWince.cpp:
              (WebCore::Path::transform):
              * platform/graphics/wince/PlatformPathWince.cpp:
              (WebCore::drawPolygons):
              (WebCore::PathPolygon::transform):
              (WebCore::PlatformPathElement::transform):
              (WebCore::PlatformPath::strokePath):
              (WebCore::PlatformPath::fillPath):
              (WebCore::PlatformPath::transform):
              * platform/graphics/wince/PlatformPathWince.h:
              (WebCore::):
              * platform/graphics/wx/GraphicsContextWx.cpp:
              (WebCore::GraphicsContext::getCTM):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::drawPattern):
              (WebCore::Image::drawPattern):
              * platform/graphics/wx/PathWx.cpp:
              * platform/gtk/RenderThemeGtk.cpp:
              (WebCore::paintMozillaGtkWidget):
              * plugins/win/PluginViewWin.cpp:
              (WebCore::PluginView::paintWindowedPluginIntoContext):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::localTransform):
              * rendering/RenderBox.h:
              * rendering/RenderBoxModelObject.cpp:
              (WebCore::RenderBoxModelScaleData::RenderBoxModelScaleData):
              (WebCore::RenderBoxModelScaleData::transform):
              (WebCore::RenderBoxModelScaleData::setTransform):
              (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
              (WebCore::RenderBoxModelObject::paintBoxShadow):
              * rendering/RenderForeignObject.cpp:
              (WebCore::RenderForeignObject::translationForAttributes):
              (WebCore::RenderForeignObject::localToParentTransform):
              * rendering/RenderForeignObject.h:
              (WebCore::RenderForeignObject::localTransform):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::paintLayer):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::localTransform):
              (WebCore::RenderObject::localToParentTransform):
              (WebCore::RenderObject::absoluteTransform):
              * rendering/RenderObject.h:
              * rendering/RenderPath.cpp:
              (WebCore::RenderPath::localToParentTransform):
              (WebCore::RenderPath::localTransform):
              * rendering/RenderPath.h:
              * rendering/RenderSVGHiddenContainer.h:
              (WebCore::RenderSVGHiddenContainer::absoluteTransform):
              * rendering/RenderSVGImage.h:
              (WebCore::RenderSVGImage::localToParentTransform):
              (WebCore::RenderSVGImage::localTransform):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::localToBorderBoxTransform):
              (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
              (WebCore::RenderSVGRoot::localToParentTransform):
              (WebCore::RenderSVGRoot::absoluteTransform):
              (WebCore::RenderSVGRoot::localTransform):
              * rendering/RenderSVGRoot.h:
              * rendering/RenderSVGText.h:
              (WebCore::RenderSVGText::localToParentTransform):
              (WebCore::RenderSVGText::localTransform):
              * rendering/RenderSVGTransformableContainer.cpp:
              (WebCore::RenderSVGTransformableContainer::localToParentTransform):
              (WebCore::RenderSVGTransformableContainer::localTransform):
              (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
              * rendering/RenderSVGTransformableContainer.h:
              * rendering/RenderSVGViewportContainer.cpp:
              (WebCore::RenderSVGViewportContainer::markerBoundaries):
              (WebCore::RenderSVGViewportContainer::markerContentTransformation):
              (WebCore::RenderSVGViewportContainer::viewportTransform):
              (WebCore::RenderSVGViewportContainer::localToParentTransform):
              (WebCore::RenderSVGViewportContainer::absoluteTransform):
              * rendering/RenderSVGViewportContainer.h:
              * rendering/SVGCharacterLayoutInfo.cpp:
              (WebCore::SVGChar::characterTransform):
              * rendering/SVGCharacterLayoutInfo.h:
              (WebCore::SVGTextChunkWalker::operator()):
              * rendering/SVGInlineTextBox.cpp:
              (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
              (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
              (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
              (WebCore::SVGInlineTextBox::paintCharacters):
              (WebCore::SVGInlineTextBox::paintDecoration):
              * rendering/SVGMarkerLayoutInfo.h:
              (WebCore::MarkerLayout::MarkerLayout):
              * rendering/SVGRenderSupport.cpp:
              (WebCore::applyTransformToPaintInfo):
              * rendering/SVGRenderSupport.h:
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::operator<<):
              * rendering/SVGRenderTreeAsText.h:
              * rendering/SVGRootInlineBox.cpp:
              (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
              (WebCore::applyTextLengthCorrectionToTextChunk):
              (WebCore::SVGRootInlineBox::buildLayoutInformation):
              * rendering/TransformState.cpp:
              (WebCore::TransformState::applyTransform):
              * rendering/TransformState.h:
              * svg/GradientAttributes.h:
              (WebCore::GradientAttributes::gradientTransform):
              (WebCore::GradientAttributes::setGradientTransform):
              * svg/PatternAttributes.h:
              (WebCore::PatternAttributes::patternTransform):
              (WebCore::PatternAttributes::setPatternTransform):
              * svg/SVGAnimateMotionElement.cpp:
              (WebCore::SVGAnimateMotionElement::resetToBaseValue):
              (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
              (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
              * svg/SVGAnimateMotionElement.h:
              * svg/SVGAnimateTransformElement.cpp:
              * svg/SVGAnimateTransformElement.h:
              * svg/SVGElement.h:
              (WebCore::SVGElement::supplementalTransform):
              * svg/SVGFitToViewBox.cpp:
              (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
              * svg/SVGFitToViewBox.h:
              * svg/SVGLocatable.cpp:
              (WebCore::SVGLocatable::getCTM):
              (WebCore::SVGLocatable::getScreenCTM):
              (WebCore::SVGLocatable::getTransformToElement):
              * svg/SVGLocatable.h:
              * svg/SVGMarkerElement.cpp:
              (WebCore::SVGMarkerElement::viewBoxToViewTransform):
              * svg/SVGMarkerElement.h:
              * svg/SVGMaskElement.cpp:
              (WebCore::SVGMaskElement::drawMaskerContent):
              * svg/SVGMatrix.idl:
              * svg/SVGPatternElement.cpp:
              (WebCore::SVGPatternElement::buildPattern):
              * svg/SVGPreserveAspectRatio.cpp:
              (WebCore::SVGPreserveAspectRatio::getCTM):
              * svg/SVGPreserveAspectRatio.h:
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::viewport):
              (WebCore::SVGSVGElement::createSVGMatrix):
              (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
              (WebCore::SVGSVGElement::getCTM):
              (WebCore::SVGSVGElement::getScreenCTM):
              (WebCore::SVGSVGElement::viewBoxToViewTransform):
              * svg/SVGSVGElement.h:
              * svg/SVGStyledLocatableElement.cpp:
              (WebCore::SVGStyledLocatableElement::getCTM):
              (WebCore::SVGStyledLocatableElement::getScreenCTM):
              * svg/SVGStyledLocatableElement.h:
              * svg/SVGStyledTransformableElement.cpp:
              (WebCore::SVGStyledTransformableElement::getCTM):
              (WebCore::SVGStyledTransformableElement::getScreenCTM):
              (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
              (WebCore::SVGStyledTransformableElement::supplementalTransform):
              * svg/SVGStyledTransformableElement.h:
              (WebCore::SVGStyledTransformableElement::isStyledTransformable):
              (WebCore::SVGStyledTransformableElement::toPathData):
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
              * svg/SVGTextElement.cpp:
              (WebCore::SVGTextElement::getScreenCTM):
              (WebCore::SVGTextElement::getCTM):
              (WebCore::SVGTextElement::animatedLocalTransform):
              (WebCore::SVGTextElement::supplementalTransform):
              * svg/SVGTextElement.h:
              * svg/SVGTextPathElement.cpp:
              * svg/SVGTransform.cpp:
              (SVGTransform::SVGTransform):
              (SVGTransform::matrix):
              (SVGTransform::setMatrix):
              * svg/SVGTransform.h:
              * svg/SVGTransformDistance.cpp:
              (WebCore::SVGTransformDistance::SVGTransformDistance):
              (WebCore::SVGTransformDistance::scaledDistance):
              (WebCore::SVGTransformDistance::isZero):
              * svg/SVGTransformDistance.h:
              * svg/SVGTransformList.cpp:
              (SVGTransformList::createSVGTransformFromMatrix):
              (SVGTransformList::concatenate):
              (SVGTransformList::valueAsString):
              * svg/SVGTransformList.h:
              * svg/SVGTransformable.cpp:
              (WebCore::SVGTransformable::getCTM):
              (WebCore::SVGTransformable::getScreenCTM):
              (WebCore::SVGTransformable::parseTransformValue):
              * svg/SVGTransformable.h:
              (WebCore::SVGTransformable::):
              * svg/graphics/SVGPaintServerGradient.cpp:
              (WebCore::SVGPaintServerGradient::gradientTransform):
              (WebCore::SVGPaintServerGradient::setGradientTransform):
              (WebCore::clipToTextMask):
              (WebCore::SVGPaintServerGradient::setup):
              * svg/graphics/SVGPaintServerGradient.h:
              * svg/graphics/SVGPaintServerPattern.cpp:
              (WebCore::SVGPaintServerPattern::patternTransform):
              (WebCore::SVGPaintServerPattern::setPatternTransform):
              (WebCore::SVGPaintServerPattern::setup):
              * svg/graphics/SVGPaintServerPattern.h:
              * svg/graphics/SVGResourceClipper.cpp:
              (WebCore::SVGResourceClipper::applyClip):
              * svg/graphics/SVGResourceMarker.cpp:
              (WebCore::SVGResourceMarker::markerTransformation):
              (WebCore::SVGResourceMarker::draw):
              * svg/graphics/SVGResourceMarker.h:
              * svg/graphics/filters/SVGFEImage.cpp:
              * svg/graphics/filters/SVGFETile.cpp:
              (WebCore::FETile::apply):
      
      2010-02-08  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              Some negative zero problems fixed, but new one were added on other places. A seperate
              patch should fix it all at once.
              use-on-disallowed-foreign-object-3 and 4 had wrong results. The old SVG code
              with TransformationMatrix used translateRight, that was wrong at this place and is
              fixed now.
      
              * platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
              * platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
              * platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
              * platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt:
              * svg/dom/SVGMatrix-interface-expected.txt:
              * svg/dom/SVGMatrix-interface.xhtml:
      
      2010-02-08  Dirk Schulze  <krit@webkit.org>
      
              Reviewed by Nikolas Zimmermann.
      
              Add back an AffineTransform class for use by SVG
              https://bugs.webkit.org/show_bug.cgi?id=33750
      
              Use AffineTransform instead of TransformationMatrix here.
      
              * tests/TransparencyWinTest.cpp:
              (WebCore::TEST):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b95a9a6
  10. 16 Dec, 2009 2 commits
    • eric@webkit.org's avatar
      2009-12-16 Eric Seidel <eric@webkit.org> · dabc7d25
      eric@webkit.org authored
              No review, rolling out r52206.
              http://trac.webkit.org/changeset/52206
              https://bugs.webkit.org/show_bug.cgi?id=31187
      
              This broke pixel tests on Mac.  Presumably the code in
              ImageCG is wrong here.
      
              * platform/graphics/BitmapImage.h:
              * platform/graphics/GeneratedImage.cpp:
              (WebCore::GeneratedImage::drawPattern):
              * platform/graphics/GeneratedImage.h:
              * platform/graphics/Image.cpp:
              (WebCore::Image::drawTiled):
              * platform/graphics/Image.h:
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/haiku/ImageHaiku.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContext::drawBitmapPattern):
              * platform/graphics/wince/ImageBufferWince.cpp:
              (WebCore::):
              (WebCore::BufferedImage::drawPattern):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::drawPattern):
              (WebCore::Image::drawPattern):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dabc7d25
    • eric@webkit.org's avatar
      2009-12-16 Benjamin Otte <otte@gnome.org> · b229e23c
      eric@webkit.org authored
              Reviewed by Darin Adler.
      
              Get rid of the phase argument to Image::drawPattern.
              https://bugs.webkit.org/show_bug.cgi?id=31187
      
              The argument can be expressed equally well as part of the
              patternTransform. All backends but the Qt one did exactly that
              manually anyway.
      
              * platform/graphics/BitmapImage.h:
              * platform/graphics/GeneratedImage.cpp:
              (WebCore::GeneratedImage::drawPattern):
              * platform/graphics/GeneratedImage.h:
              * platform/graphics/Image.cpp:
              (WebCore::Image::drawTiled):
              * platform/graphics/Image.h:
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/haiku/ImageHaiku.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::Image::drawPattern):
              * platform/graphics/wince/GraphicsContextWince.cpp:
              (WebCore::GraphicsContext::drawBitmapPattern):
              * platform/graphics/wince/ImageBufferWince.cpp:
              (WebCore::):
              (WebCore::BufferedImage::drawPattern):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::drawPattern):
              (WebCore::Image::drawPattern):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b229e23c
  11. 23 Nov, 2009 1 commit
  12. 19 Nov, 2009 1 commit
    • bdakin@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=31321 Make -webkit- · 62711a60
      bdakin@apple.com authored
      color-correction work with untagged images
      
      Reviewed by Darin Adler.
      
      Image's draw(), drawPattern(), and fillWithSolidColor() functions 
      now take a ColorSpace. A bunch of classes inherit from Image, so 
      draw() and drawPattern() functions there must also take a 
      ColorSpace.
      * platform/graphics/Image.cpp:
      (WebCore::Image::fillWithSolidColor):
      (WebCore::Image::drawTiled):
      * platform/graphics/Image.h:
      * platform/graphics/BitmapImage.h:
      * platform/graphics/GeneratedImage.cpp:
      (WebCore::GeneratedImage::draw):
      (WebCore::GeneratedImage::drawPattern):
      * platform/graphics/GeneratedImage.h:
      * platform/graphics/cg/PDFDocumentImage.cpp:
      (WebCore::PDFDocumentImage::draw):
      * platform/graphics/cg/PDFDocumentImage.h:
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::draw):
      * svg/graphics/SVGImage.h:
      
      All of the drawImage() functions and drawTiled() functions of 
      GraphicsContext now take a ColorSpace.
      * platform/graphics/GraphicsContext.cpp:
      (WebCore::GraphicsContext::drawImage):
      (WebCore::GraphicsContext::drawTiledImage):
      * platform/graphics/GraphicsContext.h:
      
      This is where the actual work is done.
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::imageWithColorSpace): New static function that returns a 
      copy of the given image in the given ColorSpace *IF* we should use 
      the given ColorSpace. We will ignore the color space if the image 
      is tagged and return 0. 
      (WebCore::BitmapImage::draw): Now takes a ColorSpace and uses it to 
      call imageWithColorSpace(). 
      (WebCore::Image::drawPattern): Same.
      
      Attempt to keep all ports building. 
      * platform/graphics/cairo/ImageCairo.cpp:
      (WebCore::BitmapImage::draw):
      (WebCore::Image::drawPattern):
      * platform/graphics/haiku/ImageHaiku.cpp:
      (WebCore::BitmapImage::draw):
      (WebCore::Image::drawPattern):
      * platform/graphics/qt/ImageQt.cpp:
      (WebCore::Image::drawPattern):
      (WebCore::BitmapImage::draw):
      * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
      * platform/graphics/skia/ImageSkia.cpp:
      (WebCore::Image::drawPattern):
      (WebCore::BitmapImage::draw):
      (WebCore::BitmapImageSingleFrameSkia::draw):
      * platform/graphics/wx/ImageWx.cpp:
      (WebCore::BitmapImage::draw):
      (WebCore::BitmapImage::drawPattern):
      
      Callers of GraphicsContext's drawImage() and drawTiled() functions 
      now need to send a ColorSpace.
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::paint):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::drawImage):
      (WebCore::CanvasRenderingContext2D::drawImageFromRect):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::wheelEvent):
      * platform/graphics/filters/FEColorMatrix.cpp:
      (WebCore::FEColorMatrix::apply):
      * platform/graphics/filters/FEComposite.cpp:
      (WebCore::FEComposite::apply):
      * platform/graphics/filters/SourceGraphic.cpp:
      (WebCore::SourceGraphic::apply):
      * platform/mac/ScrollbarThemeMac.mm:
      (WebCore::ScrollbarThemeMac::paint):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintFillLayerExtended):
      (WebCore::RenderBoxModelObject::paintNinePieceImage):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintReplaced):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::paintResizer):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::paint):
      * rendering/RenderSVGImage.cpp:
      (WebCore::RenderSVGImage::paint):
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::paint):
      * svg/graphics/SVGPaintServerPattern.cpp:
      (WebCore::SVGPaintServerPattern::setup):
      * svg/graphics/SVGResourceFilter.cpp:
      (WebCore::SVGResourceFilter::applyFilter):
      * svg/graphics/filters/SVGFEMerge.cpp:
      (WebCore::FEMerge::apply):
      * svg/graphics/filters/SVGFEOffset.cpp:
      (WebCore::FEOffset::apply):
      * svg/graphics/filters/SVGFETile.cpp:
      (WebCore::FETile::apply):
      
      LayoutTests: Tests for https://bugs.webkit.org/show_bug.cgi?id=31321 Make 
      -webkit-color-correction work with untagged images
      
      Reviewed by Darin Adler.
      
      * fast/css/color-correction-on-background-image.html: Added.
      * fast/css/color-correction-untagged-images.html: Added.
      * fast/css/resources/purple-noprofile.png: Added.
      * platform/mac/fast/css/color-correction-on-background-image-expected.checksum: Added.
      * platform/mac/fast/css/color-correction-on-background-image-expected.png: Added.
      * platform/mac/fast/css/color-correction-on-background-image-expected.txt: Added.
      * platform/mac/fast/css/color-correction-untagged-images-expected.checksum: Added.
      * platform/mac/fast/css/color-correction-untagged-images-expected.png: Added.
      * platform/mac/fast/css/color-correction-untagged-images-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62711a60
  13. 20 Aug, 2009 1 commit
    • mitz@apple.com's avatar
      Replace many manually-released CFTypeRefs with RetainPtrs · 46464f35
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28498
      
      Reviewed by Geoffrey Garen.
      
      * platform/graphics/cg/ColorCG.cpp:
      (WebCore::createCGColor):
      * platform/graphics/cg/GradientCG.cpp:
      (WebCore::Gradient::platformGradient):
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::platformContext):
      (WebCore::GraphicsContext::applyStrokePattern):
      (WebCore::GraphicsContext::applyFillPattern):
      (WebCore::GraphicsContext::setPlatformShadow):
      (WebCore::GraphicsContext::setURLForRect):
      * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
      (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
      (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::ImageBuffer::ImageBuffer):
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::BitmapImage::checkForSolidColor):
      (WebCore::Image::drawPattern):
      * platform/graphics/cg/ImageSourceCG.cpp:
      (WebCore::ImageSource::setData):
      (WebCore::ImageSource::isSizeAvailable):
      (WebCore::ImageSource::frameSizeAtIndex):
      (WebCore::ImageSource::repetitionCount):
      (WebCore::ImageSource::createFrameAtIndex):
      (WebCore::ImageSource::frameDurationAtIndex):
      * platform/graphics/cg/PDFDocumentImage.cpp:
      (WebCore::PDFDocumentImage::dataChanged):
      * platform/graphics/cg/PathCG.cpp:
      (WebCore::createScratchContext):
      (WebCore::Path::contains):
      * platform/graphics/mac/FontCustomPlatformData.cpp:
      (WebCore::createFontCustomPlatformData):
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawFocusRing):
      * platform/graphics/mac/ImageMac.mm:
      (WebCore::BitmapImage::getTIFFRepresentation):
      * platform/mac/ClipboardMac.mm:
      (WebCore::cocoaTypeFromMIMEType):
      (WebCore::MIMETypeFromCocoaType):
      * platform/mac/WebCoreNSStringExtras.mm:
      (stringEncodingForResource):
      * platform/network/mac/FormDataStreamMac.mm:
      (WebCore::advanceCurrentStream):
      (WebCore::setHTTPBody):
      * platform/text/mac/TextCodecMac.cpp:
      (WebCore::TextCodecMac::encode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46464f35
  14. 16 Jul, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · 52608f26
      mitz@apple.com authored
              Reviewed by Simon Fraser.
      
              REGRESSION (r41238) Repainted portion of a scaled image does not line up with full image
              https://bugs.webkit.org/show_bug.cgi?id=26747
              rdar://problem/7009243
      
              Test: fast/repaint/background-misaligned.html
      
              * platform/graphics/Image.cpp:
              (WebCore::Image::drawTiled): Moved a variable definition closer to where
              it is used.
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw): In the subimage code path, compute a
              pixel-aligned source rect, because the subiamge is always pixel-aligned
              in source space, and adjust the destination rect to preserve the
              source -> destination mapping. Clip to the (original) destination rect
              to prevent bleeding out.
      
      LayoutTests:
      
              Reviewed by Simon Fraser.
      
              REGRESSION (r41238) Repainted portion of a scaled image does not line up with full image
              https://bugs.webkit.org/show_bug.cgi?id=26747
              rdar://problem/7009243
      
              * fast/repaint/background-misaligned.html: Added.
              * platform/mac/fast/backgrounds/size/backgroundSize15-expected.checksum:
              * platform/mac/fast/backgrounds/size/backgroundSize15-expected.png:
              * platform/mac/fast/borders/border-image-rotate-transform-expected.checksum:
              * platform/mac/fast/borders/border-image-rotate-transform-expected.png:
              * platform/mac/fast/repaint/background-misaligned-expected.checksum: Added.
              * platform/mac/fast/repaint/background-misaligned-expected.png: Added.
              * platform/mac/fast/repaint/background-misaligned-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52608f26
  15. 12 Jul, 2009 1 commit
    • mitz@apple.com's avatar
      Reviewed by Sam Weinig. · 74384b24
      mitz@apple.com authored
              - Image cleanup
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::destroyDecodedData): Use the data() accessor
              instead of the m_data member.
              (WebCore::BitmapImage::dataChanged): Ditto.
              * platform/graphics/Image.h: Re-ordered #includes and class
              declarations. Removed the drawPatternCallback() declaration. Made member
              variables private.
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::drawPatternCallback): Changed this from a member function to a
              static function.
              * platform/graphics/cg/PDFDocumentImage.cpp:
              (WebCore::PDFDocumentImage::dataChanged): Use the data() accessor
              instead of the m_data member.
              * svg/graphics/SVGImage.cpp:
              (WebCore::SVGImage::dataChanged): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74384b24
  16. 30 Apr, 2009 1 commit
  17. 28 Apr, 2009 1 commit
    • ddkilzer@apple.com's avatar
      2009-04-28 David Carson <dacarson@apple.com> · 6bdbd41d
      ddkilzer@apple.com authored
              Reviewed by David Hyatt.
      
              Restore alignment to device pixel boundaries.
              https://bugs.webkit.org/show_bug.cgi?id=25458
      
              Adjust the adjusted destination rect to be device pixel aligned.
      
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
      
      2009-04-28  David Carson  <dacarson@apple.com>
      
              Reviewed by David Kilzer.
      
              Restore alignment to device pixel boundaries.
              https://bugs.webkit.org/show_bug.cgi?id=25458
      
              Updated test results with progressions.
      
              * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum:
              * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png:
              Yin-yang image shifted slightly to pixel boundaries.
      
              * platform/mac/svg/custom/focus-ring-expected.checksum:
              * platform/mac/svg/custom/focus-ring-expected.png:
              Focus rings drawn around rotated "focus text" and checkered
              images shifted slightly to pixel boundaries.
      
              * platform/mac/svg/custom/image-small-width-height-expected.checksum:
              * platform/mac/svg/custom/image-small-width-height-expected.png:
              Checkered images shifted slightly to pixel boundaries.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6bdbd41d
  18. 02 Mar, 2009 1 commit
    • treat@webkit.org's avatar
      2009-03-02 Adam Treat <adam.treat@torchmobile.com> · f793b273
      treat@webkit.org authored
              Reviewed by Adam Roben and previously by Eric Seidel and Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=24227
              Ensure that the checkForSolidColor() optimization is correctly triggered
              for all cases of drawPattern.  Currently, the optimization was not triggered
              when the check had not been previously performed via a request for the
              image's NativeImagePtr.
      
              Implement the Qt version of the checkForSolidColor() method.  Combined with
              the bug fix this reduces the time it takes to draw a repeating background
              of a 1x1 image from ~50msecs to ~0msecs on my machine.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * platform/graphics/BitmapImage.h:
              (WebCore::BitmapImage::mayFillWithSolidColor):
              * platform/graphics/Image.h:
              (WebCore::Image::mayFillWithSolidColor):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f793b273
  19. 27 Feb, 2009 2 commits
    • andersca@apple.com's avatar
      2009-02-27 Anders Carlsson <andersca@apple.com> · bc80e577
      andersca@apple.com authored
              Reviewed by David Hyatt.
      
              Revert r41295, the fix for https://bugs.webkit.org/show_bug.cgi?id=24227 
              because it leads to assertion failures in the Mac port.
              
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * platform/graphics/BitmapImage.h:
              (WebCore::BitmapImage::mayFillWithSolidColor):
              * platform/graphics/Image.h:
              (WebCore::Image::mayFillWithSolidColor):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc80e577
    • treat@webkit.org's avatar
      2009-02-27 Adam Treat <adam.treat@torchmobile.com> · 6280732a
      treat@webkit.org authored
              Reviewed by Eric Seidel and Simon Fraser.
      
              https://bugs.webkit.org/show_bug.cgi?id=24227
              Ensure that the checkForSolidColor() optimization is correctly triggered
              for all cases of drawPattern.  Currently, the optimization was not triggered
              when the check had not been previously performed via a request for the
              image's NativeImagePtr.
      
              Implement the Qt version of the checkForSolidColor() method.  Combined with
              the bug fix this reduces the time it takes to draw a repeating background
              of a 1x1 image from ~50msecs to ~0msecs on my machine.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * platform/graphics/BitmapImage.h:
              (WebCore::BitmapImage::mayFillWithSolidColor):
              * platform/graphics/Image.h:
              (WebCore::Image::mayFillWithSolidColor):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/skia/ImageSkia.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::checkForSolidColor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6280732a
  20. 09 Jan, 2009 1 commit
    • pkasting@chromium.org's avatar
      2009-01-09 Peter Kasting <pkasting@google.com> · a2910e11
      pkasting@chromium.org authored
              Reviewed by David Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=22995
              Fix flaky image animation by resetting the metadata for a frame when
              we get new data for that frame.  This fixes animations that halted
              when the next frame of the animation wasn't complete by the time the
              current frame's duration expired.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::destroyDecodedData):
              (WebCore::BitmapImage::dataChanged):
              * platform/graphics/BitmapImage.h:
              (WebCore::FrameData::~FrameData):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::FrameData::clear):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::FrameData::clear):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::FrameData::clear):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::FrameData::clear):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a2910e11
  21. 05 Jan, 2009 1 commit
    • dino@apple.com's avatar
      2009-01-05 Dean Jackson <dino@apple.com> · 0cf2dc9d
      dino@apple.com authored
              Reviewed by Darin Adler.
      
              Rename AffineTransform to TransformationMatrix in
              preparation for future enhancements (non-affine matrices)
      
              https://bugs.webkit.org/show_bug.cgi?id=22943
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.scons:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * platform/graphics/transforms/AffineTransform.cpp: Removed.
              * platform/graphics/transforms/AffineTransform.h: Removed.
              * platform/graphics/transforms/TransformationMatrix.cpp: Copied from WebCore/platform/graphics/transforms/AffineTransform.cpp.
              * platform/graphics/transforms/TransformationMatrix.h: Copied from WebCore/platform/graphics/transforms/AffineTransform.h.
              * lots of other files with s/AffineTransform/TransformationMatrix/g
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0cf2dc9d
  22. 11 Nov, 2008 1 commit
  23. 23 Oct, 2008 2 commits
  24. 20 Oct, 2008 1 commit
  25. 15 Oct, 2008 1 commit
    • pkasting@chromium.org's avatar
      2008-10-15 Peter Kasting <pkasting@google.com> · e8a5a6b7
      pkasting@chromium.org authored
              Reviewed by David Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=19663 (Second attempt)
              Account for paint and timer lag when animating images.  Also pretend
              that images whose animations were paused (by becoming invisible)
              continued to animate, by "catching up" to the correct frame when they're
              shown again.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::destroyDecodedData):
              (WebCore::BitmapImage::cacheFrame):
              (WebCore::BitmapImage::frameIsCompleteAtIndex):
              (WebCore::BitmapImage::frameDurationAtIndex):
              (WebCore::BitmapImage::frameHasAlphaAtIndex):
              (WebCore::BitmapImage::repetitionCount):
              (WebCore::BitmapImage::shouldAnimate):
              (WebCore::BitmapImage::startAnimation):
              (WebCore::BitmapImage::resetAnimation):
              (WebCore::BitmapImage::advanceAnimation):
              (WebCore::BitmapImage::internalAdvanceAnimation):
              (WebCore::BitmapImage::notifyObserverAndTrimDecodedData):
              * platform/graphics/BitmapImage.h:
              (WebCore::FrameData::FrameData):
              (WebCore::BitmapImage::):
              * platform/graphics/GeneratedImage.h:
              (WebCore::GeneratedImage::destroyDecodedData):
              * platform/graphics/Image.h:
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::FrameData::clear):
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::draw):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::FrameData::clear):
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::draw):
              * platform/graphics/cg/PDFDocumentImage.h:
              (WebCore::PDFDocumentImage::destroyDecodedData):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::FrameData::clear):
              (WebCore::BitmapImage::draw):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::FrameData::clear):
              (WebCore::BitmapImage::draw):
              * svg/graphics/SVGImage.h:
              (WebCore::SVGImage::destroyDecodedData):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8a5a6b7
  26. 22 Sep, 2008 1 commit
    • eric@webkit.org's avatar
      No review, rollback only. · b57170b4
      eric@webkit.org authored
              Roll out Peter's change (per his request)
              http://trac.webkit.org/changeset/36069
              https://bugs.webkit.org/show_bug.cgi?id=19663
              This change has been the source of numerous regressions
              (several of which were latent bugs revealed by this change,
              others were bugs in this change)
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::startAnimation):
              (WebCore::BitmapImage::advanceAnimation):
              * platform/graphics/BitmapImage.h:
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::draw):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b57170b4
  27. 19 Sep, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-09-19 David Hyatt <hyatt@apple.com> · 02bbc2ca
      hyatt@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=20954
      
              Roll out r36628 since it has caused horrible regressions with
              animated GIF CPU usage.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::cacheFrame):
              (WebCore::BitmapImage::startAnimation):
              * platform/graphics/BitmapImage.h:
              (WebCore::FrameData::FrameData):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::FrameData::clear):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::FrameData::clear):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::FrameData::clear):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::FrameData::clear):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02bbc2ca
  28. 18 Sep, 2008 1 commit
  29. 15 Sep, 2008 1 commit
  30. 03 Sep, 2008 1 commit
    • mrowe@apple.com's avatar
      2008-09-03 Peter Kasting <zerodpx@gmail.com> · dcd72b7c
      mrowe@apple.com authored
              Reviewed by Dave Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=19663
              Account for paint and timer lag when animating images.  Also pretend
              that images whose animations were paused (by becoming invisible)
              continued to animate, by "catching up" to the correct frame when they're
              shown again.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::BitmapImage):
              (WebCore::BitmapImage::startAnimation):
              (WebCore::BitmapImage::advanceAnimation):
              (WebCore::BitmapImage::internalAdvanceAnimation):
              (WebCore::BitmapImage::notifyObserverAndTrimDecodedData):
              * platform/graphics/BitmapImage.h:
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/qt/ImageQt.cpp:
              (WebCore::BitmapImage::draw):
              * platform/graphics/wx/ImageWx.cpp:
              (WebCore::BitmapImage::draw):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dcd72b7c
  31. 14 Aug, 2008 1 commit
    • mitz@apple.com's avatar
      2008-08-14 Dan Bernstein <mitz@apple.com> · 551d6254
      mitz@apple.com authored
              Reviewed by Brady Eidson.
      
              - fix <rdar://problem/5993323> REGRESSION (r34210): Apple.com favicon appears stretched/clipped
      
              * platform/graphics/BitmapImage.cpp: 
              (WebCore::BitmapImage::BitmapImage): Added initialization of
              m_hasUniformFrameSize.
              (WebCore::BitmapImage::cacheFrame): Added code to get the size of the
              cached frame for use in decoded size computation and for setting
              m_hasUniformFrameSize.
              (WebCore::BitmapImage::currentFrameSize): Added.
              (WebCore::BitmapImage::dataChanged): Added code to reset
              m_hasUniformFrameSize.
              * platform/graphics/BitmapImage.h: Added currentFrameSize() and
              m_hasUniformFrameSize.
              * platform/graphics/ImageSource.h: Added frameSizeAtIndex().
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw): Changed to use currentFrameSize(). This
              fixes the bug, which resulted from assuming that the frame being drawn 
              was the same size as the first frame.
              * platform/graphics/cg/ImageSourceCG.cpp:
              (WebCore::ImageSource::frameSizeAtIndex): Renamed size() to this and
              changed to get the size of the frame at the given index.
              (WebCore::ImageSource::size): Added. Returns frameSizeAtIndex(0).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      551d6254
  32. 02 Aug, 2008 1 commit
  33. 31 Jul, 2008 1 commit
  34. 17 Jun, 2008 1 commit
    • alp@webkit.org's avatar
      2008-06-17 Alp Toker <alp@nuanti.com> · 64e8d6b7
      alp@webkit.org authored
              Reviewed by Dave Hyatt and Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=19190
              [CAIRO] Canvas rendered as black
      
              Make sure the frame alpha transparency flag is set to true unless
              we're certain the image data is solid and can be blitted, since the
              Cairo backend implements a fast-path for blittable BitmapImages.
      
              Thanks to Dirk Schulze for helping to track down this problem.
      
              * platform/graphics/BitmapImage.cpp:
              (WebCore::BitmapImage::frameHasAlphaAtIndex):
              * platform/graphics/cairo/ImageCairo.cpp:
              (WebCore::BitmapImage::BitmapImage):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::BitmapImage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64e8d6b7
  35. 29 May, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-05-29 David Hyatt <hyatt@apple.com> · 7d2be025
      hyatt@apple.com authored
              Improve the performance of the GUIMark benchmark by 2x in the CoreGraphics code path.
      
              Whenever a foreground image changes size rapidly, we will now dynamically shift into rendering it
              using low quality scaling.  Once the animation completes, the image will repaint at high quality.
              Scaled images will still render at high quality by default, only shifting into low quality if
              the scale factor is rapidly changing.  This change raises GUIMark from 21fps to 34fps on my machine.
      
              Rewrite the Image draw method to avoid the use of throwaway CG subimages.  Instead the entire image is
              always drawn (with the appropriate clip and scale set up to make sure the correct subimage portion shows up
              in the destination rect).  This change raises GUIMark from 34fps to 43fps on my machine.
      
              Reviewed by Darin
      
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawImage):
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImageScaleData::RenderImageScaleData):
              (WebCore::RenderImageScaleData::~RenderImageScaleData):
              (WebCore::RenderImageScaleData::size):
              (WebCore::RenderImageScaleData::time):
              (WebCore::RenderImageScaleData::useLowQualityScale):
              (WebCore::RenderImageScaleData::hiqhQualityRepaintTimer):
              (WebCore::RenderImageScaleData::setSize):
              (WebCore::RenderImageScaleData::setTime):
              (WebCore::RenderImageScaleData::setUseLowQualityScale):
              (WebCore::RenderImageScaleObserver::shouldImagePaintAtLowQuality):
              (WebCore::RenderImageScaleObserver::imageDestroyed):
              (WebCore::RenderImageScaleObserver::highQualityRepaintTimerFired):
              (WebCore::RenderImage::highQualityRepaintTimerFired):
              (WebCore::RenderImage::~RenderImage):
              (WebCore::RenderImage::paintReplaced):
              * rendering/RenderImage.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d2be025
  36. 16 Apr, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-04-16 David Hyatt <hyatt@apple.com> · e95c6176
      hyatt@apple.com authored
              Eliminate the paintBuffer and drawImage(ImageBuffer*) methods from GraphicsContext* in favor of just
              snagging an Image* from the ImageBuffer and drawing that instead.
      
              Enhance canvas with a CanvasObserver so that notifications of dirtying or resizing can be tracked by
              a consumer.
      
              Reviewed by olliej
      
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::drawImage):
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::HTMLCanvasElement):
              (WebCore::HTMLCanvasElement::willDraw):
              (WebCore::HTMLCanvasElement::reset):
              (WebCore::HTMLCanvasElement::paint):
              * html/HTMLCanvasElement.h:
              (WebCore::CanvasObserver::~CanvasObserver):
              (WebCore::HTMLCanvasElement::setSize):
              (WebCore::HTMLCanvasElement::setObserver):
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawImage):
              (WebCore::GraphicsContext::drawTiledImage):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::clearImage):
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              * platform/graphics/cg/GraphicsContextCG.cpp:
              * platform/graphics/cg/ImageCG.cpp:
              (WebCore::BitmapImage::draw):
              (WebCore::Image::drawPattern):
              * platform/graphics/cg/ImageSourceCG.cpp:
              (WebCore::ImageSource::createFrameAtIndex):
              * platform/graphics/qt/GraphicsContextQt.cpp:
              * platform/graphics/wx/GraphicsContextWx.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e95c6176