[Windows] Optionally invert colors when drawing to a WebView's backing store.
https://bugs.webkit.org/show_bug.cgi?id=77168
Reviewed by Sam Weinig.
Source/WebCore:
* css/CSSPrimitiveValueMappings.h: Assert that CompositeDifference is
not converted to a CSS value. Exposing a new compositing operation to
CSS is outside the scope of this patch.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* platform/graphics/GraphicsTypes.h: Add CompositeDifference as a
CompositeOperator. Also, remove an outdated comment.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation): Map
CompositeDifference to kCGBlendModeDifference.
Source/WebKit/win:
* WebView.cpp:
(WebView::WebView): Initialize m_shouldInvertColors to false.
(WebView::paintIntoBackingStore): If m_shouldInvertColors is true, draw
an opaque white quad using the CompositeDifference blend mode. This
blend operation instructs CoreGraphics to take the difference between
the source pixel (white) and the background pixel, resulting in an
inverted pixel.
* WebView.h: Define m_shouldInvertColors.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106274
268f45cc-cd09-0410-ab3c-
d52691b4dbfc