diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
commit | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch) | |
tree | b34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/WebKit/win/WebView.cpp | |
parent | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff) | |
download | qtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz |
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/WebKit/win/WebView.cpp')
-rw-r--r-- | Source/WebKit/win/WebView.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/WebKit/win/WebView.cpp b/Source/WebKit/win/WebView.cpp index 57acc1318..5927c9664 100644 --- a/Source/WebKit/win/WebView.cpp +++ b/Source/WebKit/win/WebView.cpp @@ -2072,6 +2072,23 @@ void WebView::setIsBeingDestroyed() ::SetWindowLongPtrW(m_viewWindow, 0, 0); } +void WebView::setShouldInvertColors(bool shouldInvertColors) +{ + if (m_shouldInvertColors == shouldInvertColors) + return; + + m_shouldInvertColors = shouldInvertColors; + +#if USE(ACCELERATED_COMPOSITING) + if (m_layerTreeHost) + m_layerTreeHost->setShouldInvertColors(shouldInvertColors); +#endif + + RECT windowRect = {0}; + frameRect(&windowRect); + repaint(windowRect, true, true); +} + bool WebView::registerWebViewWindowClass() { static bool haveRegisteredWindowClass = false; @@ -4922,6 +4939,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) return hr; settings->setMediaPlaybackAllowsInline(enabled); + hr = prefsPrivate->shouldInvertColors(&enabled); + if (FAILED(hr)) + return hr; + setShouldInvertColors(enabled); + return S_OK; } @@ -6463,6 +6485,8 @@ void WebView::setAcceleratedCompositing(bool accelerated) if (m_layerTreeHost) { m_isAcceleratedCompositing = true; + m_layerTreeHost->setShouldInvertColors(m_shouldInvertColors); + m_layerTreeHost->setClient(this); ASSERT(m_viewWindow); m_layerTreeHost->setWindow(m_viewWindow); |