| 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   835 } |   835 } | 
|   836  |   836  | 
|   837 // Helper function that tells whether a particular node is an element that has |   837 // Helper function that tells whether a particular node is an element that has | 
|   838 // an entire LocalFrame and FrameView, a <frame>, <iframe>, or <object>. |   838 // an entire LocalFrame and FrameView, a <frame>, <iframe>, or <object>. | 
|   839 static bool isFrameElement(const Node* n) { |   839 static bool isFrameElement(const Node* n) { | 
|   840   if (!n) |   840   if (!n) | 
|   841     return false; |   841     return false; | 
|   842   LayoutObject* layoutObject = n->layoutObject(); |   842   LayoutObject* layoutObject = n->layoutObject(); | 
|   843   if (!layoutObject || !layoutObject->isLayoutPart()) |   843   if (!layoutObject || !layoutObject->isLayoutPart()) | 
|   844     return false; |   844     return false; | 
|   845   Widget* widget = toLayoutPart(layoutObject)->widget(); |   845   FrameViewBase* frameViewBase = toLayoutPart(layoutObject)->widget(); | 
|   846   return widget && widget->isFrameView(); |   846   return frameViewBase && frameViewBase->isFrameView(); | 
|   847 } |   847 } | 
|   848  |   848  | 
|   849 void FrameSelection::setFocusedNodeIfNeeded() { |   849 void FrameSelection::setFocusedNodeIfNeeded() { | 
|   850   if (computeVisibleSelectionInDOMTreeDeprecated().isNone() || !isFocused()) |   850   if (computeVisibleSelectionInDOMTreeDeprecated().isNone() || !isFocused()) | 
|   851     return; |   851     return; | 
|   852  |   852  | 
|   853   if (Element* target = |   853   if (Element* target = | 
|   854           computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement()) { |   854           computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement()) { | 
|   855     // Walk up the DOM tree to search for a node to focus. |   855     // Walk up the DOM tree to search for a node to focus. | 
|   856     document().updateStyleAndLayoutTreeIgnorePendingStylesheets(); |   856     document().updateStyleAndLayoutTreeIgnorePendingStylesheets(); | 
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1200 } |  1200 } | 
|  1201  |  1201  | 
|  1202 void showTree(const blink::FrameSelection* sel) { |  1202 void showTree(const blink::FrameSelection* sel) { | 
|  1203   if (sel) |  1203   if (sel) | 
|  1204     sel->showTreeForThis(); |  1204     sel->showTreeForThis(); | 
|  1205   else |  1205   else | 
|  1206     LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |  1206     LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 
|  1207 } |  1207 } | 
|  1208  |  1208  | 
|  1209 #endif |  1209 #endif | 
| OLD | NEW |