Diff
Modified: trunk/LayoutTests/ChangeLog (183585 => 183586)
--- trunk/LayoutTests/ChangeLog 2015-04-29 22:56:50 UTC (rev 183585)
+++ trunk/LayoutTests/ChangeLog 2015-04-29 23:02:11 UTC (rev 183586)
@@ -1,3 +1,19 @@
+2015-04-29 Simon Fraser <[email protected]>
+
+ 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 <[email protected]>
[GTK] Add support for automatic hyphenation
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt (0 => 183586)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt 2015-04-29 23:02:11 UTC (rev 183586)
@@ -0,0 +1,3 @@
+Wheel event rect:
+
+28, 110 - 128, 210
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt (0 => 183586)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt 2015-04-29 23:02:11 UTC (rev 183586)
@@ -0,0 +1,3 @@
+Wheel event rect:
+
+28, 110 - 128, 210
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html (0 => 183586)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html 2015-04-29 23:02:11 UTC (rev 183586)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: 10px 20px;
+ background-color: blue;
+ box-shadow: 0 0 10px black;
+ }
+
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ if (window.internals) {
+ internals.setTopContentInset(60);
+ internals.setHeaderHeight(23);
+ }
+
+ function doTest()
+ {
+ window.setTimeout(function() {
+ // Scroll to test the mapping from document to view coords.
+ document.body.scrollTop = 195;
+ dumpRegion();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0)
+ }
+
+ window.addEventListener('load', doTest);
+ </script>
+</head>
+<body>
+
+<p>Wheel event rect:</p>
+<div class="box" _onmousewheel_="(void)0"></div>
+
+<pre id="output"></pre>
+
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html (0 => 183586)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html 2015-04-29 23:02:11 UTC (rev 183586)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: 10px 20px;
+ background-color: blue;
+ box-shadow: 0 0 10px black;
+ }
+
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ if (window.internals)
+ internals.setTopContentInset(60);
+
+ function doTest()
+ {
+ window.setTimeout(function() {
+ // Scroll to test the mapping from document to view coords.
+ document.body.scrollTop = 195;
+ dumpRegion();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0)
+ }
+
+ window.addEventListener('load', doTest);
+ </script>
+</head>
+<body>
+
+<p>Wheel event rect:</p>
+<div class="box" _onmousewheel_="(void)0"></div>
+
+<pre id="output"></pre>
+
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt (0 => 183586)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt 2015-04-29 23:02:11 UTC (rev 183586)
@@ -0,0 +1,4 @@
+Wheel event rect for plug-in:
+
+
+28, 70 - 328, 220
Added: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html (0 => 183586)
--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html (rev 0)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html 2015-04-29 23:02:11 UTC (rev 183586)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: 10px 20px;
+ background-color: blue;
+ box-shadow: 0 0 10px black;
+ }
+
+ embed {
+ margin: 20px;
+ }
+
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ if (window.internals) {
+ internals.setTopContentInset(60);
+ internals.setHeaderHeight(23);
+ }
+
+ function doTest()
+ {
+ if (window.internals)
+ internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
+
+ // Scroll to test the mapping from document to view coords.
+ document.body.scrollTop = 197;
+ dumpRegion();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+
+ window.addEventListener('load', doTest);
+ </script>
+</head>
+<body>
+
+<p>Wheel event rect for plug-in:</p>
+<embed id="plugin" type="application/x-webkit-test-netscape" drawingmodel="coreanimation"></embed>
+<pre id="output"></pre>
+
+</body>
+</html>
Modified: trunk/Source/WebKit2/ChangeLog (183585 => 183586)
--- trunk/Source/WebKit2/ChangeLog 2015-04-29 22:56:50 UTC (rev 183585)
+++ trunk/Source/WebKit2/ChangeLog 2015-04-29 23:02:11 UTC (rev 183586)
@@ -1,3 +1,16 @@
+2015-04-29 Simon Fraser <[email protected]>
+
+ 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 <[email protected]>
JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (183585 => 183586)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2015-04-29 22:56:50 UTC (rev 183585)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2015-04-29 23:02:11 UTC (rev 183586)
@@ -534,7 +534,7 @@
}
#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);
}