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

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

Issue 2327743002: Rename Node::shadowHost() to Node::ownerShadowHost() (Closed)
Patch Set: fix Created 4 years, 3 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
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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 if (caretBrowsing) 1045 if (caretBrowsing)
1046 return; 1046 return;
1047 1047
1048 Node* selectionStartNode = selection.selection().start().anchorNode(); 1048 Node* selectionStartNode = selection.selection().start().anchorNode();
1049 if (selectionStartNode == newFocusedElement || selectionStartNode->isDescend antOf(newFocusedElement)) 1049 if (selectionStartNode == newFocusedElement || selectionStartNode->isDescend antOf(newFocusedElement))
1050 return; 1050 return;
1051 1051
1052 if (!enclosingTextFormControl(selectionStartNode)) 1052 if (!enclosingTextFormControl(selectionStartNode))
1053 return; 1053 return;
1054 1054
1055 if (selectionStartNode->isInShadowTree() && selectionStartNode->shadowHost() == newFocusedElement) 1055 if (selectionStartNode->isInShadowTree() && selectionStartNode->ownerShadowH ost() == newFocusedElement)
1056 return; 1056 return;
1057 1057
1058 selection.clear(); 1058 selection.clear();
1059 } 1059 }
1060 1060
1061 bool FocusController::setFocusedElement(Element* element, Frame* newFocusedFrame ) 1061 bool FocusController::setFocusedElement(Element* element, Frame* newFocusedFrame )
1062 { 1062 {
1063 return setFocusedElement(element, newFocusedFrame, FocusParams(SelectionBeha viorOnFocus::None, WebFocusTypeNone, nullptr)); 1063 return setFocusedElement(element, newFocusedFrame, FocusParams(SelectionBeha viorOnFocus::None, WebFocusTypeNone, nullptr));
1064 } 1064 }
1065 1065
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 return consumed; 1313 return consumed;
1314 } 1314 }
1315 1315
1316 DEFINE_TRACE(FocusController) 1316 DEFINE_TRACE(FocusController)
1317 { 1317 {
1318 visitor->trace(m_page); 1318 visitor->trace(m_page);
1319 visitor->trace(m_focusedFrame); 1319 visitor->trace(m_focusedFrame);
1320 } 1320 }
1321 1321
1322 } // namespace blink 1322 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/DragController.cpp ('k') | third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698