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

Side by Side Diff: sky/engine/core/page/FocusController.cpp

Issue 759663003: Only allow one shadowRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: ojan review. Created 6 years 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/events/EventPath.cpp ('k') | sky/engine/web/tests/data/touch-action-tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 FocusNavigationScope FocusNavigationScope::ownedByNonFocusableFocusScopeOwner(No de* node) 90 FocusNavigationScope FocusNavigationScope::ownedByNonFocusableFocusScopeOwner(No de* node)
91 { 91 {
92 ASSERT(node); 92 ASSERT(node);
93 return FocusNavigationScope::ownedByShadowHost(node); 93 return FocusNavigationScope::ownedByShadowHost(node);
94 } 94 }
95 95
96 FocusNavigationScope FocusNavigationScope::ownedByShadowHost(Node* node) 96 FocusNavigationScope FocusNavigationScope::ownedByShadowHost(Node* node)
97 { 97 {
98 ASSERT(isShadowHost(node)); 98 ASSERT(isShadowHost(node));
99 return FocusNavigationScope(toElement(node)->shadow()->youngestShadowRoot()) ; 99 return FocusNavigationScope(toElement(node)->shadow()->shadowRoot());
100 } 100 }
101 101
102 static inline void dispatchEventsOnWindowAndFocusedNode(Document* document, bool focused) 102 static inline void dispatchEventsOnWindowAndFocusedNode(Document* document, bool focused)
103 { 103 {
104 // If we have a focused node we should dispatch blur on it before we blur th e window. 104 // If we have a focused node we should dispatch blur on it before we blur th e window.
105 // If we have a focused node we should dispatch focus on it after we focus t he window. 105 // If we have a focused node we should dispatch focus on it after we focus t he window.
106 // https://bugs.webkit.org/show_bug.cgi?id=27105 106 // https://bugs.webkit.org/show_bug.cgi?id=27105
107 107
108 if (!focused && document->focusedElement()) { 108 if (!focused && document->focusedElement()) {
109 RefPtr<Element> focusedElement(document->focusedElement()); 109 RefPtr<Element> focusedElement(document->focusedElement());
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 { 589 {
590 if (m_isActive == active) 590 if (m_isActive == active)
591 return; 591 return;
592 592
593 m_isActive = active; 593 m_isActive = active;
594 594
595 focusedOrMainFrame()->selection().pageActivationChanged(); 595 focusedOrMainFrame()->selection().pageActivationChanged();
596 } 596 }
597 597
598 } // namespace blink 598 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/events/EventPath.cpp ('k') | sky/engine/web/tests/data/touch-action-tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698