| 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 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); | 1125 WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); |
| 1126 if (pluginContainer) | 1126 if (pluginContainer) |
| 1127 return pluginContainer->plugin()->selectionAsMarkup(); | 1127 return pluginContainer->plugin()->selectionAsMarkup(); |
| 1128 | 1128 |
| 1129 return frame()->selection().selectedHTMLForClipboard(); | 1129 return frame()->selection().selectedHTMLForClipboard(); |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosit
ion position) | 1132 void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosit
ion position) |
| 1133 { | 1133 { |
| 1134 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundPosition"); | 1134 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundPosition"); |
| 1135 |
| 1136 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
needs to be audited. |
| 1137 // see http://crbug.com/590369 for more details. |
| 1138 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1139 |
| 1135 frame->selection().selectWordAroundPosition(position); | 1140 frame->selection().selectWordAroundPosition(position); |
| 1136 } | 1141 } |
| 1137 | 1142 |
| 1138 bool WebLocalFrameImpl::selectWordAroundCaret() | 1143 bool WebLocalFrameImpl::selectWordAroundCaret() |
| 1139 { | 1144 { |
| 1140 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundCaret"); | 1145 TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundCaret"); |
| 1141 FrameSelection& selection = frame()->selection(); | 1146 FrameSelection& selection = frame()->selection(); |
| 1142 if (selection.isNone() || selection.isRange()) | 1147 if (selection.isNone() || selection.isRange()) |
| 1143 return false; | 1148 return false; |
| 1149 |
| 1150 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
needs to be audited. |
| 1151 // see http://crbug.com/590369 for more details. |
| 1152 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1153 |
| 1144 return frame()->selection().selectWordAroundPosition(selection.selection().v
isibleStart()); | 1154 return frame()->selection().selectWordAroundPosition(selection.selection().v
isibleStart()); |
| 1145 } | 1155 } |
| 1146 | 1156 |
| 1147 void WebLocalFrameImpl::selectRange(const WebPoint& baseInViewport, const WebPoi
nt& extentInViewport) | 1157 void WebLocalFrameImpl::selectRange(const WebPoint& baseInViewport, const WebPoi
nt& extentInViewport) |
| 1148 { | 1158 { |
| 1149 moveRangeSelection(baseInViewport, extentInViewport); | 1159 moveRangeSelection(baseInViewport, extentInViewport); |
| 1150 } | 1160 } |
| 1151 | 1161 |
| 1152 void WebLocalFrameImpl::selectRange(const WebRange& webRange) | 1162 void WebLocalFrameImpl::selectRange(const WebRange& webRange) |
| 1153 { | 1163 { |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2202 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2212 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2203 } else if (metric == "wasAlternateProtocolAvailable") { | 2213 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2204 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2214 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2205 } else if (metric == "connectionInfo") { | 2215 } else if (metric == "connectionInfo") { |
| 2206 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2216 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2207 } | 2217 } |
| 2208 UseCounter::count(frame(), feature); | 2218 UseCounter::count(frame(), feature); |
| 2209 } | 2219 } |
| 2210 | 2220 |
| 2211 } // namespace blink | 2221 } // namespace blink |
| OLD | NEW |