| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1142 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1143 // needs to be audited. see http://crbug.com/590369 for more details. | 1143 // needs to be audited. see http://crbug.com/590369 for more details. |
| 1144 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1144 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1145 | 1145 |
| 1146 frame->selection().selectWordAroundPosition(position); | 1146 frame->selection().selectWordAroundPosition(position); |
| 1147 } | 1147 } |
| 1148 | 1148 |
| 1149 bool WebLocalFrameImpl::selectWordAroundCaret() { | 1149 bool WebLocalFrameImpl::selectWordAroundCaret() { |
| 1150 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundCaret"); | 1150 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundCaret"); |
| 1151 FrameSelection& selection = frame()->selection(); | 1151 FrameSelection& selection = frame()->selection(); |
| 1152 if (selection.isNone() || | 1152 if (selection.computeVisibleSelectionInDOMTreeDeprecated().isNone() || |
| 1153 selection.computeVisibleSelectionInDOMTreeDeprecated().isRange()) | 1153 selection.computeVisibleSelectionInDOMTreeDeprecated().isRange()) |
| 1154 return false; | 1154 return false; |
| 1155 | 1155 |
| 1156 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1156 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1157 // needs to be audited. see http://crbug.com/590369 for more details. | 1157 // needs to be audited. see http://crbug.com/590369 for more details. |
| 1158 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1158 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1159 | 1159 |
| 1160 return frame()->selection().selectWordAroundPosition( | 1160 return frame()->selection().selectWordAroundPosition( |
| 1161 selection.computeVisibleSelectionInDOMTreeDeprecated().visibleStart()); | 1161 selection.computeVisibleSelectionInDOMTreeDeprecated().visibleStart()); |
| 1162 } | 1162 } |
| (...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2438 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
| 2439 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2439 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2440 } else { | 2440 } else { |
| 2441 clipHtml = | 2441 clipHtml = |
| 2442 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2442 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
| 2443 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2443 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2444 } | 2444 } |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 } // namespace blink | 2447 } // namespace blink |
| OLD | NEW |