WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
84678
[GTK] spatial navigation failures
https://bugs.webkit.org/show_bug.cgi?id=84678
Summary
[GTK] spatial navigation failures
Philippe Normand
Reported
2012-04-24 00:59:44 PDT
--- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/spatial-navigation/snav-container-white-space-expected.txt +++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/spatial-navigation/snav-container-white-space-actual.txt @@ -5,9 +5,9 @@ This is an element PASS gFocusedDocument.activeElement.getAttribute("id") is "1" -PASS gFocusedDocument.activeElement.getAttribute("id") is "2" -PASS gFocusedDocument.activeElement.getAttribute("id") is "3" -PASS gFocusedDocument.activeElement.getAttribute("id") is "4" +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 2. Was 3. +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 3. Was 4. +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 4. Was 5. PASS gFocusedDocument.activeElement.getAttribute("id") is "5" PASS gFocusedDocument.activeElement.getAttribute("id") is "4" PASS gFocusedDocument.activeElement.getAttribute("id") is "3" --- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/spatial-navigation/snav-fully-aligned-horizontally-expected.txt +++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/spatial-navigation/snav-fully-aligned-horizontally-actual.txt @@ -41,6 +41,6 @@ PASS gFocusedDocument.activeElement.getAttribute("id") is "23" PASS gFocusedDocument.activeElement.getAttribute("id") is "25" PASS gFocusedDocument.activeElement.getAttribute("id") is "26" -PASS gFocusedDocument.activeElement.getAttribute("id") is "27" +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 27. Was end. PASS gFocusedDocument.activeElement.getAttribute("id") is "end" --- /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt +++ /home/slave/webkitgtk/gtk-linux-64-release/build/layout-test-results/fast/spatial-navigation/snav-iframe-no-scrollable-content-actual.txt @@ -5,15 +5,15 @@ PASS gFocusedDocument.activeElement.getAttribute("id") is "1" PASS gFocusedDocument.activeElement.getAttribute("id") is "2" PASS gFocusedDocument.activeElement.getAttribute("id") is "3" -PASS gFocusedDocument.activeElement.getAttribute("id") is "7" -PASS gFocusedDocument.activeElement.getAttribute("id") is "6" +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 7. Was 4. +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 6. Was end. PASS gFocusedDocument.activeElement.getAttribute("id") is "end" PASS gFocusedDocument.activeElement.getAttribute("id") is "4" PASS gFocusedDocument.activeElement.getAttribute("id") is "5" PASS gFocusedDocument.activeElement.getAttribute("id") is "6" PASS gFocusedDocument.activeElement.getAttribute("id") is "3" PASS gFocusedDocument.activeElement.getAttribute("id") is "7" -PASS gFocusedDocument.activeElement.getAttribute("id") is "3" -PASS gFocusedDocument.activeElement.getAttribute("id") is "2" -PASS gFocusedDocument.activeElement.getAttribute("id") is "1" +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 3. Was 2. +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 2. Was 1. +FAIL gFocusedDocument.activeElement.getAttribute("id") should be 1. Was start.
Attachments
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2012-04-24 09:45:46 PDT
Zan did a bisect and commented on IRC the culprit commit is
r114796
.
Martin Robinson
Comment 2
2012-04-24 10:57:09 PDT
This suggests that these tests depend on font metrics.
Zan Dobersek
Comment 3
2012-06-25 09:06:51 PDT
I debugged this a bit, specifically on the fast/spatial-navigation/snav-container-white-space.html test case. As evident from the output, the problem is that when the test wants to move focus down from the element with id 1 to element with id 2, this element is skipped and the focus shifts to element with id 3. It turns out that because the <a> element with id 2 is inside a <div> element[1], this, combined with enabled Cairo metrics hinting, makes the <a> elements with ids 2 and 3 intersect by a tiny rect of size (114|1) at position (8|86). With the <a> element with id 3 being on top, this makes the focus-controlling algorithm[2] mark that node as the closest node to which the focus is shifted. The test for example passes if the parent <div> element of the <a> element with id 2 is added a padding: 2px; style or is just removed. The test also passes in GtkLauncher. [1] -
http://trac.webkit.org/browser/trunk/LayoutTests/fast/spatial-navigation/snav-container-white-space.html#L76
[2] -
http://trac.webkit.org/browser/trunk/Source/WebCore/page/FocusController.cpp#L739
Zan Dobersek
Comment 4
2013-04-23 10:52:16 PDT
Fixed by enabling the subpixel layout. Closing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug