| Index: third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
|
| index 9edc5883e4ea38e02f6a61618fe0434fdac93113..348ea44fcf9e0e7602f7fc8073fad541aec7a672 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
|
| @@ -54,13 +54,15 @@ static void setFocusForDialog(HTMLDialogElement* dialog) {
|
| continue;
|
| Element* element = toElement(node);
|
| if (element->isFormControlElement()) {
|
| + // TODO(dbeam): <button tabindex="-1"> or <a href="..." tabindex="-1">
|
| + // should not have precedence over <div tabindex="0"> but currently do.
|
| HTMLFormControlElement* control = toHTMLFormControlElement(node);
|
| if (control->isAutofocusable() && control->isFocusable()) {
|
| control->focus();
|
| return;
|
| }
|
| }
|
| - if (!focusableDescendant && element->isFocusable())
|
| + if (!focusableDescendant && element->isKeyboardFocusable())
|
| focusableDescendant = element;
|
| }
|
|
|
| @@ -69,6 +71,7 @@ static void setFocusForDialog(HTMLDialogElement* dialog) {
|
| return;
|
| }
|
|
|
| + // TODO(dbeam): should this be isKeyboardFocusable() instead?
|
| if (dialog->isFocusable()) {
|
| dialog->focus();
|
| return;
|
|
|