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

Unified Diff: sky/engine/core/page/FocusController.cpp

Issue 704413007: Remove HTMLShadowElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/page/FocusController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/page/FocusController.cpp
diff --git a/sky/engine/core/page/FocusController.cpp b/sky/engine/core/page/FocusController.cpp
index 8d9e013df25f7601ed98117d20415e6ebf7628d7..61c67d3a994353d8cf28e9bbedeca424c0d459b5 100644
--- a/sky/engine/core/page/FocusController.cpp
+++ b/sky/engine/core/page/FocusController.cpp
@@ -42,7 +42,6 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLImageElement.h"
-#include "core/html/HTMLShadowElement.h"
#include "core/page/Chrome.h"
#include "core/page/ChromeClient.h"
#include "core/page/EventHandler.h"
@@ -54,11 +53,6 @@
namespace blink {
-static inline bool isShadowInsertionPointFocusScopeOwner(Node& node)
-{
- return isActiveShadowInsertionPoint(node) && toHTMLShadowElement(node).olderShadowRoot();
-}
-
// FIXME: Some of Node* return values and Node* arguments should be Element*.
FocusNavigationScope::FocusNavigationScope(TreeScope* treeScope)
@@ -77,7 +71,7 @@ Element* FocusNavigationScope::owner() const
Node* root = rootNode();
if (root->isShadowRoot()) {
ShadowRoot* shadowRoot = toShadowRoot(root);
- return shadowRoot->isYoungest() ? shadowRoot->host() : shadowRoot->shadowInsertionPointOfYoungerShadowRoot();
+ return shadowRoot->host();
}
return 0;
}
@@ -96,10 +90,7 @@ FocusNavigationScope FocusNavigationScope::focusNavigationScopeOf(Node* node)
FocusNavigationScope FocusNavigationScope::ownedByNonFocusableFocusScopeOwner(Node* node)
{
ASSERT(node);
- if (isShadowHost(node))
- return FocusNavigationScope::ownedByShadowHost(node);
- ASSERT(isShadowInsertionPointFocusScopeOwner(*node));
- return FocusNavigationScope::ownedByShadowInsertionPoint(toHTMLShadowElement(node));
+ return FocusNavigationScope::ownedByShadowHost(node);
}
FocusNavigationScope FocusNavigationScope::ownedByShadowHost(Node* node)
@@ -108,12 +99,6 @@ FocusNavigationScope FocusNavigationScope::ownedByShadowHost(Node* node)
return FocusNavigationScope(toElement(node)->shadow()->youngestShadowRoot());
}
-FocusNavigationScope FocusNavigationScope::ownedByShadowInsertionPoint(HTMLShadowElement* shadowInsertionPoint)
-{
- ASSERT(isShadowInsertionPointFocusScopeOwner(*shadowInsertionPoint));
- return FocusNavigationScope(shadowInsertionPoint->olderShadowRoot());
-}
-
static inline void dispatchEventsOnWindowAndFocusedNode(Document* document, bool focused)
{
// If we have a focused node we should dispatch blur on it before we blur the window.
@@ -177,7 +162,7 @@ static inline bool isKeyboardFocusableShadowHost(Node* node)
static inline bool isNonFocusableFocusScopeOwner(Node* node)
{
ASSERT(node);
- return isNonKeyboardFocusableShadowHost(node) || isShadowInsertionPointFocusScopeOwner(*node);
+ return isNonKeyboardFocusableShadowHost(node);
}
static inline int adjustedTabIndex(Node* node)
« no previous file with comments | « sky/engine/core/page/FocusController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698