Skip to content
Permalink
Browse files
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.

        * 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):


Canonical link: https://commits.webkit.org/60698@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dirkschulze committed Oct 20, 2010
1 parent 4a9593e commit 8ff8395dbacd1cd3b23038c11b182b4d91b38bb4
Showing 100 changed files with 577 additions and 280 deletions.
@@ -1,3 +1,220 @@
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 Andreas Kling.
@@ -2189,25 +2189,30 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColorSpace space)
, m_hasCachedCSSText(false)
{
switch (space) {
case DeviceColorSpace:
m_value.ident = CSSValueDefault;
break;
case sRGBColorSpace:
m_value.ident = CSSValueSrgb;
break;
case ColorSpaceDeviceRGB:
m_value.ident = CSSValueDefault;
break;
case ColorSpaceSRGB:
m_value.ident = CSSValueSrgb;
break;
case ColorSpaceLinearRGB:
// CSS color correction does not support linearRGB yet.
ASSERT_NOT_REACHED();
m_value.ident = CSSValueDefault;
break;
}
}

template<> inline CSSPrimitiveValue::operator ColorSpace() const
{
switch (m_value.ident) {
case CSSValueDefault:
return DeviceColorSpace;
case CSSValueSrgb:
return sRGBColorSpace;
default:
ASSERT_NOT_REACHED();
return DeviceColorSpace;
case CSSValueDefault:
return ColorSpaceDeviceRGB;
case CSSValueSrgb:
return ColorSpaceSRGB;
default:
ASSERT_NOT_REACHED();
return ColorSpaceDeviceRGB;
}
}

@@ -5582,7 +5582,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
if (isInherit)
m_style->setColorSpace(m_parentStyle->colorSpace());
else if (isInitial)
m_style->setColorSpace(DeviceColorSpace);
m_style->setColorSpace(ColorSpaceDeviceRGB);
else {
if (!primitiveValue)
return;
@@ -1085,7 +1085,7 @@ void SelectionController::paintCaret(GraphicsContext* context, int tx, int ty, c
return;

Color caretColor = Color::black;
ColorSpace colorSpace = DeviceColorSpace;
ColorSpace colorSpace = ColorSpaceDeviceRGB;
Element* element = rootEditableElement();
if (element && element->renderer()) {
caretColor = element->renderer()->style()->visitedDependentColor(CSSPropertyColor);
@@ -260,9 +260,9 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const IntRect& r)
ImageBuffer* imageBuffer = buffer();
if (imageBuffer) {
if (imageBuffer->drawsUsingCopy())
context->drawImage(copiedImage(), DeviceColorSpace, r);
context->drawImage(copiedImage(), ColorSpaceDeviceRGB, r);
else
context->drawImageBuffer(imageBuffer, DeviceColorSpace, r);
context->drawImageBuffer(imageBuffer, ColorSpaceDeviceRGB, r);
}
}
}
@@ -231,7 +231,7 @@ void CanvasRenderingContext2D::setAllAttributesToDefault()
if (!context)
return;

context->setShadow(FloatSize(), 0, Color::transparent, DeviceColorSpace);
context->setShadow(FloatSize(), 0, Color::transparent, ColorSpaceDeviceRGB);
context->setAlpha(1);
context->setCompositeOperation(CompositeSourceOver);
}
@@ -1012,7 +1012,7 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur,
if (!c)
return;

c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, DeviceColorSpace);
c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
}

void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String& color, float alpha)
@@ -1030,7 +1030,7 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur,
if (!c)
return;

c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, DeviceColorSpace);
c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
}

void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel, float alpha)
@@ -1043,7 +1043,7 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur,
if (!c)
return;

c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, DeviceColorSpace);
c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
}

void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float r, float g, float b, float a)
@@ -1056,7 +1056,7 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur,
if (!c)
return;

c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, DeviceColorSpace);
c->setShadow(IntSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
}

void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
@@ -1076,7 +1076,7 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur,
CGContextSetShadowWithColor(dc->platformContext(), adjustedShadowSize(width, -height), blur, shadowColor);
CGColorRelease(shadowColor);
#else
dc->setShadow(IntSize(width, -height), blur, state().m_shadowColor, DeviceColorSpace);
dc->setShadow(IntSize(width, -height), blur, state().m_shadowColor, ColorSpaceDeviceRGB);
#endif
}

@@ -1096,7 +1096,7 @@ void CanvasRenderingContext2D::applyShadow()

float width = state().m_shadowOffset.width();
float height = state().m_shadowOffset.height();
c->setShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, DeviceColorSpace);
c->setShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
}

static IntSize size(HTMLImageElement* image)
@@ -1198,7 +1198,7 @@ void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRec

FloatRect sourceRect = c->roundToDevicePixels(normalizedSrcRect);
FloatRect destRect = c->roundToDevicePixels(normalizedDstRect);
c->drawImage(cachedImage->image(), DeviceColorSpace, destRect, sourceRect, state().m_globalComposite);
c->drawImage(cachedImage->image(), ColorSpaceDeviceRGB, destRect, sourceRect, state().m_globalComposite);
didDraw(destRect);
}

@@ -1280,7 +1280,7 @@ void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const
sourceCanvas->makeRenderingResultsAvailable();
#endif

c->drawImageBuffer(buffer, DeviceColorSpace, destRect, sourceRect, state().m_globalComposite);
c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, destRect, sourceRect, state().m_globalComposite);
didDraw(destRect);
}

@@ -1383,7 +1383,7 @@ void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image,
op = CompositeSourceOver;

FloatRect destRect = FloatRect(dx, dy, dw, dh);
c->drawImage(cachedImage->image(), DeviceColorSpace, destRect, FloatRect(sx, sy, sw, sh), op);
c->drawImage(cachedImage->image(), ColorSpaceDeviceRGB, destRect, FloatRect(sx, sy, sw, sh), op);
didDraw(destRect);
}

@@ -1830,9 +1830,9 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
GraphicsContext* maskImageContext = maskImage->context();

if (fill)
maskImageContext->setFillColor(Color::black, DeviceColorSpace);
maskImageContext->setFillColor(Color::black, ColorSpaceDeviceRGB);
else {
maskImageContext->setStrokeColor(Color::black, DeviceColorSpace);
maskImageContext->setStrokeColor(Color::black, ColorSpaceDeviceRGB);
maskImageContext->setStrokeThickness(c->strokeThickness());
}

0 comments on commit 8ff8395

Please sign in to comment.