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

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

Issue 69543007: Have NodeTraversal::nextSkippingChildren() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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/html/HTMLSelectElement.cpp ('k') | Source/core/page/TouchDisambiguation.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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 ASSERT(container); 772 ASSERT(container);
773 Element* focusedElement = (focusedFrame() && focusedFrame()->document()) ? f ocusedFrame()->document()->focusedElement() : 0; 773 Element* focusedElement = (focusedFrame() && focusedFrame()->document()) ? f ocusedFrame()->document()->focusedElement() : 0;
774 774
775 Element* element = ElementTraversal::firstWithin(container); 775 Element* element = ElementTraversal::firstWithin(container);
776 FocusCandidate current; 776 FocusCandidate current;
777 current.rect = startingRect; 777 current.rect = startingRect;
778 current.focusableNode = focusedElement; 778 current.focusableNode = focusedElement;
779 current.visibleNode = focusedElement; 779 current.visibleNode = focusedElement;
780 780
781 for (; element; element = (element->isFrameOwnerElement() || canScrollInDire ction(element, direction)) 781 for (; element; element = (element->isFrameOwnerElement() || canScrollInDire ction(element, direction))
782 ? ElementTraversal::nextSkippingChildren(element, container) 782 ? ElementTraversal::nextSkippingChildren(*element, container)
783 : ElementTraversal::next(*element, container)) { 783 : ElementTraversal::next(*element, container)) {
784 if (element == focusedElement) 784 if (element == focusedElement)
785 continue; 785 continue;
786 786
787 if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() & & !canScrollInDirection(element, direction)) 787 if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() & & !canScrollInDirection(element, direction))
788 continue; 788 continue;
789 789
790 FocusCandidate candidate = FocusCandidate(element, direction); 790 FocusCandidate candidate = FocusCandidate(element, direction);
791 if (candidate.isNull()) 791 if (candidate.isNull())
792 continue; 792 continue;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */); 900 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */);
901 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct ion, container); 901 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct ion, container);
902 if (container && container->isDocumentNode()) 902 if (container && container->isDocumentNode())
903 toDocument(container)->updateLayoutIgnorePendingStylesheets(); 903 toDocument(container)->updateLayoutIgnorePendingStylesheets();
904 } while (!consumed && container); 904 } while (!consumed && container);
905 905
906 return consumed; 906 return consumed;
907 } 907 }
908 908
909 } // namespace WebCore 909 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSelectElement.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698