Source/WebCore: There is no way to tell whether an element can be activated or not
https://bugs.webkit.org/show_bug.cgi?id=92093

Reviewed by Antonio Gomes.

This patch adds the willRespondToMouseClickEvents and willRespondToMouseMoveEvents
functions, named after similar functions in the iOS fork of WebKit.

Touch-adjustment will now use these two functions, which improves accuracy when
targeting shadow-dom elements, and also means touch adjustment will prefer enabled
form-elements over disabled ones.

Test: touchadjustment/disabled-formelements.html

* dom/Node.cpp:
(WebCore::Node::willRespondToMouseMoveEvents):
(WebCore::Node::willRespondToMouseClickEvents):
* dom/Node.h:
(Node):
* editing/DeleteButton.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::willRespondToMouseClickEvents):
* html/HTMLAnchorElement.h:
(HTMLAnchorElement):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
* html/HTMLButtonElement.h:
(HTMLButtonElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::willRespondToMouseClickEvents):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::willRespondToMouseClickEvents):
* html/HTMLLabelElement.h:
(HTMLLabelElement):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::willRespondToMouseClickEvents):
* html/HTMLMediaElement.h:
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
* html/HTMLSummaryElement.h:
(HTMLSummaryElement):
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::willRespondToMouseClickEvents):
* html/shadow/CalendarPickerElement.h:
(CalendarPickerElement):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::willRespondToMouseClickEvents):
(WebCore::MediaControlTimelineElement::setPosition):
(WebCore::MediaControlVolumeSliderElement::willRespondToMouseMoveEvents):
(WebCore::MediaControlVolumeSliderElement::willRespondToMouseClickEvents):
* html/shadow/MediaControlElements.h:
(MediaControlTimelineElement):
(MediaControlVolumeSliderElement):
* html/shadow/MediaControlRootElement.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):
* html/shadow/SliderThumbElement.h:
(SliderThumbElement):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
(WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
(WebCore::SpinButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
* html/shadow/TextControlInnerElements.h:
(SearchFieldResultsButtonElement):
(SearchFieldCancelButtonElement):
(SpinButtonElement):
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents):
* html/shadow/TextFieldDecorationElement.h:
(TextFieldDecorationElement):
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::nodeRespondsToTapGesture):

Source/WebKit/gtk: [Gtk] Add WK1 API for snapshot retrieval
https://bugs.webkit.org/show_bug.cgi?id=92261

Reviewed by Martin Robinson.

Add API to WebKitWebView to retrieve a snapshot of its
visible contents as a cairo_surface_t.

* docs/webkitgtk-sections.txt: Add new symbols.
* webkit/webkitwebview.cpp:
(webkit_web_view_get_snapshot): New
method to paint a webview snapshot.
* webkit/webkitwebview.h: Ditto.

LayoutTests: There is no way to tell whether an element can be activated or not
https://bugs.webkit.org/show_bug.cgi?id=92093

Reviewed by Antonio Gomes.

Tests that enabled formelements are now preferred over disabled formelements.

* touchadjustment/disabled-formelements-expected.txt: Added.
* touchadjustment/disabled-formelements.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Wheel events on a page with frames are not handled in fixed layout
https://bugs.webkit.org/show_bug.cgi?id=90550

Reviewed by Antonio Gomes.

Based on patch by Andras Becsi.

Frame-rect size is not the right value to check against to see if the document
can be contained within the full visible content rect, since it does not handle
fixedVisibleContentRect. Instead visibleContentRect(true) should be used which
returns the full visible content rect disregarding scrollbars, and which is
the same a frame-rect size when fixedVisibleContentRect is not set.

* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement datalist UI for input type color for Chromium
https://bugs.webkit.org/show_bug.cgi?id=92075

Reviewed by Kent Tamura.

Source/Platform:

* chromium/public/WebLocalizedString.h: Added OtherColorLabel.

Source/WebCore:

Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html

* rendering/RenderThemeChromiumCommon.cpp:
(WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.

Source/WebKit/chromium:

Integrated ColorChooserProxy and WebColorChooserClientImpl into ColorChooserUIController.
ColorChooserUIController can control whether to open the color suggestion picker
popup or the color chooser depending on the responses from ColorChooserClient.

* WebKit.gyp:
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::createColorChooser): Returns ColorChooserUIController which is a ColorChooser.
(WebKit::ChromeClientImpl::createWebColorChooser): Returns WebColorChooser that was created by Chromium.
* src/ChromeClientImpl.h:
(WebKit):
(ChromeClientImpl):
* src/ColorChooserProxy.cpp: Removed.
* src/ColorChooserProxy.h: Removed.
* src/ColorChooserUIController.cpp: Added.
(WebKit):
(WebKit::ColorChooserUIController::ColorChooserUIController): Controls the UI for color chooser. Opens the color suggestion picker popup or color chooser depending on the ColorChooserClient.
(WebKit::ColorChooserUIController::~ColorChooserUIController):
(WebKit::ColorChooserUIController::setSelectedColor):
(WebKit::ColorChooserUIController::endChooser): This is called by WebCore so we close both the popup and the color chooser.
(WebKit::ColorChooserUIController::didChooseColor):
(WebKit::ColorChooserUIController::didEndChooser):
(WebKit::ColorChooserUIController::contentSize): The popup will be resized later from JS so we return an arbitrary size.
(WebKit::ColorChooserUIController::writeDocument):
(WebKit::ColorChooserUIController::setValueAndClosePopup): Performs action based on the numValue.
(WebKit::ColorChooserUIController::didClosePopup):
(WebKit::ColorChooserUIController::openPopup): Opens color chooser suggestion popup.
(WebKit::ColorChooserUIController::closePopup):
(WebKit::ColorChooserUIController::openColorChooser): Opens color chooser.
* src/ColorChooserUIController.h: Renamed from Source/WebKit/chromium/src/WebColorChooserClientImpl.h.
(WebCore):
(WebKit):
(ColorChooserUIController):
* src/WebColorChooserClientImpl.cpp: Removed.

LayoutTests:

* platform/chromium-mac/platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.png: Added.
* platform/chromium/TestExpectations:
* platform/chromium/fast/forms/color/color-suggestion-picker-appearance-expected.txt: Added.
* platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html: Added. Tests color suggestion picker popup appearance.
* platform/chromium/fast/forms/datalist/input-list-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124025 268f45cc-cd09-0410-ab3c-d52691b4dbfc