From 9fe6d73c1af5da97814e38435ac08f7e6fd9877e Mon Sep 17 00:00:00 2001 From: "simon.fraser@apple.com" Date: Wed, 29 Apr 2015 23:02:11 +0000 Subject: [PATCH] Allow testing of plug-ins that handle wheel events. https://bugs.webkit.org/show_bug.cgi?id=144413 Reviewed by Tim Horton. Source/WebKit2: Allow the Test Netscape Plug-in to pretend to handle wheel events, so layout tests can use it. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): LayoutTests: Test the non-fast scrollable region with top content inset and header height, and with a plug-in. * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt: Added. * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt: Added. * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html: Added. * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html: Added. * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt: Added. * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183586 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 16 +++++++ .../non-fast-region/top-content-inset-expected.txt | 3 ++ .../top-content-inset-header-expected.txt | 3 ++ .../non-fast-region/top-content-inset-header.html | 47 ++++++++++++++++++++ .../non-fast-region/top-content-inset.html | 45 +++++++++++++++++++ .../wheel-event-plugin-expected.txt | 4 ++ .../non-fast-region/wheel-event-plugin.html | 51 ++++++++++++++++++++++ Source/WebKit2/ChangeLog | 13 ++++++ .../Netscape/mac/NetscapePluginModuleMac.mm | 2 +- 9 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt create mode 100644 LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt create mode 100644 LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html create mode 100644 LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html create mode 100644 LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt create mode 100644 LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index db49e2a..fc4b589 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,19 @@ +2015-04-29 Simon Fraser + + Allow testing of plug-ins that handle wheel events. + https://bugs.webkit.org/show_bug.cgi?id=144413 + + Reviewed by Tim Horton. + + Test the non-fast scrollable region with top content inset and header height, and with a plug-in. + + * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt: Added. + * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt: Added. + * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html: Added. + * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html: Added. + * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt: Added. + * platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html: Added. + 2015-04-29 Martin Robinson [GTK] Add support for automatic hyphenation diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt new file mode 100644 index 0000000..ed44c33 --- /dev/null +++ b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt @@ -0,0 +1,3 @@ +Wheel event rect: + +28, 110 - 128, 210 diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt new file mode 100644 index 0000000..ed44c33 --- /dev/null +++ b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt @@ -0,0 +1,3 @@ +Wheel event rect: + +28, 110 - 128, 210 diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html new file mode 100644 index 0000000..0013973 --- /dev/null +++ b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html @@ -0,0 +1,47 @@ + + + + + + + + + + +

Wheel event rect:

+
+ +

+
+
+
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html
new file mode 100644
index 0000000..a30a265
--- /dev/null
+++ b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html
@@ -0,0 +1,45 @@
+
+
+
+
+    
+    
+    
+
+
+
+

Wheel event rect:

+
+ +

+
+
+
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt
new file mode 100644
index 0000000..029b0c9
--- /dev/null
+++ b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt
@@ -0,0 +1,4 @@
+Wheel event rect for plug-in:
+
+
+28, 70 - 328, 220
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html
new file mode 100644
index 0000000..63cbaac
--- /dev/null
+++ b/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html
@@ -0,0 +1,51 @@
+
+
+
+
+    
+    
+    
+
+
+
+

Wheel event rect for plug-in:

+ +

+
+
+
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index d7db74d..b96ab8f 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2015-04-29  Simon Fraser  
+
+        Allow testing of plug-ins that handle wheel events.
+        https://bugs.webkit.org/show_bug.cgi?id=144413
+
+        Reviewed by Tim Horton.
+        
+        Allow the Test Netscape Plug-in to pretend to handle wheel events,
+        so layout tests can use it.
+
+        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+        (WebKit::NetscapePluginModule::determineQuirks):
+
 2015-04-29  Filip Pizlo  
 
         JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
diff --git a/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm b/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
index e6cf81a..2280488 100644
--- a/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
+++ b/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
@@ -534,7 +534,7 @@ void NetscapePluginModule::determineQuirks()
     }
 #endif
 
-    if (plugin.bundleIdentifier == "com.adobe.acrobat.pdfviewerNPAPI") {
+    if (plugin.bundleIdentifier == "com.adobe.acrobat.pdfviewerNPAPI" || plugin.bundleIdentifier == "com.apple.testnetscapeplugin") {
         // The Adobe Reader plug-in wants wheel events.
         m_pluginQuirks.add(PluginQuirks::WantsWheelEvents);
     }
-- 
1.8.3.1