Changeset 164271 in webkit
- Timestamp:
- Feb 17, 2014 9:13:18 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 1 added
- 18 edited
- 3 copied
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/CMakeLists.txt
r164240 r164271 312 312 UIProcess/WebBatteryProvider.cpp 313 313 UIProcess/WebColorPicker.cpp 314 UIProcess/WebColorPickerResultListenerProxy.cpp315 314 UIProcess/WebConnectionToWebProcess.cpp 316 315 UIProcess/WebContext.cpp … … 364 363 UIProcess/API/C/WKBatteryManager.cpp 365 364 UIProcess/API/C/WKBatteryStatus.cpp 366 UIProcess/API/C/WKColorPickerResultListener.cpp367 365 UIProcess/API/C/WKContext.cpp 368 366 UIProcess/API/C/WKCookieManager.cpp -
trunk/Source/WebKit2/ChangeLog
r164267 r164271 1 2014-02-17 Ryuan Choi <ryuan.choi@samsung.com> 2 3 [EFL][WK2] Move and make WKColorPickerResultListener to EFL specific interface 4 https://bugs.webkit.org/show_bug.cgi?id=119120 5 6 Reviewed by Gyuyoung Kim. 7 8 WKColorPickerResultListener and related files are only used in EFL since added. 9 Indeed, it does not work since refactored common logic for ColorPicker in WebPageProxy. 10 11 This patch moved them to EFL specfic and refactor to work well. 12 13 * CMakeLists.txt: Moved WebColorPickerResultListenerProxy.cpp to PlatformEfl.cmake. 14 * GNUmakefile.list.am: Removed ColorPickerResultListener related files which are only for Efl from source list. 15 * PlatformEfl.cmake: Added ColorPickerResultListenerProxy related files and newly added files into source list. 16 * UIProcess/API/APIUIClient.h: 17 * UIProcess/API/C/WKPage.cpp: 18 (WKPageSetPageUIClient): 19 * UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Renamed from Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp. 20 (WKColorPickerResultListenerGetTypeID): 21 (WKColorPickerResultListenerSetColor): 22 * UIProcess/API/C/efl/WKColorPickerResultListener.h: Renamed from Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h. 23 * UIProcess/API/C/efl/WKViewEfl.cpp: Introduced WKColorPickerClient and setter. 24 (WKViewSetColorPickerClient): 25 * UIProcess/API/C/efl/WKViewEfl.h: 26 * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Enabled test case for color picker. 27 (TEST_F): 28 * UIProcess/WebPageProxy.cpp: Removed unnecessary WebColorPickerResultListenerProxy dependency. 29 * UIProcess/WebPageProxy.h: Ditto. 30 * UIProcess/efl/PageUIClientEfl.cpp: Removed color picker callbacks of PageUIClient. 31 (WebKit::PageUIClientEfl::PageUIClientEfl): 32 * UIProcess/efl/PageUIClientEfl.h: 33 * UIProcess/efl/ViewClientEfl.cpp: Registered callbacks of WKColorPickerClient. 34 (WebKit::ViewClientEfl::showColorPicker): 35 (WebKit::ViewClientEfl::endColorPicker): 36 (WebKit::ViewClientEfl::ViewClientEfl): 37 (WebKit::ViewClientEfl::~ViewClientEfl): 38 * UIProcess/efl/ViewClientEfl.h: 39 * UIProcess/efl/WebColorPickerClient.cpp: Copied from Source/WebKit2/UIProcess/efl/ViewClientEfl.h. 40 (WebKit::WebColorPickerClient::showColorPicker): 41 (WebKit::WebColorPickerClient::endPicker): 42 * UIProcess/efl/WebColorPickerClient.h: Added. 43 * UIProcess/efl/WebColorPickerEfl.cpp: Copied from Source/WebKit2/UIProcess/efl/ViewClientEfl.h. 44 (WebKit::WebColorPickerEfl::WebColorPickerEfl): 45 (WebKit::WebColorPickerEfl::endPicker): 46 (WebKit::WebColorPickerEfl::showColorPicker): 47 (WebKit::WebColorPickerEfl::setSelectedColor): 48 (WebKit::WebColorPickerEfl::didChooseColor): 49 * UIProcess/efl/WebColorPickerEfl.h: Copied from Source/WebKit2/UIProcess/efl/ViewClientEfl.h. 50 (WebKit::WebColorPickerEfl::create): 51 (WebKit::WebColorPickerEfl::~WebColorPickerEfl): 52 * UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Renamed from Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp. 53 (WebKit::WebColorPickerResultListenerProxy::WebColorPickerResultListenerProxy): 54 (WebKit::WebColorPickerResultListenerProxy::~WebColorPickerResultListenerProxy): 55 (WebKit::WebColorPickerResultListenerProxy::invalidate): 56 (WebKit::WebColorPickerResultListenerProxy::setColor): 57 * UIProcess/efl/WebColorPickerResultListenerProxy.h: Renamed from Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h. 58 (WebKit::WebColorPickerResultListenerProxy::create): 59 * UIProcess/efl/WebViewEfl.cpp: 60 (WebKit::WebViewEfl::initializeColorPickerClient): 61 (WebKit::WebViewEfl::createColorPicker): 62 * UIProcess/efl/WebViewEfl.h: 63 (WebKit::WebViewEfl::colorPickerClient): 64 * WebKit2.xcodeproj/project.pbxproj: Removed ColorPickerResultListener related files which are only for Efl from source list. 65 1 66 2014-02-17 Sam Weinig <sam@webkit.org> 2 67 -
trunk/Source/WebKit2/GNUmakefile.list.am
r163749 r164271 539 539 Source/WebKit2/UIProcess/API/C/WKBatteryStatus.cpp \ 540 540 Source/WebKit2/UIProcess/API/C/WKBatteryStatus.h \ 541 Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp \542 Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h \543 541 Source/WebKit2/UIProcess/API/C/WKContext.cpp \ 544 542 Source/WebKit2/UIProcess/API/C/WKContext.h \ … … 897 895 Source/WebKit2/UIProcess/WebColorPicker.cpp \ 898 896 Source/WebKit2/UIProcess/WebColorPicker.h \ 899 Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp \900 Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h \901 897 Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp \ 902 898 Source/WebKit2/UIProcess/WebConnectionToWebProcess.h \ -
trunk/Source/WebKit2/PlatformEfl.cmake
r162536 r164271 58 58 UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp 59 59 60 UIProcess/API/C/efl/WKColorPickerResultListener.cpp 60 61 UIProcess/API/C/efl/WKEventEfl.cpp 61 62 UIProcess/API/C/efl/WKPageEfl.cpp … … 145 146 UIProcess/efl/VibrationClientEfl.cpp 146 147 UIProcess/efl/ViewClientEfl.cpp 148 UIProcess/efl/WebColorPickerClient.cpp 149 UIProcess/efl/WebColorPickerEfl.cpp 150 UIProcess/efl/WebColorPickerResultListenerProxy.cpp 147 151 UIProcess/efl/WebContextEfl.cpp 148 152 UIProcess/efl/WebContextMenuProxyEfl.cpp -
trunk/Source/WebKit2/UIProcess/API/APIUIClient.h
r163480 r164271 122 122 123 123 virtual bool shouldInterruptJavaScript(WebKit::WebPageProxy*) { return false; } 124 125 #if ENABLE(INPUT_TYPE_COLOR)126 virtual bool showColorPicker(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebColorPickerResultListenerProxy*) { return false; }127 virtual bool hideColorPicker(WebKit::WebPageProxy*) { return false; }128 #endif129 124 }; 130 125 -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r164172 r164271 1461 1461 return m_client.shouldInterruptJavaScript(toAPI(page), m_client.base.clientInfo); 1462 1462 } 1463 1464 #if ENABLE(INPUT_TYPE_COLOR)1465 virtual bool showColorPicker(WebPageProxy* page, const String& initialColor, WebColorPickerResultListenerProxy* listener) override1466 {1467 if (!m_client.showColorPicker)1468 return false;1469 1470 m_client.showColorPicker(toAPI(page), toAPI(initialColor.impl()), toAPI(listener), m_client.base.clientInfo);1471 return true;1472 }1473 1474 virtual bool hideColorPicker(WebPageProxy* page) override1475 {1476 if (!m_client.hideColorPicker)1477 return false;1478 1479 m_client.hideColorPicker(toAPI(page), m_client.base.clientInfo);1480 return true;1481 }1482 #endif1483 1463 }; 1484 1464 -
trunk/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.cpp
r159401 r164271 34 34 35 35 using namespace WebKit; 36 37 void WKViewSetColorPickerClient(WKViewRef viewRef, const WKColorPickerClientBase* wkClient) 38 { 39 #if ENABLE(INPUT_TYPE_COLOR) 40 static_cast<WebViewEfl*>(toImpl(viewRef))->initializeColorPickerClient(wkClient); 41 #else 42 UNUSED_PARAM(viewRef); 43 UNUSED_PARAM(wkClient); 44 #endif 45 } 36 46 37 47 void WKViewPaintToCairoSurface(WKViewRef viewRef, cairo_surface_t* surface) -
trunk/Source/WebKit2/UIProcess/API/C/efl/WKViewEfl.h
r159401 r164271 38 38 #endif 39 39 40 typedef void (*WKShowColorPickerCallback)(WKViewRef view, WKStringRef initialColor, WKColorPickerResultListenerRef listener, const void* clientInfo); 41 typedef void (*WKHideColorPickerCallback)(WKViewRef view, const void* clientInfo); 42 43 typedef struct WKColorPickerClientBase { 44 int version; 45 const void * clientInfo; 46 } WKColorPickerClientBase; 47 48 typedef struct WKColorPickerClientV0 { 49 WKColorPickerClientBase base; 50 WKShowColorPickerCallback showColorPicker; 51 WKHideColorPickerCallback endColorPicker; 52 } WKColorPickerClientV0; 53 54 WK_EXPORT void WKViewSetColorPickerClient(WKViewRef page, const WKColorPickerClientBase* client); 55 40 56 WK_EXPORT void WKViewPaintToCairoSurface(WKViewRef, cairo_surface_t*); 41 57 -
trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_color_picker.cpp
r161948 r164271 125 125 }; 126 126 127 TEST_F(EWK2ColorPickerTest, DISABLED_ewk_color_picker_color_set)127 TEST_F(EWK2ColorPickerTest, ewk_color_picker_color_set) 128 128 { 129 129 Ewk_View_Smart_Class* api = ewkViewClass(); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r164254 r164271 59 59 #include "WebBackForwardListItem.h" 60 60 #include "WebCertificateInfo.h" 61 #include "WebColorPickerResultListenerProxy.h"62 61 #include "WebContext.h" 63 62 #include "WebContextMenuProxy.h" -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r164254 r164271 145 145 class WebBackForwardList; 146 146 class WebBackForwardListItem; 147 class WebColorPickerResultListenerProxy;148 147 class WebContextMenuProxy; 149 148 class WebEditCommandProxy; … … 1346 1345 #if ENABLE(INPUT_TYPE_COLOR) 1347 1346 RefPtr<WebColorPicker> m_colorPicker; 1348 RefPtr<WebColorPickerResultListenerProxy> m_colorPickerResultListener;1349 1347 #endif 1350 1348 -
trunk/Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp
r160107 r164271 36 36 #include "ewk_window_features_private.h" 37 37 #include <Ecore_Evas.h> 38 #include <WebCore/Color.h>39 38 40 39 using namespace EwkViewCallbacks; … … 80 79 uiClient.runOpenPanel = runOpenPanel; 81 80 uiClient.createNewPage = createNewPage; 82 #if ENABLE(INPUT_TYPE_COLOR)83 uiClient.showColorPicker = showColorPicker;84 uiClient.hideColorPicker = hideColorPicker;85 #endif86 81 87 82 WKPageSetPageUIClient(pageRef, &uiClient.base); … … 227 222 } 228 223 229 #if ENABLE(INPUT_TYPE_COLOR)230 void PageUIClientEfl::showColorPicker(WKPageRef, WKStringRef initialColor, WKColorPickerResultListenerRef listener, const void* clientInfo)231 {232 PageUIClientEfl* pageUIClient = toPageUIClientEfl(clientInfo);233 WebCore::Color color = WebCore::Color(WebKit::toWTFString(initialColor));234 pageUIClient->m_view->requestColorPicker(listener, color);235 }236 237 void PageUIClientEfl::hideColorPicker(WKPageRef, const void* clientInfo)238 {239 PageUIClientEfl* pageUIClient = toPageUIClientEfl(clientInfo);240 pageUIClient->m_view->dismissColorPicker();241 }242 #endif243 244 224 void PageUIClientEfl::showPopupMenu(WKPageRef, WKPopupMenuListenerRef menuListenerRef, WKRect rect, WKPopupItemTextDirection textDirection, double pageScaleFactor, WKArrayRef itemsRef, int32_t selectedIndex, const void* clientInfo) 245 225 { -
trunk/Source/WebKit2/UIProcess/efl/PageUIClientEfl.h
r159190 r164271 64 64 static void runOpenPanel(WKPageRef, WKFrameRef, WKOpenPanelParametersRef, WKOpenPanelResultListenerRef, const void*); 65 65 static WKPageRef createNewPage(WKPageRef, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*); 66 #if ENABLE(INPUT_TYPE_COLOR)67 static void showColorPicker(WKPageRef, WKStringRef initialColor, WKColorPickerResultListenerRef, const void*);68 static void hideColorPicker(WKPageRef, const void*);69 #endif70 66 71 67 static void showPopupMenu(WKPageRef, WKPopupMenuListenerRef, WKRect, WKPopupItemTextDirection, double pageScaleFactor, WKArrayRef itemsRef, int32_t selectedIndex, const void* clientInfo); -
trunk/Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp
r163079 r164271 159 159 #endif 160 160 161 #if ENABLE(INPUT_TYPE_COLOR) 162 void ViewClientEfl::showColorPicker(WKViewRef, WKStringRef colorString, WKColorPickerResultListenerRef listener, const void* clientInfo) 163 { 164 WebCore::Color color = WebCore::Color(WebKit::toWTFString(colorString)); 165 toEwkView(clientInfo)->requestColorPicker(listener, color); 166 } 167 168 void ViewClientEfl::endColorPicker(WKViewRef, const void* clientInfo) 169 { 170 toEwkView(clientInfo)->dismissColorPicker(); 171 } 172 #endif 173 161 174 ViewClientEfl::ViewClientEfl(EwkView* view) 162 175 : m_view(view) … … 183 196 184 197 WKViewSetViewClient(m_view->wkView(), &viewClient.base); 198 199 #if ENABLE(INPUT_TYPE_COLOR) 200 WKColorPickerClientV0 colorPickerClient; 201 memset(&colorPickerClient, 0, sizeof(WKColorPickerClientV0)); 202 colorPickerClient.base.version = 0; 203 colorPickerClient.base.clientInfo = this; 204 colorPickerClient.showColorPicker = showColorPicker; 205 colorPickerClient.endColorPicker = endColorPicker; 206 WKViewSetColorPickerClient(m_view->wkView(), &colorPickerClient.base); 207 #endif 185 208 } 186 209 … … 188 211 { 189 212 WKViewSetViewClient(m_view->wkView(), 0); 213 214 #if ENABLE(INPUT_TYPE_COLOR) 215 WKViewSetColorPickerClient(m_view->wkView(), 0); 216 #endif 190 217 } 191 218 -
trunk/Source/WebKit2/UIProcess/efl/ViewClientEfl.h
r159190 r164271 54 54 static void doneWithTouchEvent(WKViewRef, WKTouchEventRef, bool, const void* clientInfo); 55 55 #endif 56 #if ENABLE(INPUT_TYPE_COLOR) 57 static void showColorPicker(WKViewRef, WKStringRef, WKColorPickerResultListenerRef, const void* clientInfo); 58 static void endColorPicker(WKViewRef, const void* clientInfo); 59 #endif 56 60 57 61 EwkView* m_view; -
trunk/Source/WebKit2/UIProcess/efl/WebColorPickerClient.cpp
r164270 r164271 24 24 */ 25 25 26 #i fndef ViewClientEfl_h27 # define ViewClientEfl_h26 #include "config.h" 27 #include "WebColorPickerClient.h" 28 28 29 #include <WebKit2/WKBase.h> 30 #include <WebKit2/WKGeometry.h> 31 32 class EwkView; 33 29 #if ENABLE(INPUT_TYPE_COLOR) 34 30 namespace WebKit { 35 31 36 class ViewClientEfl { 37 public: 38 explicit ViewClientEfl(EwkView*);39 ~ViewClientEfl();32 void WebColorPickerClient::showColorPicker(WebView* webView, const String& color, WKColorPickerResultListenerRef listener) 33 { 34 if (!m_client.showColorPicker) 35 return; 40 36 41 private: 42 static EwkView* toEwkView(const void* clientInfo); 43 static void viewNeedsDisplay(WKViewRef, WKRect area, const void* clientInfo); 44 static void didChangeContentsSize(WKViewRef, WKSize, const void* clientInfo); 45 static void webProcessCrashed(WKViewRef, WKURLRef, const void* clientInfo); 46 static void webProcessDidRelaunch(WKViewRef, const void* clientInfo); 47 static void didChangeContentsPosition(WKViewRef, WKPoint, const void* clientInfo); 48 static void didRenderFrame(WKViewRef, WKSize, WKRect, const void* clientInfo); 49 static void didCompletePageTransition(WKViewRef, const void* clientInfo); 50 static void didChangeViewportAttributes(WKViewRef, WKViewportAttributesRef, const void* clientInfo); 51 static void didChangeTooltip(WKViewRef, WKStringRef, const void* clientInfo); 52 static void didFindZoomableArea(WKViewRef, WKPoint, WKRect, const void* clientInfo); 53 #if ENABLE(TOUCH_EVENTS) 54 static void doneWithTouchEvent(WKViewRef, WKTouchEventRef, bool, const void* clientInfo); 37 m_client.showColorPicker(toAPI(webView), toAPI(color.impl()), listener, m_client.base.clientInfo); 38 } 39 40 void WebColorPickerClient::endPicker(WebView* webView) 41 { 42 if (!m_client.endColorPicker) 43 return; 44 45 m_client.endColorPicker(toAPI(webView), m_client.base.clientInfo); 46 } 47 48 } 55 49 #endif 56 57 EwkView* m_view;58 };59 60 } // namespace WebKit61 62 #endif // ViewClientEfl_h -
trunk/Source/WebKit2/UIProcess/efl/WebColorPickerEfl.cpp
r164270 r164271 24 24 */ 25 25 26 #i fndef ViewClientEfl_h27 # define ViewClientEfl_h26 #include "config.h" 27 #include "WebColorPickerEfl.h" 28 28 29 #include <WebKit2/WKBase.h> 30 #include <WebKit2/WKGeometry.h> 31 32 class EwkView; 29 #if ENABLE(INPUT_TYPE_COLOR) 30 #include "NotImplemented.h" 31 #include "ewk_color_picker_private.h" 33 32 34 33 namespace WebKit { 35 34 36 class ViewClientEfl { 37 public: 38 explicit ViewClientEfl(EwkView*); 39 ~ViewClientEfl(); 35 WebColorPickerEfl::WebColorPickerEfl(WebViewEfl* webView, WebColorPicker::Client* client, const WebCore::Color&) 36 : WebColorPicker(client) 37 , m_webView(webView) 38 { 39 ASSERT(m_webView); 40 m_colorPickerResultListener = WebColorPickerResultListenerProxy::create(this); 41 } 40 42 41 private: 42 static EwkView* toEwkView(const void* clientInfo); 43 static void viewNeedsDisplay(WKViewRef, WKRect area, const void* clientInfo); 44 static void didChangeContentsSize(WKViewRef, WKSize, const void* clientInfo); 45 static void webProcessCrashed(WKViewRef, WKURLRef, const void* clientInfo); 46 static void webProcessDidRelaunch(WKViewRef, const void* clientInfo); 47 static void didChangeContentsPosition(WKViewRef, WKPoint, const void* clientInfo); 48 static void didRenderFrame(WKViewRef, WKSize, WKRect, const void* clientInfo); 49 static void didCompletePageTransition(WKViewRef, const void* clientInfo); 50 static void didChangeViewportAttributes(WKViewRef, WKViewportAttributesRef, const void* clientInfo); 51 static void didChangeTooltip(WKViewRef, WKStringRef, const void* clientInfo); 52 static void didFindZoomableArea(WKViewRef, WKPoint, WKRect, const void* clientInfo); 53 #if ENABLE(TOUCH_EVENTS) 54 static void doneWithTouchEvent(WKViewRef, WKTouchEventRef, bool, const void* clientInfo); 55 #endif 43 void WebColorPickerEfl::endPicker() 44 { 45 m_webView->colorPickerClient().endPicker(m_webView); 46 } 56 47 57 EwkView* m_view; 58 }; 48 void WebColorPickerEfl::showColorPicker(const WebCore::Color& color) 49 { 50 m_webView->colorPickerClient().showColorPicker(m_webView, color.serialized(), toAPI(m_colorPickerResultListener.get())); 51 } 52 53 void WebColorPickerEfl::setSelectedColor(const WebCore::Color&) 54 { 55 notImplemented(); 56 } 57 58 void WebColorPickerEfl::didChooseColor(const WebCore::Color& color) 59 { 60 if (!m_client) 61 return; 62 63 m_client->didChooseColor(color); 64 m_client->didEndColorPicker(); 65 } 59 66 60 67 } // namespace WebKit 61 62 #endif // ViewClientEfl_h 68 #endif -
trunk/Source/WebKit2/UIProcess/efl/WebColorPickerEfl.h
r164270 r164271 24 24 */ 25 25 26 #ifndef ViewClientEfl_h27 #define ViewClientEfl_h26 #ifndef WebColorPickerEfl_h 27 #define WebColorPickerEfl_h 28 28 29 #i nclude <WebKit2/WKBase.h>30 #include <WebKit2/WKGeometry.h>31 32 class EwkView; 29 #if ENABLE(INPUT_TYPE_COLOR) 30 #include "WebColorPicker.h" 31 #include "WebColorPickerResultListenerProxy.h" 32 #include "WebViewEfl.h" 33 33 34 34 namespace WebKit { 35 35 36 class ViewClientEfl{36 class WebColorPickerEfl : public WebColorPicker { 37 37 public: 38 explicit ViewClientEfl(EwkView*); 39 ~ViewClientEfl(); 38 static PassRefPtr<WebColorPickerEfl> create(WebViewEfl* webView, WebColorPicker::Client* client, const WebCore::Color& initialColor) 39 { 40 return adoptRef(new WebColorPickerEfl(webView, client, initialColor)); 41 } 42 ~WebColorPickerEfl() { } 43 44 virtual void endPicker() override; 45 virtual void setSelectedColor(const WebCore::Color&) override; 46 virtual void showColorPicker(const WebCore::Color&) override; 47 48 void didChooseColor(const WebCore::Color&); 40 49 41 50 private: 42 static EwkView* toEwkView(const void* clientInfo); 43 static void viewNeedsDisplay(WKViewRef, WKRect area, const void* clientInfo); 44 static void didChangeContentsSize(WKViewRef, WKSize, const void* clientInfo); 45 static void webProcessCrashed(WKViewRef, WKURLRef, const void* clientInfo); 46 static void webProcessDidRelaunch(WKViewRef, const void* clientInfo); 47 static void didChangeContentsPosition(WKViewRef, WKPoint, const void* clientInfo); 48 static void didRenderFrame(WKViewRef, WKSize, WKRect, const void* clientInfo); 49 static void didCompletePageTransition(WKViewRef, const void* clientInfo); 50 static void didChangeViewportAttributes(WKViewRef, WKViewportAttributesRef, const void* clientInfo); 51 static void didChangeTooltip(WKViewRef, WKStringRef, const void* clientInfo); 52 static void didFindZoomableArea(WKViewRef, WKPoint, WKRect, const void* clientInfo); 53 #if ENABLE(TOUCH_EVENTS) 54 static void doneWithTouchEvent(WKViewRef, WKTouchEventRef, bool, const void* clientInfo); 51 WebColorPickerEfl(WebViewEfl*, WebColorPicker::Client*, const WebCore::Color&); 52 53 WebViewEfl* m_webView; 54 RefPtr<WebColorPickerResultListenerProxy> m_colorPickerResultListener; 55 }; 56 57 } 55 58 #endif 56 59 57 EwkView* m_view; 58 }; 59 60 } // namespace WebKit 61 62 #endif // ViewClientEfl_h 60 #endif // WebColorPickerEfl_h -
trunk/Source/WebKit2/UIProcess/efl/WebColorPickerResultListenerProxy.cpp
r164270 r164271 1 1 /* 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved.2 * Copyright (C) 2012-2014 Samsung Electronics. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 29 29 #if ENABLE(INPUT_TYPE_COLOR) 30 31 #include "WebPageProxy.h"30 #include "WebColorPickerEfl.h" 31 #include <WebCore/Color.h> 32 32 33 33 namespace WebKit { 34 34 35 WebColorPickerResultListenerProxy::WebColorPickerResultListenerProxy(Web PageProxy* page)36 : m_ page(page)35 WebColorPickerResultListenerProxy::WebColorPickerResultListenerProxy(WebColorPickerEfl* colorPicker) 36 : m_colorPicker(colorPicker) 37 37 { 38 ASSERT(m_colorPicker); 38 39 } 39 40 … … 44 45 void WebColorPickerResultListenerProxy::invalidate() 45 46 { 46 m_ page= 0;47 m_colorPicker = 0; 47 48 } 48 49 49 50 void WebColorPickerResultListenerProxy::setColor(const String& color) 50 51 { 51 if (!m_ page)52 if (!m_colorPicker) 52 53 return; 53 54 54 m_page->setColorPickerColor(WebCore::Color(color)); 55 m_page->endColorPicker(); 55 m_colorPicker->didChooseColor(WebCore::Color(color)); 56 56 } 57 57 -
trunk/Source/WebKit2/UIProcess/efl/WebColorPickerResultListenerProxy.h
r164270 r164271 36 36 namespace WebKit { 37 37 38 class Web PageProxy;38 class WebColorPickerEfl; 39 39 40 40 class WebColorPickerResultListenerProxy : public API::ObjectImpl<API::Object::Type::ColorPickerResultListener> { 41 41 public: 42 static PassRefPtr<WebColorPickerResultListenerProxy> create(Web PageProxy* page)42 static PassRefPtr<WebColorPickerResultListenerProxy> create(WebColorPickerEfl* colorPicker) 43 43 { 44 return adoptRef(new WebColorPickerResultListenerProxy( page));44 return adoptRef(new WebColorPickerResultListenerProxy(colorPicker)); 45 45 } 46 46 … … 51 51 52 52 private: 53 explicit WebColorPickerResultListenerProxy(Web PageProxy*);53 explicit WebColorPickerResultListenerProxy(WebColorPickerEfl*); 54 54 55 RefPtr<WebPageProxy> m_page;55 WebColorPickerEfl* m_colorPicker; 56 56 }; 57 57 -
trunk/Source/WebKit2/UIProcess/efl/WebViewEfl.cpp
r160432 r164271 43 43 #if ENABLE(TOUCH_EVENTS) 44 44 #include "EwkTouchEvent.h" 45 #endif 46 47 #if ENABLE(INPUT_TYPE_COLOR) 48 #include "WebColorPickerEfl.h" 45 49 #endif 46 50 … … 179 183 #endif // ENABLE(FULLSCREEN_API) 180 184 185 #if ENABLE(INPUT_TYPE_COLOR) 186 void WebViewEfl::initializeColorPickerClient(const WKColorPickerClientBase* client) 187 { 188 m_colorPickerClient.initialize(client); 189 } 190 191 PassRefPtr<WebColorPicker> WebViewEfl::createColorPicker(WebPageProxy* page, const WebCore::Color& color, const WebCore::IntRect&) 192 { 193 return WebColorPickerEfl::create(this, page, color); 194 } 195 #endif 196 181 197 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/efl/WebViewEfl.h
r162158 r164271 27 27 #define WebViewEfl_h 28 28 29 #include "WebColorPickerClient.h" 29 30 #include "WebView.h" 30 31 … … 52 53 void sendMouseEvent(const Evas_Event_Mouse_Up*); 53 54 void sendMouseEvent(const Evas_Event_Mouse_Move*); 55 56 #if ENABLE(INPUT_TYPE_COLOR) 57 void initializeColorPickerClient(const WKColorPickerClientBase*); 58 59 WebColorPickerClient& colorPickerClient() { return m_colorPickerClient; } 60 virtual PassRefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color&, const WebCore::IntRect&) override; 61 #endif 54 62 55 63 private: … … 79 87 bool m_hasRequestedFullScreen; 80 88 89 #if ENABLE(INPUT_TYPE_COLOR) 90 WebColorPickerClient m_colorPickerClient; 91 #endif 92 81 93 friend class WebView; 82 94 }; -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r164258 r164271 1442 1442 ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1443 1443 EDCA71B7128DDA8C00201B26 /* WKBundlePageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A22F1001289FCD90085E74F /* WKBundlePageOverlay.cpp */; }; 1444 F036978515F4BE6B00C3A80E /* WKColorPickerResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */; };1445 F036978615F4BE6B00C3A80E /* WKColorPickerResultListener.h in Headers */ = {isa = PBXBuildFile; fileRef = F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */; };1446 1444 F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978715F4BF0500C3A80E /* WebColorPicker.cpp */; }; 1447 1445 F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */; }; … … 3233 3231 E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageEditorClient.h; sourceTree = "<group>"; }; 3234 3232 E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageEditorClient.cpp; sourceTree = "<group>"; }; 3235 F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKColorPickerResultListener.cpp; sourceTree = "<group>"; };3236 F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKColorPickerResultListener.h; sourceTree = "<group>"; };3237 3233 F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = "<group>"; }; 3238 F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPickerResultListenerProxy.cpp; sourceTree = "<group>"; };3239 F036978A15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerResultListenerProxy.h; sourceTree = "<group>"; };3240 3234 F6113E24126CE1820057D0A7 /* WebUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentURLPattern.h; sourceTree = "<group>"; }; 3241 3235 F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserContentURLPattern.cpp; sourceTree = "<group>"; }; … … 5079 5073 F036978715F4BF0500C3A80E /* WebColorPicker.cpp */, 5080 5074 3F87B9BF158940D80090FF62 /* WebColorPicker.h */, 5081 F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */,5082 F036978A15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.h */,5083 5075 BC4A62A514744EC6006C681A /* WebConnectionToWebProcess.cpp */, 5084 5076 BC4A62A614744EC6006C681A /* WebConnectionToWebProcess.h */, … … 5205 5197 BC646C1611DD399F006455B0 /* WKBackForwardListRef.cpp */, 5206 5198 BC646C1711DD399F006455B0 /* WKBackForwardListRef.h */, 5207 F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */,5208 F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */,5209 5199 BCB9E24A1120E15C00A137E0 /* WKContext.cpp */, 5210 5200 BCB9E2491120E15C00A137E0 /* WKContext.h */, … … 6796 6786 BC4075F6124FF0270068F20A /* WKCertificateInfo.h in Headers */, 6797 6787 BC407627124FF0400068F20A /* WKCertificateInfoMac.h in Headers */, 6798 F036978615F4BE6B00C3A80E /* WKColorPickerResultListener.h in Headers */,6799 6788 372CAF0B1833FD910040AC27 /* WKNSError.h in Headers */, 6800 6789 BC5C75C814954DA600BC4775 /* WKConnectionInternal.h in Headers */, … … 7973 7962 3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */, 7974 7963 F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */, 7975 F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */,7976 7964 BC4A628F147312BE006C681A /* WebConnection.cpp in Sources */, 7977 7965 BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */, … … 8200 8188 BC407628124FF0400068F20A /* WKCertificateInfoMac.mm in Sources */, 8201 8189 515E7727183DD6F60007203F /* AsyncRequest.cpp in Sources */, 8202 F036978515F4BE6B00C3A80E /* WKColorPickerResultListener.cpp in Sources */,8203 8190 BCA284D61492F2C7001F9042 /* WKConnection.mm in Sources */, 8204 8191 BC4A6296147313A0006C681A /* WKConnectionRef.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.