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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
718 } | 718 } |
719 | 719 |
720 void FocusController::setActive(bool active) | 720 void FocusController::setActive(bool active) |
721 { | 721 { |
722 if (m_isActive == active) | 722 if (m_isActive == active) |
723 return; | 723 return; |
724 | 724 |
725 m_isActive = active; | 725 m_isActive = active; |
726 | 726 |
727 Frame* frame = focusedOrMainFrame(); | 727 Frame* frame = focusedOrMainFrame(); |
728 if (frame->isLocalFrame()) | 728 if (frame->isLocalFrame()) { |
729 // Invalidate All CustomScrollbars as CustomScrollbars supports | |
pdr.
2014/12/22 18:34:48
Please rephrase this as something like the followi
| |
730 // CSS window-active attribute.Irrespective of focus on frame, this | |
731 // needs to be applied for entire page. So invalidate from root FrameVie w | |
732 // rather than focused frame. | |
733 if (FrameView* view = toLocalFrame(frame)->localFrameRoot()->document()- >view()) | |
734 view->invalidateAllCustomScrollbarsOnActiveChanged(); | |
729 toLocalFrame(frame)->selection().pageActivationChanged(); | 735 toLocalFrame(frame)->selection().pageActivationChanged(); |
736 } | |
730 } | 737 } |
731 | 738 |
732 static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& c urrent, FocusCandidate& candidate, FocusCandidate& closest) | 739 static void updateFocusCandidateIfNeeded(FocusType type, const FocusCandidate& c urrent, FocusCandidate& candidate, FocusCandidate& closest) |
733 { | 740 { |
734 ASSERT(candidate.visibleNode->isElementNode()); | 741 ASSERT(candidate.visibleNode->isElementNode()); |
735 ASSERT(candidate.visibleNode->renderer()); | 742 ASSERT(candidate.visibleNode->renderer()); |
736 | 743 |
737 // Ignore iframes that don't have a src attribute | 744 // Ignore iframes that don't have a src attribute |
738 if (frameOwnerElement(candidate) && (!frameOwnerElement(candidate)->contentF rame() || candidate.rect.isEmpty())) | 745 if (frameOwnerElement(candidate) && (!frameOwnerElement(candidate)->contentF rame() || candidate.rect.isEmpty())) |
739 return; | 746 return; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
922 return consumed; | 929 return consumed; |
923 } | 930 } |
924 | 931 |
925 void FocusController::trace(Visitor* visitor) | 932 void FocusController::trace(Visitor* visitor) |
926 { | 933 { |
927 visitor->trace(m_page); | 934 visitor->trace(m_page); |
928 visitor->trace(m_focusedFrame); | 935 visitor->trace(m_focusedFrame); |
929 } | 936 } |
930 | 937 |
931 } // namespace blink | 938 } // namespace blink |
OLD | NEW |