Prepare for ExtendedColor changes (first step)
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Feb 2018 21:47:52 +0000 (21:47 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Feb 2018 21:47:52 +0000 (21:47 +0000)
commit0bfca117622a4970127e24caf68a38de28b44f66
tree141b055cc32307f916cf96458de1498003c46d12
parentccba8b321c448f2f6df09c11f1ba1bed0e56f6d7
Prepare for ExtendedColor changes (first step)
https://bugs.webkit.org/show_bug.cgi?id=182904

Reviewed by Sam Weinig.

Source/WebCore:

* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createColorValue): Use HashMap::ensure.
(WebCore::CSSValuePool::createFontFamilyValue): Ditto.
(WebCore::CSSValuePool::createFontFaceValue): Ditto.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::maybeParseValue): Tightened up
the logic a bit.

* html/canvas/CanvasRenderingContext2D.cpp: Removed many unneeded includes.

* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::recordAction): Updated for Ref instead of
RefPtr and to use move semantics.
(WebCore::buildArrayForAffineTransform): Return Ref instead of RefPtr.
(WebCore::buildArrayForVector): Ditto.
(WebCore::InspectorCanvas::buildInitialState): Ditto. Also use auto more.
(WebCore::InspectorCanvas::buildAction): Ditto.
(WebCore::InspectorCanvas::buildArrayForCanvasGradient): Ditto.
(WebCore::InspectorCanvas::buildArrayForCanvasPattern): Ditto.
(WebCore::InspectorCanvas::buildArrayForImageData): Ditto.
* inspector/InspectorCanvas.h: Updated for the above. Also us "using" instead
of typedef and removed unneeded ErrorString typedef and some includes.

* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag): Use auto and Ref.

* platform/DragData.h: Used pragma once and reorganized includes a bit.

* platform/graphics/ImageFrame.h:
(WebCore::ImageFrame::frameBytes const): Use uint32_t instead of RGBA32 to
prepare for removal of the RGBA32 type coming in a future patch.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::cacheNativeImageAtIndex): Ditto.
(WebCore::ImageSource::canUseAsyncDecoding): Ditto.

* platform/graphics/cocoa/GraphicsContextCocoa.mm: Tweaked #if for Mac-only
code to use PLATFORM(MAC) to be easier to read.
(WebCore::GraphicsContext::focusRingColor): Use sRGBColorSpaceRef instead of
calling CGColorSpaceCreateWithName each time.

* platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added include needed
now that it was removed from some header.

* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Use uint32_t
instead of RGBA32 to prepare for removal of the RGBA32 type coming in a future patch.
* platform/image-decoders/ScalableImageDecoder.cpp:
(WebCore::ScalableImageDecoder::frameBytesAtIndex const): Ditto.
* platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
(WebCore::ImageBackingStore::image const): Ditto.
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow): Ditto.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::setPixel): Ditto.
(WebCore::JPEGImageDecoder::outputScanlines): Ditto.
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable): Ditto.
(WebCore::PNGImageDecoder::frameComplete): Ditto.
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decodeFrame): Ditto.
(WebCore::WEBPImageDecoder::applyPostProcessing): Ditto.

* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::color): Added comments.

* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paintSelection): Use Color::isVisible.

Source/WebKitLegacy/mac:

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromNSColor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSValuePool.cpp
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/inspector/InspectorCanvas.cpp
Source/WebCore/inspector/InspectorCanvas.h
Source/WebCore/page/DragController.cpp
Source/WebCore/platform/DragData.h
Source/WebCore/platform/graphics/ImageFrame.h
Source/WebCore/platform/graphics/ImageSource.cpp
Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp
Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h
Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
Source/WebCore/platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.cpp
Source/WebCore/platform/mac/PlatformPasteboardMac.mm
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm