OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |