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

Side by Side Diff: Source/core/editing/FrameSelection.cpp

Issue 667403002: Rename nodes/elements traversal function names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename to startsAt (and startsAfter) Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.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) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 return &toHTMLFormElement(element); 1743 return &toHTMLFormElement(element);
1744 return element.formOwner(); 1744 return element.formOwner();
1745 } 1745 }
1746 1746
1747 // Scans logically forward from "start", including any child frames. 1747 // Scans logically forward from "start", including any child frames.
1748 static HTMLFormElement* scanForForm(Node* start) 1748 static HTMLFormElement* scanForForm(Node* start)
1749 { 1749 {
1750 if (!start) 1750 if (!start)
1751 return 0; 1751 return 0;
1752 1752
1753 for (HTMLElement& element : Traversal<HTMLElement>::from(start->isHTMLElemen t() ? toHTMLElement(start) : Traversal<HTMLElement>::next(*start))) { 1753 for (HTMLElement& element : Traversal<HTMLElement>::startsAt(start->isHTMLEl ement() ? toHTMLElement(start) : Traversal<HTMLElement>::next(*start))) {
1754 if (HTMLFormElement* form = associatedFormElement(element)) 1754 if (HTMLFormElement* form = associatedFormElement(element))
1755 return form; 1755 return form;
1756 1756
1757 if (isHTMLFrameElementBase(element)) { 1757 if (isHTMLFrameElementBase(element)) {
1758 Node* childDocument = toHTMLFrameElementBase(element).contentDocumen t(); 1758 Node* childDocument = toHTMLFrameElementBase(element).contentDocumen t();
1759 if (HTMLFormElement* frameResult = scanForForm(childDocument)) 1759 if (HTMLFormElement* frameResult = scanForForm(childDocument))
1760 return frameResult; 1760 return frameResult;
1761 } 1761 }
1762 } 1762 }
1763 return 0; 1763 return 0;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 sel.showTreeForThis(); 1939 sel.showTreeForThis();
1940 } 1940 }
1941 1941
1942 void showTree(const blink::FrameSelection* sel) 1942 void showTree(const blink::FrameSelection* sel)
1943 { 1943 {
1944 if (sel) 1944 if (sel)
1945 sel->showTreeForThis(); 1945 sel->showTreeForThis();
1946 } 1946 }
1947 1947
1948 #endif 1948 #endif
OLDNEW
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698