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

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

Issue 374133002: Remove remaining callers of deprecatedShadowAncestorNode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 5 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 | « Source/core/dom/Node.cpp ('k') | Source/core/testing/Internals.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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 647
648 FrameSelection& selection = oldFocusedFrame->selection(); 648 FrameSelection& selection = oldFocusedFrame->selection();
649 if (selection.isNone()) 649 if (selection.isNone())
650 return; 650 return;
651 651
652 bool caretBrowsing = oldFocusedFrame->settings()->caretBrowsingEnabled(); 652 bool caretBrowsing = oldFocusedFrame->settings()->caretBrowsingEnabled();
653 if (caretBrowsing) 653 if (caretBrowsing)
654 return; 654 return;
655 655
656 Node* selectionStartNode = selection.selection().start().deprecatedNode(); 656 Node* selectionStartNode = selection.selection().start().deprecatedNode();
657 if (selectionStartNode == newFocusedNode || selectionStartNode->isDescendant Of(newFocusedNode) || selectionStartNode->deprecatedShadowAncestorNode() == newF ocusedNode) 657 if (selectionStartNode == newFocusedNode || selectionStartNode->isDescendant Of(newFocusedNode))
658 return;
659
660 if (selectionStartNode->isInShadowTree() && selectionStartNode->shadowHost() == newFocusedNode)
658 return; 661 return;
659 662
660 if (Node* mousePressNode = newFocusedFrame->eventHandler().mousePressNode()) { 663 if (Node* mousePressNode = newFocusedFrame->eventHandler().mousePressNode()) {
661 if (mousePressNode->renderer() && !mousePressNode->canStartSelection()) { 664 if (mousePressNode->renderer() && !mousePressNode->canStartSelection()) {
662 // Don't clear the selection for contentEditable elements, but do 665 // Don't clear the selection for contentEditable elements, but do
663 // clear it for input and textarea. See bug 38696. 666 // clear it for input and textarea. See bug 38696.
664 if (!enclosingTextFormControl(selection.start())) 667 if (!enclosingTextFormControl(selection.start()))
665 return; 668 return;
666 } 669 }
667 } 670 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */); 920 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */);
918 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type, container); 921 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type, container);
919 if (container && container->isDocumentNode()) 922 if (container && container->isDocumentNode())
920 toDocument(container)->updateLayoutIgnorePendingStylesheets(); 923 toDocument(container)->updateLayoutIgnorePendingStylesheets();
921 } while (!consumed && container); 924 } while (!consumed && container);
922 925
923 return consumed; 926 return consumed;
924 } 927 }
925 928
926 } // namespace WebCore 929 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698