From: dmazzoni@google.com Date: Tue, 28 Aug 2012 19:05:43 +0000 (+0000) Subject: AX: Should be able to tab to focus a link in a canvas subtree X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=b368f8f4da8de745d56212ecff57796633349144 AX: Should be able to tab to focus a link in a canvas subtree https://bugs.webkit.org/show_bug.cgi?id=94967 Reviewed by Chris Fleizach. Source/WebCore: Skips the hasNonEmptyBoundingBox check in isKeyboardFocusable when in a canvas subtree. Test: fast/events/tab-focus-link-in-canvas.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::isKeyboardFocusable): LayoutTests: Adds a test to make sure you can tab to a link inside a canvas subtree. * fast/events/tab-focus-link-in-canvas-expected.txt: Added. * fast/events/tab-focus-link-in-canvas.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126908 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 746821b..d069d0f 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,16 @@ +2012-08-28 Dominic Mazzoni + + AX: Should be able to tab to focus a link in a canvas subtree + https://bugs.webkit.org/show_bug.cgi?id=94967 + + Reviewed by Chris Fleizach. + + Adds a test to make sure you can tab to a link inside a canvas + subtree. + + * fast/events/tab-focus-link-in-canvas-expected.txt: Added. + * fast/events/tab-focus-link-in-canvas.html: Added. + 2012-08-28 Philip Rogers Rebaselining chromium-mac test results with scrollbars. diff --git a/LayoutTests/fast/events/tab-focus-link-in-canvas-expected.txt b/LayoutTests/fast/events/tab-focus-link-in-canvas-expected.txt new file mode 100644 index 0000000..63a9735 --- /dev/null +++ b/LayoutTests/fast/events/tab-focus-link-in-canvas-expected.txt @@ -0,0 +1,11 @@ +Ensures that you can tab to focus a link inside a canvas subtree. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS document.activeElement.id is "before" +PASS document.activeElement.id is "canvas_link" +PASS successfullyParsed is true + +TEST COMPLETE +Before diff --git a/LayoutTests/fast/events/tab-focus-link-in-canvas.html b/LayoutTests/fast/events/tab-focus-link-in-canvas.html new file mode 100644 index 0000000..adc9ef4 --- /dev/null +++ b/LayoutTests/fast/events/tab-focus-link-in-canvas.html @@ -0,0 +1,31 @@ + + + + + + + +Before + + + Canvas Link + + + + + + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index dd3c0cc..7d3688d 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2012-08-28 Dominic Mazzoni + + AX: Should be able to tab to focus a link in a canvas subtree + https://bugs.webkit.org/show_bug.cgi?id=94967 + + Reviewed by Chris Fleizach. + + Skips the hasNonEmptyBoundingBox check in isKeyboardFocusable + when in a canvas subtree. + + Test: fast/events/tab-focus-link-in-canvas.html + + * html/HTMLAnchorElement.cpp: + (WebCore::HTMLAnchorElement::isKeyboardFocusable): + 2012-08-28 Koji Ishii OPENTYPE_VERTICAL support for Chromium Win diff --git a/Source/WebCore/html/HTMLAnchorElement.cpp b/Source/WebCore/html/HTMLAnchorElement.cpp index 9f50c7f..6477558 100644 --- a/Source/WebCore/html/HTMLAnchorElement.cpp +++ b/Source/WebCore/html/HTMLAnchorElement.cpp @@ -114,6 +114,9 @@ bool HTMLAnchorElement::isKeyboardFocusable(KeyboardEvent* event) const if (!document()->frame()->eventHandler()->tabsToLinks(event)) return false; + if (isInCanvasSubtree()) + return true; + return hasNonEmptyBoundingBox(); }