Title: [124023] trunk
- Revision
- 124023
- Author
- [email protected]
- Date
- 2012-07-30 07:11:32 -0700 (Mon, 30 Jul 2012)
Log Message
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.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (124022 => 124023)
--- trunk/LayoutTests/ChangeLog 2012-07-30 13:33:14 UTC (rev 124022)
+++ trunk/LayoutTests/ChangeLog 2012-07-30 14:11:32 UTC (rev 124023)
@@ -32,6 +32,16 @@
* platform/qt-4.8/Skipped:
* platform/qt-5.0-wk1/Skipped:
+2012-07-30 János Badics <[email protected]>
+
+ [Qt][WK1] Gardening after r123988. It made fast/writing-mode/flipped-blocks-hit-test-line-edges.html fail
+ https://bugs.webkit.org/show_bug.cgi?id=92636
+
+ Reviewed by Csaba Osztrogonác.
+
+ * platform/qt-4.8/Skipped:
+ * platform/qt-5.0-wk1/Skipped:
+
2012-07-30 Sheriff Bot <[email protected]>
Unreviewed, rolling out r124000.
Modified: trunk/Source/WebCore/ChangeLog (124022 => 124023)
--- trunk/Source/WebCore/ChangeLog 2012-07-30 13:33:14 UTC (rev 124022)
+++ trunk/Source/WebCore/ChangeLog 2012-07-30 14:11:32 UTC (rev 124023)
@@ -119,6 +119,23 @@
* dom/EventDispatcher.h:
(EventDispatcher):
+2012-07-30 Hayato Ito <[email protected]>
+
+ Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
+ https://bugs.webkit.org/show_bug.cgi?id=92625
+
+ Reviewed by Hajime Morita.
+
+ EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
+
+ No new tests, no behavior change.
+
+ * dom/EventDispatcher.cpp:
+ (WebCore::EventDispatcher::EventDispatcher):
+ (WebCore::EventDispatcher::dispatchEvent):
+ * dom/EventDispatcher.h:
+ (EventDispatcher):
+
2012-07-26 Yury Semikhatsky <[email protected]>
Web Inspector: make MemoryInstrumentation methods private
Modified: trunk/Source/WebKit/gtk/ChangeLog (124022 => 124023)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-07-30 13:33:14 UTC (rev 124022)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-07-30 14:11:32 UTC (rev 124023)
@@ -1,3 +1,19 @@
+2012-07-30 Claudio Saavedra <[email protected]>
+
+ [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.
+
2012-07-28 Mario Sanchez Prada <[email protected]>
[GTK] Add a new and reusable enchant-based spellchecker in WebCore
Modified: trunk/Source/WebKit/gtk/docs/webkitgtk-sections.txt (124022 => 124023)
--- trunk/Source/WebKit/gtk/docs/webkitgtk-sections.txt 2012-07-30 13:33:14 UTC (rev 124022)
+++ trunk/Source/WebKit/gtk/docs/webkitgtk-sections.txt 2012-07-30 14:11:32 UTC (rev 124023)
@@ -475,6 +475,7 @@
webkit_web_view_zoom_in
webkit_web_view_zoom_out
webkit_web_view_get_window_features
+webkit_web_view_get_snapshot
<SUBSECTION Standard>
WEBKIT_WEB_VIEW
WEBKIT_IS_WEB_VIEW
Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (124022 => 124023)
--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-07-30 13:33:14 UTC (rev 124022)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp 2012-07-30 14:11:32 UTC (rev 124023)
@@ -5259,6 +5259,44 @@
#endif
}
+/**
+ * webkit_web_view_get_snapshot:
+ * @web_view: a #WebKitWebView
+ *
+ * Retrieves a snapshot with the visible contents of @webview.
+ *
+ * Returns: (transfer full): a @cairo_surface_t
+ *
+ * Since: 1.10
+ **/
+cairo_surface_t*
+webkit_web_view_get_snapshot(WebKitWebView* webView)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
+
+ Frame* frame = core(webView)->mainFrame();
+ if (!frame || !frame->contentRenderer() || !frame->view())
+ return 0;
+
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(GTK_WIDGET(webView), &allocation);
+ cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, allocation.width, allocation.height);
+ RefPtr<cairo_t> cr = adoptRef(cairo_create(surface));
+ GraphicsContext gc(cr.get());
+
+ IntRect rect = allocation;
+ gc.applyDeviceScaleFactor(frame->page()->deviceScaleFactor());
+ gc.save();
+ gc.clip(rect);
+ if (webView->priv->transparent)
+ gc.clearRect(rect);
+ frame->view()->paint(&gc, rect);
+ gc.restore();
+
+ return surface;
+}
+
void webViewEnterFullscreen(WebKitWebView* webView, Node* node)
{
if (!node->hasTagName(HTMLNames::videoTag))
Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.h (124022 => 124023)
--- trunk/Source/WebKit/gtk/webkit/webkitwebview.h 2012-07-30 13:33:14 UTC (rev 124022)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.h 2012-07-30 14:11:32 UTC (rev 124023)
@@ -446,6 +446,9 @@
WEBKIT_API WebKitViewportAttributes*
webkit_web_view_get_viewport_attributes (WebKitWebView *web_view);
+WEBKIT_API cairo_surface_t*
+webkit_web_view_get_snapshot (WebKitWebView *web_view);
+
G_END_DECLS
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes