| 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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 } | 798 } |
| 799 | 799 |
| 800 // Helper function that tells whether a particular node is an element that has | 800 // Helper function that tells whether a particular node is an element that has |
| 801 // an entire LocalFrame and FrameView, a <frame>, <iframe>, or <object>. | 801 // an entire LocalFrame and FrameView, a <frame>, <iframe>, or <object>. |
| 802 static bool isFrameElement(const Node* n) { | 802 static bool isFrameElement(const Node* n) { |
| 803 if (!n) | 803 if (!n) |
| 804 return false; | 804 return false; |
| 805 LayoutObject* layoutObject = n->layoutObject(); | 805 LayoutObject* layoutObject = n->layoutObject(); |
| 806 if (!layoutObject || !layoutObject->isLayoutPart()) | 806 if (!layoutObject || !layoutObject->isLayoutPart()) |
| 807 return false; | 807 return false; |
| 808 FrameViewBase* frameViewBase = toLayoutPart(layoutObject)->widget(); | 808 FrameViewBase* frameViewBase = toLayoutPart(layoutObject)->frameViewBase(); |
| 809 return frameViewBase && frameViewBase->isFrameView(); | 809 return frameViewBase && frameViewBase->isFrameView(); |
| 810 } | 810 } |
| 811 | 811 |
| 812 void FrameSelection::setFocusedNodeIfNeeded() { | 812 void FrameSelection::setFocusedNodeIfNeeded() { |
| 813 if (computeVisibleSelectionInDOMTreeDeprecated().isNone() || !isFocused()) | 813 if (computeVisibleSelectionInDOMTreeDeprecated().isNone() || !isFocused()) |
| 814 return; | 814 return; |
| 815 | 815 |
| 816 if (Element* target = | 816 if (Element* target = |
| 817 computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement()) { | 817 computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement()) { |
| 818 // Walk up the DOM tree to search for a node to focus. | 818 // Walk up the DOM tree to search for a node to focus. |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 } | 1165 } |
| 1166 | 1166 |
| 1167 void showTree(const blink::FrameSelection* sel) { | 1167 void showTree(const blink::FrameSelection* sel) { |
| 1168 if (sel) | 1168 if (sel) |
| 1169 sel->showTreeForThis(); | 1169 sel->showTreeForThis(); |
| 1170 else | 1170 else |
| 1171 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1171 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 #endif | 1174 #endif |
| OLD | NEW |