Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Unified Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 23496036: Make it possible to focus on 0-size form controls and anchors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLAnchorElement.cpp
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
index 6e688ce98c887adc5fcced2ccfed385ffbc58a0f..5fa5a2b23b2b4897a611a042d475cf9f94e4c652 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -163,23 +163,14 @@ bool HTMLAnchorElement::isMouseFocusable() const
bool HTMLAnchorElement::isKeyboardFocusable() const
{
- if (!isLink())
- return HTMLElement::isKeyboardFocusable();
-
- if (!isFocusable())
- return false;
-
- Page* page = document().page();
- if (!page)
- return false;
-
- if (!page->chrome().client().tabsToLinks())
- return false;
-
- if (isInCanvasSubtree())
- return true;
-
- return hasNonEmptyBoundingBox();
+ if (isLink()) {
+ Page* page = document().page();
+ if (!page)
+ return false;
+ if (!page->chrome().client().tabsToLinks())
+ return false;
+ }
+ return HTMLElement::isKeyboardFocusable();
}
static void appendServerMapMousePosition(StringBuilder& url, Event* event)
« no previous file with comments | « LayoutTests/fast/forms/focus-on-control-with-zero-size-expected.txt ('k') | Source/core/html/HTMLFormControlElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698