-
commit-queue@webkit.org authored
<rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356 Patch by Ruth Fong <ruth_fong@apple.com> on 2013-08-01 Reviewed by Benjamin Poulain. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER. Source/WebCore: * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER. Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER. Source/WebKit2: This patch adds an popover implementation of <input type='color'>. * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::createColorPicker): Updated to pass the coordinates of the <input type='color'> element and the WKView object for the window. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewWillStartLiveResize): Close popover color picker when the view is resized. (WebKit::WebPageProxy::viewInWindowStateDidChange): Close popover color picker when the view is no longer in the window. (WebKit::WebPageProxy::showColorPicker): Updated to show either a color panel or a popover color picker depending on whether INPUT_TYPE_COLOR_POPOVER is enabled. * UIProcess/mac/WebColorPickerMac.h: * UIProcess/mac/WebColorPickerMac.mm: (WebKit::WebColorPickerMac::create): (WebKit::WebColorPickerMac::~WebColorPickerMac): (WebKit::WebColorPickerMac::WebColorPickerMac): (WebKit::WebColorPickerMac::endPicker): (WebKit::WebColorPickerMac::setSelectedColor): (WebKit::WebColorPickerMac::showColorPicker): Methods updated to handle both the color panel implementation and the popover implementation; also renamed m_panel to m_colorPickerUI. (-[WKColorPopoverMac initWithFrame:WebCore::inView:]): (-[WKColorPopoverMac setAndShowPicker:WebKit::withColor:]): (-[WKColorPopoverMac dealloc]): (-[WKColorPopoverMac invalidate]): (-[WKColorPopoverMac windowWillClose:]): (-[WKColorPopoverMac didChooseColor:]): (-[WKColorPopoverMac setColor:]): WKColorPopoverMac provides the popover implementation of <input type='color'>. (-[WKColorPanelMac didChooseColor:]): Updated to match the interface of WKColorPickerMac::didChooseColor. Source/WTF: * wtf/FeatureDefines.h: Added and enabled INPUT_TYPE_COLOR_POPOVER. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7231230f