[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:42:09 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 0d5eb677b6d14b92db864c464214683938335a54
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Oct 17 18:19:05 2010 +0000
2010-10-17 Viatcheslav Ostapenko <ostapenko.viatcheslav at nokia.com>
Reviewed by Antonio Gomes.
[Qt] Layout tests for fix focusing of control elements on mouse click.
https://bugs.webkit.org/show_bug.cgi?id=40641
* fast/events/click-focus-control-expected.txt: Added.
* fast/events/click-focus-control.html: Added.
* platform/mac/fast/events/click-focus-control-expected.txt: Added.
* platform/win/Skipped:
2010-10-17 Viatcheslav Ostapenko <ostapenko.viatcheslav at nokia.com>
Reviewed by Antonio Gomes.
[Qt] Fix focusing of control elements on mouse click.
Brings GTK fix to Qt platform.
https://bugs.webkit.org/show_bug.cgi?id=40641
Test: fast/events/click-focus-control.html
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isMouseFocusable):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a238531..4d8649c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-17 Viatcheslav Ostapenko <ostapenko.viatcheslav at nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Layout tests for fix focusing of control elements on mouse click.
+ https://bugs.webkit.org/show_bug.cgi?id=40641
+
+ * fast/events/click-focus-control-expected.txt: Added.
+ * fast/events/click-focus-control.html: Added.
+ * platform/mac/fast/events/click-focus-control-expected.txt: Added.
+ * platform/win/Skipped:
+
2010-10-17 Rob Buis <rwlbuis at gmail.com>
Reviewed by Dirk Schulze.
diff --git a/LayoutTests/fast/events/click-focus-control-expected.txt b/LayoutTests/fast/events/click-focus-control-expected.txt
new file mode 100644
index 0000000..a169bac
--- /dev/null
+++ b/LayoutTests/fast/events/click-focus-control-expected.txt
@@ -0,0 +1,13 @@
+This test ensures that we can click to focus an a element. Click on the element below.
+
+The expected result is platform specific. Mac doesn't allow some form controls to be mouse focusable.
+
+Result
+
+a1 received focus ()
+a2 received focus ()
+a3 received focus ()
+a4 received focus ()
+a5 received focus ()
+PASS All form elements got focus
+
diff --git a/LayoutTests/fast/events/click-focus-control.html b/LayoutTests/fast/events/click-focus-control.html
new file mode 100644
index 0000000..68a8ea0
--- /dev/null
+++ b/LayoutTests/fast/events/click-focus-control.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="../js/resources/js-test-pre.js"></script>
+
+ <script type="text/javascript">
+
+ var numberOfFocusedElements = 0;
+ function test()
+ {
+ if (!window.layoutTestController)
+ return;
+
+ for (var i = 1; i <= 5; i++) {
+ var aElement = document.getElementById('a' + i);
+ aElement.onfocus = handleFocus;
+ eventSender.mouseMoveTo(aElement.offsetLeft + 2, aElement.offsetTop + 2);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+
+ if(numberOfFocusedElements == 5)
+ testPassed("All form elements got focus");
+ else
+ testFailed("Some form elements didn't get focus");
+
+ var tc = document.getElementById('test-container');
+ tc.parentNode.removeChild(tc);
+ };
+
+ function handleFocus(e)
+ {
+ var el = e.target;
+ debug(el.id + ' received focus (' + el.title + ')');
+ numberOfFocusedElements = numberOfFocusedElements + 1;
+ }
+
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ }
+
+ </script>
+</head>
+
+<body onLoad="test()">
+
+<p>This test ensures that we can click to focus an a element.
+Click on the element below.
+
+<p>The expected result is platform specific. Mac doesn't allow some form controls to be
+mouse focusable.
+
+<div id=test-container>
+<form id="form1">
+<p>
+<strong>This is form1</strong><br/>
+
+First name here<br/>
+<input type="text" name="name" title="input name" size="6" maxlength="10"/><br/>
+
+Password:<br/>
+<input type="password" name="password" size="6" maxlength="10"/><br/>
+
+comments:<br/>
+<textarea name="comments" title="textarea comments" rows="2" cols="20">anything form1 goes here</textarea><br/>
+
+Select 1:<br/>
+<input id=a1 type="radio" name="radio1" value="radio1a"/><br/>
+<input id=a2 type="radio" name="radio1" value="radio1b"/><br/>
+
+Check it:<br/>
+<input id=a3 type="checkbox" name="checkbox1" value="checkbox1"/><br/>
+
+Select 1:<br/>
+ <select id=a4 name="Select" size="2">
+ <option>1</option>
+ <option>2</option>
+ <option selected="selected">3</option>
+ <option>4</option>
+ </select><br/>
+<input id=a5 type="button" name="button" value="Button 1"/>
+</p></form><p><strong>End form1</strong></p>
+</div>
+
+<p>Result
+
+<pre id=console></pre>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/events/click-focus-control-expected.txt b/LayoutTests/platform/mac/fast/events/click-focus-control-expected.txt
new file mode 100644
index 0000000..1a8cb79
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/events/click-focus-control-expected.txt
@@ -0,0 +1,9 @@
+This test ensures that we can click to focus an a element. Click on the element below.
+
+The expected result is platform specific. Mac doesn't allow some form controls to be mouse focusable.
+
+Result
+
+a4 received focus ()
+FAIL Some form elements didn't get focus
+
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 6af1478..4086606 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -1036,3 +1036,6 @@ fast/dom/nodesFromRect-basic.html
# https://bugs.webkit.org/show_bug.cgi?id=46223
# The WebKit plugin implementation does not support iframe shims.
plugins/iframe-shims.html
+
+# https://bugs.webkit.org/show_bug.cgi?id=22261
+fast/events/click-focus-control.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a957c83..feb13da 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-17 Viatcheslav Ostapenko <ostapenko.viatcheslav at nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Fix focusing of control elements on mouse click.
+ Brings GTK fix to Qt platform.
+ https://bugs.webkit.org/show_bug.cgi?id=40641
+
+ Test: fast/events/click-focus-control.html
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::isMouseFocusable):
+
2010-10-17 Adam Barth <abarth at webkit.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/html/HTMLFormControlElement.cpp b/WebCore/html/HTMLFormControlElement.cpp
index 215e502..1034bfc 100644
--- a/WebCore/html/HTMLFormControlElement.cpp
+++ b/WebCore/html/HTMLFormControlElement.cpp
@@ -255,7 +255,7 @@ bool HTMLFormControlElement::isKeyboardFocusable(KeyboardEvent* event) const
bool HTMLFormControlElement::isMouseFocusable() const
{
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(QT)
return HTMLElement::isMouseFocusable();
#else
return false;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list