diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
| commit | d0424a769059c84ae20beb3c217812792ea6726b (patch) | |
| tree | 6f94a5c3db8c52c6694ee56498542a6c35417350 /Source/WebKit2/UIProcess/WebPageProxy.cpp | |
| parent | 88a04ac016f57c2d78e714682445dff2e7db4ade (diff) | |
| download | qtwebkit-d0424a769059c84ae20beb3c217812792ea6726b.tar.gz | |
Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608)
New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make
Diffstat (limited to 'Source/WebKit2/UIProcess/WebPageProxy.cpp')
| -rw-r--r-- | Source/WebKit2/UIProcess/WebPageProxy.cpp | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp index 4ac6d2243..8fd72a0c6 100644 --- a/Source/WebKit2/UIProcess/WebPageProxy.cpp +++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp @@ -52,6 +52,7 @@ #include "WebBackForwardList.h" #include "WebBackForwardListItem.h" #include "WebCertificateInfo.h" +#include "WebColorPickerResultListenerProxy.h" #include "WebContext.h" #include "WebContextMenuProxy.h" #include "WebContextUserMessageCoders.h" @@ -413,6 +414,11 @@ void WebPageProxy::close() m_colorChooser->invalidate(); m_colorChooser = nullptr; } + + if (m_colorPickerResultListener) { + m_colorPickerResultListener->invalidate(); + m_colorPickerResultListener = nullptr; + } #endif #if ENABLE(GEOLOCATION) @@ -2724,7 +2730,20 @@ void WebPageProxy::showColorChooser(const WebCore::Color& initialColor, const In { ASSERT(!m_colorChooser); + if (m_colorPickerResultListener) { + m_colorPickerResultListener->invalidate(); + m_colorPickerResultListener = nullptr; + } + + m_colorPickerResultListener = WebColorPickerResultListenerProxy::create(this); + m_colorChooser = WebColorChooserProxy::create(this); + + if (m_uiClient.showColorPicker(this, initialColor.serialized(), m_colorPickerResultListener.get())) + return; + m_colorChooser = m_pageClient->createColorChooserProxy(this, initialColor, elementRect); + if (!m_colorChooser) + didEndColorChooser(); } void WebPageProxy::setColorChooserColor(const WebCore::Color& color) @@ -2754,12 +2773,17 @@ void WebPageProxy::didEndColorChooser() if (!isValid()) return; - ASSERT(m_colorChooser); - - m_colorChooser->invalidate(); - m_colorChooser = nullptr; + if (m_colorChooser) { + m_colorChooser->invalidate(); + m_colorChooser = nullptr; + } m_process->send(Messages::WebPage::DidEndColorChooser(), m_pageID); + + m_colorPickerResultListener->invalidate(); + m_colorPickerResultListener = nullptr; + + m_uiClient.hideColorPicker(this); } #endif @@ -3536,6 +3560,11 @@ void WebPageProxy::processDidCrash() m_colorChooser->invalidate(); m_colorChooser = nullptr; } + + if (m_colorPickerResultListener) { + m_colorPickerResultListener->invalidate(); + m_colorPickerResultListener = nullptr; + } #endif #if ENABLE(GEOLOCATION) |
