Ignore:
Timestamp:
Aug 1, 2013, 7:07:34 PM (12 years ago)
Author:
[email protected]
Message:

[Forms: color] <input type='color'> popover color well implementation
<rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356

Patch by Ruth Fong <[email protected]> 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.