| 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..e307111f27cb426f30d3eb13993aa335b6ef16b5 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
|
| @@ -28,7 +28,7 @@
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "core/dom/AXObjectCache.h"
|
| #include "core/dom/ExceptionCode.h"
|
| -#include "core/dom/NodeTraversal.h"
|
| +#include "core/dom/shadow/FlatTreeTraversal.h"
|
| #include "core/events/Event.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/UseCounter.h"
|
| @@ -44,11 +44,10 @@ using namespace HTMLNames;
|
| static void setFocusForDialog(HTMLDialogElement* dialog) {
|
| Element* focusableDescendant = 0;
|
| Node* next = 0;
|
| - for (Node* node = dialog->firstChild(); node; node = next) {
|
| - if (isHTMLDialogElement(*node))
|
| - next = NodeTraversal::nextSkippingChildren(*node, dialog);
|
| - else
|
| - next = NodeTraversal::next(*node, dialog);
|
| + for (Node* node = FlatTreeTraversal::firstChild(*dialog); node; node = next) {
|
| + next = isHTMLDialogElement(*node)
|
| + ? FlatTreeTraversal::nextSkippingChildren(*node, dialog)
|
| + : FlatTreeTraversal::next(*node, dialog);
|
|
|
| if (!node->isElementNode())
|
| continue;
|
|
|