OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |