| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return selectionRoot; | 147 return selectionRoot; |
| 148 | 148 |
| 149 Node* const node = position.computeContainerNode(); | 149 Node* const node = position.computeContainerNode(); |
| 150 return node ? &node->treeScope().rootNode() : 0; | 150 return node ? &node->treeScope().rootNode() : 0; |
| 151 } | 151 } |
| 152 | 152 |
| 153 const VisibleSelection& | 153 const VisibleSelection& |
| 154 FrameSelection::computeVisibleSelectionInDOMTreeDeprecated() const { | 154 FrameSelection::computeVisibleSelectionInDOMTreeDeprecated() const { |
| 155 // TODO(yosin): We should hoist updateStyleAndLayoutIgnorePendingStylesheets | 155 // TODO(yosin): We should hoist updateStyleAndLayoutIgnorePendingStylesheets |
| 156 // to caller. See http://crbug.com/590369 for more details. | 156 // to caller. See http://crbug.com/590369 for more details. |
| 157 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 157 // document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 158 return computeVisibleSelectionInDOMTree(); | 158 return computeVisibleSelectionInDOMTree(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 const VisibleSelectionInFlatTree& FrameSelection::selectionInFlatTree() const { | 161 const VisibleSelectionInFlatTree& FrameSelection::selectionInFlatTree() const { |
| 162 return computeVisibleSelectionInFlatTree(); | 162 return computeVisibleSelectionInFlatTree(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void FrameSelection::moveCaretSelection(const IntPoint& point) { | 165 void FrameSelection::moveCaretSelection(const IntPoint& point) { |
| 166 DCHECK(!document().needsLayoutTreeUpdate()); | 166 DCHECK(!document().needsLayoutTreeUpdate()); |
| 167 | 167 |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 } | 1148 } |
| 1149 | 1149 |
| 1150 void showTree(const blink::FrameSelection* sel) { | 1150 void showTree(const blink::FrameSelection* sel) { |
| 1151 if (sel) | 1151 if (sel) |
| 1152 sel->showTreeForThis(); | 1152 sel->showTreeForThis(); |
| 1153 else | 1153 else |
| 1154 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1154 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 #endif | 1157 #endif |
| OLD | NEW |