| Index: third_party/WebKit/Source/core/page/FocusController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| index 42e6f3d80c8630ca756b7d8216f3c31352b41323..d4de93aa6b6bc5bfc54549ff2b8243fa6b80606d 100644
|
| --- a/third_party/WebKit/Source/core/page/FocusController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/FocusController.cpp
|
| @@ -364,13 +364,6 @@ inline bool isShadowHostWithoutCustomFocusLogic(const Element& element)
|
| return isShadowHost(element) && !hasCustomFocusLogic(element);
|
| }
|
|
|
| -#if ENABLE(ASSERT)
|
| -inline bool isNonFocusableShadowHost(const Element& element)
|
| -{
|
| - return isShadowHostWithoutCustomFocusLogic(element) && !element.isFocusable();
|
| -}
|
| -#endif
|
| -
|
| inline bool isNonKeyboardFocusableShadowHost(const Element& element)
|
| {
|
| return isShadowHostWithoutCustomFocusLogic(element) && !(element.shadowRootIfV1() ? element.isFocusable() : element.isKeyboardFocusable());
|
| @@ -646,7 +639,6 @@ Element* findFocusableElementDescendingDownIntoFrameDocument(WebFocusType type,
|
| Element* findFocusableElementAcrossFocusScopesForward(ScopedFocusNavigation& scope)
|
| {
|
| Element* current = scope.currentElement();
|
| - ASSERT(!current || !isNonFocusableShadowHost(*current));
|
| Element* found;
|
| if (current && isShadowHostWithoutCustomFocusLogic(*current)) {
|
| ScopedFocusNavigation innerScope = ScopedFocusNavigation::ownedByShadowHost(*current);
|
| @@ -670,7 +662,6 @@ Element* findFocusableElementAcrossFocusScopesForward(ScopedFocusNavigation& sco
|
|
|
| Element* findFocusableElementAcrossFocusScopesBackward(ScopedFocusNavigation& scope)
|
| {
|
| - ASSERT(!scope.currentElement() || !isNonFocusableShadowHost(*scope.currentElement()));
|
| Element* found = findFocusableElementRecursivelyBackward(scope);
|
|
|
| // If there's no focusable element to advance to, move up the focus scopes until we find one.
|
| @@ -979,6 +970,8 @@ bool FocusController::advanceFocusInDocumentOrder(LocalFrame* frame, Element* st
|
| return true;
|
| }
|
|
|
| + ASSERT(element->isFocusable());
|
| +
|
| // FIXME: It would be nice to just be able to call setFocusedElement(element)
|
| // here, but we can't do that because some elements (e.g. HTMLInputElement
|
| // and HTMLTextAreaElement) do extra work in their focus() methods.
|
|
|