Chromium Code Reviews| 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..4cf75560954ed0a8b0d6aaaa1ac6d94cfc4dcab7 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)); |
|
hayato
2016/05/10 07:58:15
Could you help me to understand how this ASSERT hi
kochi
2016/05/10 09:49:51
This assertion is, if de morgan's law is applied:
|
| 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. |