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

Side by Side Diff: Source/core/page/FocusController.cpp

Issue 1298803003: Fixed two bugs related to OOPIFs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months 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 | « no previous file | Source/web/ChromeClientImpl.cpp » ('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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 return; 792 return;
793 793
794 if (selectionStartNode->isInShadowTree() && selectionStartNode->shadowHost() == newFocusedElement) 794 if (selectionStartNode->isInShadowTree() && selectionStartNode->shadowHost() == newFocusedElement)
795 return; 795 return;
796 796
797 selection.clear(); 797 selection.clear();
798 } 798 }
799 799
800 bool FocusController::setFocusedElement(Element* element, PassRefPtrWillBeRawPtr <Frame> newFocusedFrame, WebFocusType type, InputDeviceCapabilities* sourceCapab ilities) 800 bool FocusController::setFocusedElement(Element* element, PassRefPtrWillBeRawPtr <Frame> newFocusedFrame, WebFocusType type, InputDeviceCapabilities* sourceCapab ilities)
801 { 801 {
802 RefPtrWillBeRawPtr<LocalFrame> oldFocusedFrame = toLocalFrame(focusedFrame() ); 802 RefPtrWillBeRawPtr<LocalFrame> oldFocusedFrame = focusedFrame() && focusedFr ame()->isLocalFrame() ? toLocalFrame(focusedFrame()) : nullptr;
803 RefPtrWillBeRawPtr<Document> oldDocument = oldFocusedFrame ? oldFocusedFrame ->document() : nullptr; 803 RefPtrWillBeRawPtr<Document> oldDocument = oldFocusedFrame ? oldFocusedFrame ->document() : nullptr;
804 804
805 Element* oldFocusedElement = oldDocument ? oldDocument->focusedElement() : n ullptr; 805 Element* oldFocusedElement = oldDocument ? oldDocument->focusedElement() : n ullptr;
806 if (element && oldFocusedElement == element) 806 if (element && oldFocusedElement == element)
807 return true; 807 return true;
808 808
809 // FIXME: Might want to disable this check for caretBrowsing 809 // FIXME: Might want to disable this check for caretBrowsing
810 if (oldFocusedElement && oldFocusedElement->isRootEditableElement() && !reli nquishesEditingFocus(*oldFocusedElement)) 810 if (oldFocusedElement && oldFocusedElement->isRootEditableElement() && !reli nquishesEditingFocus(*oldFocusedElement))
811 return false; 811 return false;
812 812
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 return consumed; 1049 return consumed;
1050 } 1050 }
1051 1051
1052 DEFINE_TRACE(FocusController) 1052 DEFINE_TRACE(FocusController)
1053 { 1053 {
1054 visitor->trace(m_page); 1054 visitor->trace(m_page);
1055 visitor->trace(m_focusedFrame); 1055 visitor->trace(m_focusedFrame);
1056 } 1056 }
1057 1057
1058 } // namespace blink 1058 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698