| 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() || selection.isRange()) | 1152 if (selection.isNone() || |
| 1153 selection.computeVisibleSelectionInDOMTreeDeprecated().isRange()) |
| 1153 return false; | 1154 return false; |
| 1154 | 1155 |
| 1155 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1156 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 1156 // 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. |
| 1157 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); | 1158 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1158 | 1159 |
| 1159 return frame()->selection().selectWordAroundPosition( | 1160 return frame()->selection().selectWordAroundPosition( |
| 1160 selection.computeVisibleSelectionInDOMTreeDeprecated().visibleStart()); | 1161 selection.computeVisibleSelectionInDOMTreeDeprecated().visibleStart()); |
| 1161 } | 1162 } |
| 1162 | 1163 |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2440 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
| 2440 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2441 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2441 } else { | 2442 } else { |
| 2442 clipHtml = | 2443 clipHtml = |
| 2443 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2444 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
| 2444 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2445 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
| 2445 } | 2446 } |
| 2446 } | 2447 } |
| 2447 | 2448 |
| 2448 } // namespace blink | 2449 } // namespace blink |
| OLD | NEW |